Closed CAMOBAP closed 1 year ago
@CAMOBAP the original reason of adding #129 is to allow installing these fonts:
https://github.com/googlefonts/noto-cjk/releases/download/Sans2.004/02_NotoSansCJK-TTF-VF.zip
Variable/OTC/NotoSansMonoCJK-VF.ttf.ttc
: This is an all-in-one font that supports all 5 languages and all 3 styles (bold, regular, medium)Variable/OTC/NotoSansCJK-VF.ttf.ttc
: all 5 languages and 7 styles.https://github.com/googlefonts/noto-cjk/releases/download/Serif2.001/03_NotoSerifCJK-TTF-VF.zip
Variable/OTC/NotoSerifCJK-VF.ttf.ttc
: all 5 languages and 7 styles.All the other TTF fonts are OK to include in the Formula but these 3 files are the requested "Variable OTC" fonts, which allow a font collection to share font glyphs with multiple internal fonts so as to reduce total font size.
@ronaldtse maybe you can suggest some CLI tool for browse/query ttc files?
Have you tried otfinfo?
Have you tried otfinfo?
It reports "NotoSerifCJK-VF.ttf.ttc: not an OpenType font (bad magic number)" and I have checked --help
there also no relevant options
@ronaldtse nevermind, the easiest way is just to use our own fontist create-formula [URL]
)
@CAMOBAP the original reason of adding #129 is to allow installing these fonts:
https://github.com/googlefonts/noto-cjk/releases/download/Sans2.004/02_NotoSansCJK-TTF-VF.zip
- Sans Mono:
Variable/OTC/NotoSansMonoCJK-VF.ttf.ttc
: This is an all-in-one font that supports all 5 languages and all 3 styles (bold, regular, medium)- Sans:
Variable/OTC/NotoSansCJK-VF.ttf.ttc
: all 5 languages and 7 styles.https://github.com/googlefonts/noto-cjk/releases/download/Serif2.001/03_NotoSerifCJK-TTF-VF.zip
- Serif:
Variable/OTC/NotoSerifCJK-VF.ttf.ttc
: all 5 languages and 7 styles.All the other TTF fonts are OK to include in the Formula but these 3 files are the requested "Variable OTC" fonts, which allow a font collection to share font glyphs with multiple internal fonts so as to reduce total font size.
@ronaldtse there are no listed styles in "Variable/OTC" but they are available in "Super/OTC"
Here I attached "super" formulas and committed "Variable/OTC" once, could you please have a look:
I think we should switch to "Super/OTC"
@ronaldtse there are no listed styles in "Variable/OTC" but they are available in "Super/OTC"
I suppose that's because the create-formula
command does not support "Variable" fonts. On FontBook I do see all fonts/styles:
e.g. NotoSerifCJK-VF.ttf.ttc
Nevermind, let's use the Super OTC, but do not close the Variable OTC issue. The difference between Variable OTC and Super OTC is the size. In Variable the glyphs can share common building blocks. In Super the common parts of the glyphs are duplicated.
Therefore the Variable TTC (NotoSerifCJK-VF.ttf.ttc) has size 62.1MB, but the Super TTC (NotoSerifCJK.ttc) has size 169.5MB (>3x as large).
It seems that there the only available tool to read TTC is FontTools in Python, which comes with the ttx
command that converts fonts into the TTX XML format. However, there is no easy way to inspect a given font, a script like this needs to be written:
So while it is possible to write an inspector using FontTools, it might be a distraction for us right now. Let's do the Variable OTC in the future, when we have more time.
129