3 ms·
Total tangent: What is the magic on that page that renders: if (putenv (var) != 0) as if (putenv (var) ≠ 0) on my browser (Firefox)? When I try to
by bxparks 4y ago
Total tangent: What is the magic on that page that renders:
if (putenv (var) != 0)
as
if (putenv (var) ≠ 0)
on my browser (Firefox)?
When I try to copy that text, it copies as '!=' into my copypaste buffer.
- kec 4y agoThey're using a webfont with a ligature for !=.
- bxparks 4y agoSheeet, I didn't even know that was possible. Why would they use that font for displaying C code? I looked at that ≠ and spent a few minutes trying to figure out what language it was. Maybe I should uncheck the "Allow pages to choose their own fonts, instead of your selections above" option in Firefox, though it woulld probably break other websites.
- Arnavion 4y ago>Why would they use that font for displaying C code? Using ligature fonts for programming became popular a few years ago. As in some people even use them in their editors.
- bspammer 4y agoWhich is totally fine on their own machine, but using a webfont to force ligatures on anyone viewing their website is just confusing as a reader.
- Arnavion 4y agoNo, I get it. I don't use them either because I find them confusing. I'm just telling you you missed out on what was a quite popular trend from a few years ago.
- remram 4y agoLately my Firefox has been showing a ligature for "fi" in monospace code blocks, showing those two characters in the width of a single character. On every website with code blocks. It is mildly infuriating and I don't understand it.
- Arnavion 4y agoRight-click the ligature text -> Inpsect. In the Inspector, on the right there is a tab called "Fonts" (to the right of "Rules", "Layout", etc). That will show you what font(s) Firefox used to render all the text in the selected element.
- remram 4y agoI used Stylus to force ligatures off at some point, it mostly worked but caused some other issues.
- chrisshroba 4y agoFYI Fira Code is one example of a very popular programming font that supports ligatures (67k stars on GitHub) [1]. But totally get the frustration of seeing ligatures on the web and not understanding what was going on! [1] https://github.com/tonsky/FiraCode https://github.com/tonsky/FiraCode
- kevin_thibedeau 4y ago> though it woulld probably break other websites. It only breaks sites that are too poorly developed to respect the foundational principles of the web.
- bxparks 4y agoIt breaks Google Calendar badly, almost unusable due to missing icons and spacing problems.
- hcm 4y ago(Author here) I don't see that in Chrome so had no idea that was happening – thanks for pointing it out! I'm not a fan of coding ligatures so I just pushed a change to turn it off.
- dubya 4y agoOn Safari the 'notequal' is double-width, and you can select just half of it, which I didn't expect.
- deleted 4y ago[deleted]