derat/nup

Figure out how star glyphs should be displayed

Closed this issue · 1 comments

derat commented

I dropped the Fontello font in 084d0e7 because I thought that Roboto includes ★ (U+2605) and ☆ (U+2606), but it looks like it's actually not included in the roboto-v30-latin-regular.woff and roboto-v30-latin-regular.woff2 fonts, so my browser is just falling back to Noto Sans CJK. I should find some way to use the Roboto version of those characters.

derat commented

I think that Roboto doesn't actually include those glyphs (at least, the versions that I've found don't seem to have them). I spent some time figuring out how to generate a font that just includes those two glyphs from Noto Sans, but then I decided the stars in Noto Sans are too pointy. For future reference, here's how to do it:

First, I downloaded Noto_Sans_Symbols_2.zip from https://fonts.google.com/noto/specimen/Noto+Sans+Symbols+2 to get NotoSansSymbols2-Regular.ttf.

Then, per https://stackoverflow.com/a/16674304, I wrote a FontForge script to drop all but two glyphs and generate WOFF and WOFF2 files:

#!/usr/bin/env fontforge
Open($1);
SelectAll();
SelectFewer(0u2605);
SelectFewer(0u2606);
DetachAndRemoveGlyphs();
Generate($2+".woff");
Generate($2+".woff2");
Quit(0);

And then I ran the script:

FONTFORGE_LANGUAGE=ff ./subset \
  NotoSansSymbols2-Regular.ttf \
  noto-sans-symbols-2-subset