Skip to content

Conversation

@gohai
Copy link
Contributor

@gohai gohai commented Aug 28, 2016

This has only been lightly tested on OS X and ARM Linux. The createFont function could be also simplified in the future by mandating all custom files to be placed in shared/fonts.

Note: this still prints "Source Code Pro not available, resetting to monospaced" (and will change preferences.txt accordingly). This seems to be because the first createFont("SourceCodePro-Regular.ttf") only comes after the call to updateAppearance(). (The Source Sans Pro fonts are instead created & registered before the updateAppearance()).

Will be busy with real life the next week, but I can look some more into this next weekend!

gohai added 2 commits August 27, 2016 15:37
This makes it easier to run Processing with a custom or globally installed copy of the the VM, where before Processing wouldn't start because of missing fonts (font sadness).

This proposal would add a second copy of the fonts to the Linux tar-ball, and fall back to this one as a last resort. I have only tested registerFont() on Linux, where it seems to be working (Font in TextAreaPainter.updateAppearance does not fall back to monospaced).

On OS X this does not seem to work currently (UnsatisfiedLinkError: sun.font.FreetypeFontScaler.initIDs).
@benfry benfry merged commit ed2fe98 into processing:master Aug 28, 2016
@benfry
Copy link
Contributor

benfry commented Aug 28, 2016

Hopefully that "resetting" message is what I ran into before, and not realizing the source of the problem, I just backed out the registerFont() change. Working on a fix for that next...

@gohai
Copy link
Contributor Author

gohai commented Aug 28, 2016

Fingers crossed!

benfry added a commit that referenced this pull request Aug 28, 2016
@benfry
Copy link
Contributor

benfry commented Aug 28, 2016

Just checked in a change to ensure that the mono font loads. Can you try it and see if that gets rid of the "resetting" message?

@gohai
Copy link
Contributor Author

gohai commented Aug 28, 2016

It does indeed. Thanks a ton!

@benfry
Copy link
Contributor

benfry commented Aug 28, 2016

Great; that's a good sign, at least...

@github-actions
Copy link

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 15, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants