Hacker News new | past | comments | ask | show | jobs | submit login

An icon font ligature is just an entry in the font file that says to display a particular sequence of characters as a single glyph. In the absence of the font the browser doesn't know that the page designer (or the font designer) intended a ligature. If you force an alternative font the browser will just display the sequence of characters that made up the ligature.

A few ligatures do have their own unicode code points, e.g. ffi, so the browser knows what is intended independent of the font. The ligatures used by icon fonts do not have their own code points.




> An icon font ligature is just an entry in the font file that says to display a particular sequence of characters as a single glyph.

Most icon fonts use private-use codepoints, not ligatures. These codepoints have no standard glyph, so disabling site-specific fonts will make those characters fail to render at all or display placeholder characters (e.g. �).

Thankfully, icon fonts are declining rapidly in usage - SVG icons are superior for most use cases.

> A few ligatures do have their own unicode code points, e.g. ffi, so the browser knows what is intended.

The precomposed ligature codepoints (e.g. U+FB00-FB06) only exist for compatibility with legacy encodings which included similar characters. They shouldn't be used in new documents. If you want text on a web page to use ligatures, use the CSS font-variant-ligatures property to control which ones are used. (And make sure to disable them on monospaced text!)


Its interesting that Firefox would offer a feature that disables all custom fonts rather than simply prioritizing the user's preferred font.

It does add a bit of performance gain not loading the fonts, and it may be a small security improvement, but if the goal was usability/readability that seems like a huge miss.


A preference based system would be almost impossible to maintain considering the literal infinite number of type faces out there (thousands plus more built every week).

Add to that, this feature also needs to be understandable for non-technical people who might never have view a page source in their lives.

Much as a granular system would be more powerful and preferable for the HN community, having a dumb toggle makes a lot more sense from Firefox’s perspective.


I wasn't thinking granular control. It could work exactly like the existing preference with users picking a preferred font. That font is always set as the highest priority font and used for any characters it supports, but the page's custom fonts are still fallbacks and kept in the font stack for any characters missing from the user font.

This would be helpful for icon fonts, but also for user preferred fonts that don't cover all language character sets.


Oh I see. Is that not how it works already?

Apologies if I’ve completely misunderstood your comments


No, using this setting in Firefox blocks all fonts site by a website, which means if a site uses an icon font the website UI will look very broken. I am not a fan of icon fonts.


No problem at all! I haven't been by my desktop the last couple days but I do want to test it. I hope that's already how it works, that would make more sense to me than blocking all custom font loading (though that does have its purposes).


> Thankfully, icon fonts are declining rapidly in usage

I wouldn’t be so sure about that. Resources like FontAwesome are still used heavily in VuePress and similar documentation generators.


I have one project using them, mainly because SVGs can be a bit of a pain to use in XSLT.

edit: it may not be SVGs themselves. The icons on that site are repeated and I would reach for an SVG sprite that can be reused, I ran into issues with that working cross browser in XSLT - Firefox was actually the problem if I'm not mistaken.




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: