Web fonts with Unicode private-use symbols defined



  • So just for fun, I installedwrote a GreaseMonkey script to do Emoji replacement. It works pretty smoothly, but there were some, shall we just say, unexpected results when I refreshed my SharePoint homepage.

    My real question here is, if they went to the trouble of creating a custom font, why they used private-use Unicode code points for the symbols instead of, say, just altering the glyphs for the existing code points defined as 'HORIZONTAL ELLIPSIS' (U+2026, … ), 'GEAR' (U+2699, ⚙ ), and 'BLACK QUESTION MARK ORNAMENT' (U+2753, ❓ ). Oh, and the whole Office365 logo is one code point, which I guess makes sense, but meh.


  • Discourse touched me in a no-no place

    @anotherusername said:

    'HORIZONTAL ELLIPSIS' (U+2026, … )
    I use that one quite a bit…



  • @anotherusername said:

    why they used private-use Unicode code points for the symbols instead of, say, just altering the glyphs for the existing code points defined as

    It looks similar to glyphicons/fontawesome. They probably had a list of icons needed and just used a range of codepoints instead of having to go through and figure out approximate Unicode codepoints. 📈



  • @Zemm said:

    having to go through and figure out approximate Unicode codepoints

    I agree, this is not fun.



  • Minor inconvenience, really. If you use the appropriate Unicode code points, then if your web font can't or doesn't load for any reason, or if it just hasn't loaded yet, the symbols your user sees are basically still correct. And I really don't see a problem with using SVG or PNG images either.



  • @anotherusername said:

    And I really don't see a problem with using SVG or PNG images either.
    SVG doesn't work right in IE until IE 9. PNG isn't vector, so it blurs when viewed with a different zoom level or DPI. TTF has neither of those issues. Plenty of other ones, but not those.



  • For simple icons and logos it wouldn't take that much extra space to just make all your PNGs a few times larger and scale them down when they're displayed. No more blurring if it's zoomed in a little.



  • @TwelveBaud said:

    SVG doesn't work right in IE until IE 9. PNG isn't vector, so it blurs when viewed with a different zoom level or DPI. TTF has neither of those issues. Plenty of other ones, but not those.

    Like how different browsers don't like TTFs meaning you potentially need to send WOFF or OTF or EOT files instead?



  • But all of those plug directly into the same place as TTF. The only difference between the files is how the shapes are packed, and the only change to the content is switching out the filename.



  • You still have to call all of them appropriately with CSS font-face and still have to have all of them because browsers are retarded.



  • I think the reasoning is so that platforms don't try to replace the icons with their own versions. Private use characters can't be taken out of context (which is what your script does when it tries to render the SoftBank emoji).



  • @MiffTheFox said:

    I think the reasoning is so that platforms don't try to replace the icons with their own versions.

    It's because assistive technologies ignore glyphs from the private use area when reading back a page.


Log in to reply