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

Surge XT Font rendering issues for slider labels and routing bar on Windows #4856

Closed
VincyZed opened this issue Aug 17, 2021 · 9 comments · Fixed by #5012
Closed

Surge XT Font rendering issues for slider labels and routing bar on Windows #4856

VincyZed opened this issue Aug 17, 2021 · 9 comments · Fixed by #5012
Labels
Before Beta If these are open we can't really call ourselves beta Bug Report Item submitted using the Bug Report template Rebuild With JUCE Issues pertaining to porting Surge from VSTGUI to JUCE UI Issues related to UI look&feel
Milestone

Comments

@VincyZed
Copy link
Collaborator

Surge XT on the left and 1.9 on the right.
image

I think that in 1.9 the font used on Windows changes from 130 something % zoom level to that clearer font on the right. However, it doesn't on XT, and it looks a bit more pixelated (and a bit harder to read to a certain extent).

We've discussed this over on Discord a couple of days ago. Here's the first message's link:
https://discord.com/channels/744319641211633774/744324663383031821/874758651448029215

@VincyZed VincyZed added UI Issues related to UI look&feel Bug Report Item submitted using the Bug Report template Rebuild With JUCE Issues pertaining to porting Surge from VSTGUI to JUCE labels Aug 17, 2021
@VincyZed VincyZed added this to the Surge XT 1.0 milestone Aug 17, 2021
@mkruselj
Copy link
Collaborator

Yeah JUCE font renderer is just different. It might be a live with it.

@baconpaul
Copy link
Collaborator

So now I know why I didn't see this

Here's mac XT v 1.9 side by side VSTGUI vs Juce at 150%

Screen Shot 2021-08-17 at 9 29 08 PM

@baconpaul
Copy link
Collaborator

XT dies look a smidge smaller though. When I copy "Sync" from XT over to 1.9 with preview and line up the lines I see this:

Screen Shot 2021-08-17 at 9 31 53 PM

So I wonder if "9pt lato" in vstgui uses a different size than "lato with px height 9" in juce. lemme noodle a bit.

@VincyZed
Copy link
Collaborator Author

@baconpaul So I tested with 9.5 as you requested, and at least on my side it makes 0 difference to the font size (I compared side-by-side screenshots and they're the exact same). I had to bump it to 10 to see the font increase, and now it's definitely a little too big imo:
image

No difference between 10 to 10.5 either. Looks like it's integer only?

@baconpaul
Copy link
Collaborator

Huh wow ok so windows is definitely different than mac! I’ll look into what juce is doing

thanks for trying

@baconpaul
Copy link
Collaborator

So in https://forum.juce.com/t/codeeditorcomponent-windows-linux-broken-6-0-8-6-1-including-in-projucer-and-demorunner/47565/19.

Find out that system fonts on win use a D2D path and ttf do not

so one solution here is probably to

1: reinstate the Lato font install in the windows installer and
2: use that system font and render path if it is installed bu5 fall back to memory if not

Mac and Linux don’t have this bifurcated path

@mkruselj
Copy link
Collaborator

mkruselj commented Sep 6, 2021

Doing return juce::Font("Lato", size, style).withPointHeight(size); in RuntimeFont.cpp yields this (JUCE right, VSTGUI left):

image

So we have the font drawing to match like that.

@baconpaul
Copy link
Collaborator

So the fix is

install lato in the windows installer
If you can use it from os, do so
If you can’t fall back to memory

@baconpaul baconpaul added the Before Beta If these are open we can't really call ourselves beta label Sep 6, 2021
baconpaul added a commit to baconpaul/surge that referenced this issue Sep 7, 2021
JUCE uses GDI for memory fonts and D2D for OS fonts
so install Lato and detect if it is there and use that
rather than memory font on Win to improve font rendering
of Lato labels on Win. Noop on mac/lin.

Closes surge-synthesizer#4856
@baconpaul
Copy link
Collaborator

got it. pr in.

baconpaul added a commit that referenced this issue Sep 7, 2021
JUCE uses GDI for memory fonts and D2D for OS fonts
so install Lato and detect if it is there and use that
rather than memory font on Win to improve font rendering
of Lato labels on Win. Noop on mac/lin.

Closes #4856
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Before Beta If these are open we can't really call ourselves beta Bug Report Item submitted using the Bug Report template Rebuild With JUCE Issues pertaining to porting Surge from VSTGUI to JUCE UI Issues related to UI look&feel
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants