Has the font rendering code changed in the last few months?


I just synced to the latest GIT tip, and my plugin looks different. The bold fonts seem a bit…different. Has something changed about the default rendering? Is there some way to control how things are rendered? Sorry about the amorphous question - I don’t know that much about the font rendering system in Juce.


Sean Costello

Yes, it’s been completely rewritten! If you’re on a mac, it’ll be using CoreGraphics to render the fonts. If you’re on windows, it’s using a better path rasteriser with more accurate positioning.

How about adding PDF export, now that you’ve got your hands dirty with rendering?

This would fill a hole in an otherwise quite allround framework.

I tried to create a PDF export five or six months ago, by modifying the LowLevelGraphicsPostScriptRenderer using the stuff at http://libharu.org/ and I got to a point where I was able to produce PDFs with line drawings and text, the text actually being represented as line drawing.

I didn’t take it further at that time because it didn’t seem worthwhile to sort out the details of image formats and the limitations of the PDF format for transients, alphas etc. as long as there was no means of font based text rendering, so the PDFs I’d be able to chunk out for real documents would be kind of heavy.

The recent changes broke my code - but I think they also might have created a possibility for doing a proper PDF export. And, not to belittle a framework that has saved me lots of work, Juce does need this, to earn its claim of being general purpose - the lack of printing excludes a rather large range of applications from being written in Juce.

Could we perhaps get this in place by some kind of joint effort???

Yes, I’m aware of the need for printing support, and certainly a PDF renderer would be great. Haven’t got much time to dedicate to it, but would be happy to help out.

Ideally it’d be better to do it without using a 3rd party library though, just because of the hassle of having to embed the code somehow… I don’t know much about the PDF format though, or how hard it is to generate.

I’m noticing the fallback font isn’t working anymore on the mac.(Broke somewhere around the mac rewrite). I get rectangular little squares on my glyphs that aren’t in the current font(TableListBox). Other than put a breakpoint on the point where its supposed to lookup the fallback font(which is never hit) I haven’t investigated further. Just thought i’d mention it, and when I have more time i’ll debug it a little more. :smiley:

I also noticed this


Ahhh yes…tnx cxhawk, I thought I had remembered reading that :wink: