Noto Sans CJK support
See original GitHub issueI notice a few bugs (#188, #139) citing Chinese is not supported. Fair enough, but do you know of any JS libraries supporting CJK? (I came across https://github.com/kekee000/fonteditor-core some time ago, but found it a bit buggy… and writing a new ttf very difficult to achieve without understanding everything about ttf).
This fault raises how all the otf fonts generated for the CJK project (https://github.com/googlei18n/noto-cjk) all seem to have glyph issues, particularly reporting ‘unknown operator’ errors, eg:
Glyph 14336: unknown operator 2 Glyph 15196: unknown operator 0 Glyph 15254: unknown operator 16
when reading the glyph’s CFF path.
The error’s source seems to be in parseCFFCharstring
line 4258.
This is a sample otf that is failing: https://github.com/googlei18n/noto-cjk/blob/master/NotoSansTC-Light.otf
As I was trying to assist in generating this report, I looked up the referenced link in the source (https://www.microsoft.com/typography/OTSPEC/charstr2.htm), to find information about these operators… but all 3 are listed as --Reserved–, which I realise is very unhelpful indeed, although https://www.microsoft.com/typography/otspec/cff2.htm#section13 does hint at operator#16 being a ‘blend’ operator:
D5. CharString Data
Type 2 CharStrings must not contain a value for width: a CFF2 table does not contain any CharString width data.
The CharString operator set is extended in the CFF 2 format to include the vsindex and blend operators. These work as described above in section 13. OpenType Font Variations Extensions, but have different operator codes. The CharString operator code for blend is 16, and 15 for vsindex.
For CFF2 tables, the fill rule for CharStrings must always be the nonzero winding number rule, rather than the even-odd rule. This is required for Font Variations support, as CFF 2 variable fonts will have glyphs with paths that overlap. Even for Western fonts, it is difficult to design source master fonts that are blend-compatible without overlap; for ideographic fonts, this is prohibitively difficult.
(I’m not sure how helpful at all this last information is)
Issue Analytics
- State:
- Created 7 years ago
- Reactions:3
- Comments:7 (3 by maintainers)
Top GitHub Comments
I’ve added support for CID-keyed fonts in 0.7.0 and I don’t get the parsing bugs anymore for
NotoSansTC-Light.otf
.@edouard-lopez perhaps you want to do some additional testing and let me know if we can close this issue? The previewer at opentype.js.org is updated to the latest version.
Thanks, though the credit mostly goes to @tshinnic who did the bulk of the work. 😄