-
Notifications
You must be signed in to change notification settings - Fork 8
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
remove Snooty "font tweaks" #46
Conversation
aae3031
to
a9826bf
Compare
I just added updated plugin screenshots for everything except BO (they have all changed, even those with recent captures) to the I'm sure there is an inevitable bit of variation between how platforms render fonts and there surely are in the other plugins, but it's probably more subtle with aliased fonts. A pixel of difference might be like fighting the tide, but I don't know, I also know it matters in some cases. My thinking is we could either play with things like 11 pixel heights or 13 pixel heights for the text controls and see if the odd vertical are renders more matched, or reintroduce a bit of font tweaking (though I think there's probably a better way to do it than some of the questionable ways that I came up with before, like just actually adjusting the region vertically at creation, rather than fudging the draw region for each draw event). What do you think? |
I agree it's pretty much hopeless for "normal" fonts to get the cross-platform rendering identical. For a pixel font that we control it seems like it should be doable, though? It's possible that it's an issue with the font itself:
Otherwise, I think tweaking the position by 1 pixel on windows (at creation time) seems like a pretty reasonable option, mainly for the cases where the positioning is really tight in the UI (like my screenshot). At least we don't have cut off text any more, so now we're really just in the polish zone... |
OK, I pushed new TTFs in 2fa778c with these changes (which I think are improvements regardless of whether they fix the spacing here). Appearance doesn't change for me. If this moves the font down a pixel for you then that would be good, since then our rendering agrees. Otherwise creation-time tweaks? |
The new version of Snooty actually changes horizontal spacing slightly, and only in good ways (there were a gaps between characters that I now see had an extra pixel of gap between them, and now they don't). No vertical change, though. So I added a somewhat-better-formulated vertical placement hack for windows to push Snooty up by one pixel. How does this look for you? DGHelpBox got uglier than I wish but what you gonna do... |
Ah but now, I guess with the new version of the font, the single pixel of cropping at the top now is back when in text edit mode. I'm not sure if I care anymore at this point... 😞 |
…el widget regions with it (11 seems to be the minimum to avoid descenders being truncated)
c48d0d7
to
6b53558
Compare
696e42a
to
83ab857
Compare
Cool! I squashed your last commit down in the previous one and shall merge. Regarding my discouragement with text edit upward bounce cropping on Mac, I think my appetite for weird platform hacks is lower than when I originally added this stuff, and now I see that I kinda don't wanna futz further because I feel like those are the kind of things that can change from OS version to version, or library (VSTGUI) version to version, and being in that maintenance business is tedious. And while it looks bad, it doesn't really present any functional usage challenge. I'm more inclined to file a bug on VSTGUI and see if they find that maybe they're doing something wrong causing the vertical scoot when entering text edit... |
Alright I spent some time deconstructing the Snooty font tweaks, why they were needed, what they did, super advanced math measuring pixel positions and whatnot, because I thought you were probably right they we should just offload whatever layout requirements to the client code. The crux of the remaining font tweaks came down to two things:
So if we just always give Snooty 12 pixels of height in which to draw, it's happy and all of the hackz become unnecessary. At least on my Mac. I have opened this pull request to give a holding pen for you to see whether this approach is also working okay for you on Windows!