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

x/mobile/font: Default font fail on MacOS and iOS #16025

Open
antoine-richard opened this issue Jun 9, 2016 · 0 comments

Comments

@antoine-richard
Copy link

commented Jun 9, 2016

Hello,

  1. What version of Go are you using (go version)?
    I'm using Go version 1.6.2 and Gomobile version +c435d0b
  2. What operating system and processor architecture are you using (go env)?
    I'm on MacOS (darwin / amd64)
  3. What did you do?
    I'm trying to use the Default system font on MacOS and iOS (gomobile).
    The complete program can be found here: https://github.com/antoine-richard/gomobile-text
    See this line: https://github.com/antoine-richard/gomobile-text/blob/master/game.go#L47
  4. What did you expect to see?
    I expect to see the Default font being used.
  5. What did you see instead?
    I'm getting the following error: freetype: invalid TrueType format: bad maxp length: 6 on both MacOS and iOS when using the Default font.
    The monospace font works on these OSes.
    The default font works on Android.

I've found 2 issues mentioning the same kind of problem: #10644 and #10136

Also the test on default font fails on MacOS:

--- FAIL: TestLoadFonts (0.02s)
    font_test.go:41: default font: not a TTF: missing "glyf" table
FAIL
exit status 1
FAIL    golang.org/x/mobile/exp/font    0.035s

Is there a way to use the default font on Darwin?
Is there any known workaround?

Thank you
Antoine

@quentinmit quentinmit added this to the Unreleased milestone Jun 17, 2016

@gopherbot gopherbot added the mobile label Jul 20, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.