Density-Independent Font Resolution

Does anybody use nvgFontSize? I got a bug report about it not rendering properly on 4K monitors: https://github.com/Miserlou/RJModules/issues/41

Any ideas?

I use them all the time. 32 seems “big” (with open fonts like roboto and lato a size more like 12 to 16 seems to fit my panels).

One thing you could do, though, is check the bounds of the font at the size you have in case your ttf file is odd (I don’t know enough about ttf to know if there could be some device-dependence inside it; but I do know that the MacIntosh high res display code is way more sensible than the windows code for pixel scaling so if your TTF is wierd perhaps that is why you are at 2x render size on windows).

There’s an example of me using text bounds to lay out some stuff. Basically same call as nvgText just with an extra float* - so you could call that and pick your font to fit your available pixel space I guess? Just a thought.

1 Like

Thanks for your reply!

Man, I just discovered Surge VCV yesterday (I was already a fan of the VST), and some of the modules really rip! The EQ is now part of my regular line up and I’m having fun exploring the rest!

1 Like

Cool. Well should be some good new stuff coming to both the vcv and the vst over the summer and into the fall. Glad you find them useful! And - since you are a developer - if you ever want to help with the project we have plenty of open issues :slight_smile: