Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add CFF2 support #175

Closed
blueshade7 opened this issue Sep 21, 2018 · 9 comments · Fixed by #193
Closed

Add CFF2 support #175

blueshade7 opened this issue Sep 21, 2018 · 9 comments · Fixed by #193
Assignees

Comments

@blueshade7
Copy link

Currently ots-sanitize can't recognize CFF2 fonts.

% ots-sanitize AdobeVFPrototype.otf
ERROR: no supported glyph shapes table(s) present
Failed to sanitize file!
@khaledhosny
Copy link
Owner

Hmm, good catch. I wonder how Firefox and Chrome are handling this, passing CFF2 table unsanitized?

@khaledhosny
Copy link
Owner

I’m told that Apple does not support CFF2 table, so as such not usable on the web, making it a low priority for now.

@madig
Copy link

madig commented Dec 16, 2018

Firefox 64 seems to just refuse to load CFF2 VFs.

@behdad
Copy link
Contributor

behdad commented Dec 16, 2018

@jfkthame @drott

@jfkthame
Copy link
Collaborator

Yeah, Firefox doesn't currently accept CFF2 webfonts; it just hasn't become a priority yet. In particular, without support in macOS, it seems of limited value.

@drott
Copy link
Contributor

drott commented Jan 31, 2019

OTS is not opened up for CFF2 yet in Chromium - but I should do that. We always have FreeType as a fallback backend and choose it when needed.

@cjchapman
Copy link

I thought that this line would prevent the ERROR: no supported glyph shapes table(s) present message for a CFF2 font:

ots/src/ots.cc

Line 712 in dc36d4d

if (font->GetTable(OTS_TAG_CFF) || font->GetTable(OTS_TAG('C', 'F', 'F', '2'))) {

...and yet I still see it with OTS 7.1.9:

cchapman-macOS:OTF cchapman$ ots-sanitize --version
ots 7.1.9
cchapman-macOS:OTF cchapman$ ots-sanitize AdobeBlackVF.otf
WARNING: STAT: Unexpected non-zero offsetToAxisValueOffsets
ERROR: no supported glyph shapes table(s) present
Failed to sanitize file!
>>> font = TTFont('AdobeBlackVF.otf')
>>> font.keys()
['GlyphOrder', 'head', 'hhea', 'maxp', 'OS/2', 'hmtx', 'cmap', 'name', 'post', 'BASE', 'CFF2', 'GSUB', 'HVAR', 'STAT', 'VORG', 'VVAR', 'fvar', 'vhea', 'vmtx', 'DSIG']

@khaledhosny
Copy link
Owner

That would have effect if either the CFF2 was sanitized (which OTS does not support yet) or was one of the “passthru” tables (by default we don’t passthru any table, but clients can add tables they are sure don’t need to be sanitized).

@khaledhosny
Copy link
Owner

#193 adds CFF2 support, code review and/or testing is appreciated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants