jimc
June 27, 2014, 11:39am
1
Using a TTF font in JUCE:
The left hand side is my computer (latest Mavericks). The right hand side someone elses (10.6.8).
I'm doing:
tfLabel = Typeface::createSystemTypefaceFor(BinaryData::RobotoThin_ttf, BinaryData::RobotoThin_ttfSize)
Then:
Font textFont = Font(laf->tfLabel).withHeight(17.0);
g.setFont(textFont);
Any obvious idea why one of them looks rubbish?
dave96
June 27, 2014, 12:13pm
2
Is yours a retina display? Which rendering engine are you using?
jimc
June 27, 2014, 12:28pm
3
Not retina and mmm, what ever the default is.
Seems to also be affecting the system font although more subtle as its' wider (look at Level and Time).
What are the screen resolutions of each system?
Rail
jimc
June 27, 2014, 8:13pm
5
The good one is on a 30" cinema at 2560 × 1600. But it also looks good on my MacBook Air (non-retina) 1440x900.
I'll find out what Oli was using for the rough looking ones. (The answer is 1920x1200).
It's not a consistent problem either. It's gone away today apparently with the same binary on the same system. Another test system has also produced the problem though...
I'm collecting some more data...
jimc
June 29, 2014, 6:29pm
6
Okay, so I'm completely stumped. Let me try the easy question - has anyone ever seen this problem before? :)
jules
June 29, 2014, 6:32pm
7
Sorry, no idea - the one on the right doesn't look like OSX rendering, or the juce software renderer. Maybe something odd about 10.6, but I've not seen it before.
dave96
June 30, 2014, 1:29pm
8
Just a thought, is this a plugin? Are you both usng the same host/version?
jimc
July 2, 2014, 7:25am
9
Dave - just getting into this question. Might be Logic X related...
jimc
July 2, 2014, 10:32am
10
Ok - looks like it is. Why does it look different in Logic? I'd assumed, naively, that it'd render the same in different hosts on the same system...
giku
February 23, 2015, 6:59am
11
Add
CGContextSetAllowsFontSmoothing(context, true);
just below
CGContextSetShouldSmoothFonts (context, true);
in
CoreGraphicsContext juce constructor
jules
February 23, 2015, 9:47am
12
Wow.. So they have three similar-but-not-quite-the-same methods for disabling anti-aliasing..?? Nasty.
Thanks for the heads-up on that, I'll add that to the code. So now we have to do all this crap:
CGContextSetShouldSmoothFonts (context, true);
CGContextSetAllowsFontSmoothing (context, true);
CGContextSetShouldAntialias (context, true);
..just to have anti-aliased font rendering!
jimc
February 27, 2015, 4:23pm
13
I do hope that makes things look HOT in logic again ... :)