On Sun, Jan 4, 2009 at 12:55 PM, Bill Kendrick <nbs@...> wrote:
> On Sun, Jan 04, 2009 at 07:45:46PM +0100, Karl Ove Hufthammer wrote:
> > Sundag 4. januar 2009 skreiv Bill Kendrick:
> > >Now, how to ask Pango to use a specific font... that's
> > >always been a mystery to me. (At least via the SDL_Pango API)
> > TuxMath/TuxType2 seems to manage to do it (and use the Andika font).
> Ok. To David & Tim -- it sounds like you're able to specify a TTF for
> SDL_Pango to us when rendering text. Is this true? What's the trick? :)
It's a mystery to me as well - it is a case of blind squirrels finding
acorns. I don't think any of our code does this intentionally. We have
tuxmath and tuxtype set up so the only files that know about SDL_Pango are
"SDL_extras.c/h". Anything that does this would have to be in there.
On a related note, I haven't even found a good way to specify font sizes
with SDL_Pango. Tuxtype has a hackish workaround to do this by resetting
dpi so the "normal" font size comes out at the desired size. The SDL_Pango
docs seem to say that we are supposed to set sizes by embedding html-style
tags into the strings to be rendered, which seems cumbersome.