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

Cannot use OTF as webfont #283

Closed
MatTheCat opened this issue Dec 28, 2017 · 16 comments
Closed

Cannot use OTF as webfont #283

MatTheCat opened this issue Dec 28, 2017 · 16 comments

Comments

@MatTheCat
Copy link

Following instructions on the README I generated font files I later tried to subset using pyftsubset, which led me to fonttools/fonttools#1134

When I try to load Roboto-Regular.otf or any subset Chrome tells me he failed to decode the font. However ots-sanitize tells me all is fine.

What's going on?

@RoelN
Copy link

RoelN commented Jan 9, 2018

The generated webfont is indeed rejected by Chrome with a Failed to decode downloaded font: ... message in the console.

It seems that removing the empty keys FamilyBlues and FamilyOtherBlues from CFF > CFFFont > Private results in a working OTF font after rebuilding it:

<FamilyBlues value=""/>
<FamilyOtherBlues value=""/> 

@anthrotype
Copy link
Member

Oh, that issue was fixed in ufo2ft last year, the patch is in since version 0.4.0
googlefonts/ufo2ft#115

Recompiling the fonts with updated ufo2ft should fix the problem.

The latest OTS no longer complains about these empty blues operators:
khaledhosny/ots@8f90e63

Should go away once Chrome/Firefox update their embedded OTS copy

@anthrotype
Copy link
Member

the solution suggested by @RoelN is quicker than recompiling the fonts from source. Just dump with ttx, strip those two empty values, and recompile with ttx.

@MatTheCat
Copy link
Author

MatTheCat commented Jan 9, 2018

If I understand there are in fact two issues at the same time:

  • google/roboto requires an outdated ufo2ft
  • Chrome/Firefox embed an outdated OTS

Is that right?

@anthrotype
Copy link
Member

correct

@MatTheCat
Copy link
Author

Should I open a PR to update requirements then?

@anthrotype
Copy link
Member

Should I open a PR to update requirements then?

it might not be so straightforward as other things may break, but you can try.

cc @m4rc1e

@MatTheCat
Copy link
Author

Indeed just requiring ufo2ft==0.4.0 breaks things.

ImportError: No module named makeotfParts

@anthrotype
Copy link
Member

related issue #239

@MatTheCat
Copy link
Author

Ouch guess I'll have to be patient.

@m4rc1e
Copy link
Contributor

m4rc1e commented Feb 6, 2018

Apologies for the delay.

I remember ufo2ft would set incorrect advance widths for glyphs made from components. We had to release and update the solve this. e2c5a2f

I think this has been fixed in ufo2ft. In the next release, I'll update the ufo2ft dependency.

@MatTheCat
Copy link
Author

Nice! Do you have any idea when this could be released?

@MatTheCat
Copy link
Author

@m4rc1e seems there is no more activity on this repository, has Roboto been moved somewhere else?

@m4rc1e
Copy link
Contributor

m4rc1e commented May 17, 2018

@MatTheCat We're actively working on it. Unfortunately these things take time.

@MatTheCat
Copy link
Author

No problem I understand; just wanted to make sure thanks.

@MatTheCat
Copy link
Author

I guess https://github.com/typenetwork/roboto is to be used instead.

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

No branches or pull requests

4 participants