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

Simplify font situation to make it possible to use vanilla JRE trees #4639

Merged
merged 2 commits into from Aug 28, 2016

Conversation

Projects
None yet
2 participants
@gohai
Contributor

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 some commits May 27, 2016

Decouple Editor fonts from JVM
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

This comment has been minimized.

Show comment
Hide comment
@benfry

benfry Aug 28, 2016

Member

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...

Member

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

This comment has been minimized.

Show comment
Hide comment
@gohai

gohai Aug 28, 2016

Contributor

Fingers crossed!

Contributor

gohai commented Aug 28, 2016

Fingers crossed!

benfry added a commit that referenced this pull request Aug 28, 2016

@benfry

This comment has been minimized.

Show comment
Hide comment
@benfry

benfry Aug 28, 2016

Member

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?

Member

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

This comment has been minimized.

Show comment
Hide comment
@gohai

gohai Aug 28, 2016

Contributor

It does indeed. Thanks a ton!

Contributor

gohai commented Aug 28, 2016

It does indeed. Thanks a ton!

@benfry

This comment has been minimized.

Show comment
Hide comment
@benfry

benfry Aug 28, 2016

Member

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

Member

benfry commented Aug 28, 2016

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

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