[PyOpenGL-Users] Re: Re: any font fns on the horizon? (in Linux)
Brought to you by:
mcfletch
From: Maciej K. <ma...@dg...> - 2003-09-21 17:43:52
|
On Sun, Sep 21, 2003 at 03:09:46AM -0400, mi...@na... wrote: > On Sun, Sep 21, 2003 at 12:06:54AM -0400, Maciej Kalisiak wrote: > > I would encourage you strongly to refactor this a bit, to make it a > > separate, stand-alone package, since it seems terribly useful and quite > > robust. It seems like little work. Not only separate it from BZEngine, > > but hopefully from pygame as well, to give it the largest application > > Patches welcome :) Heh. I won't have the time to do a complete, nicely polished package, but perhaps the stuff I do for my own project might be of use to whoever decides to go all the way. Is GLText.py code fairly stable now, or does it still change quite a bit. > Hinting is the process of tweaking a font's rendering a bit so stems of Ah, thanks. What is "escapement" then? Is it just the width of a glyph? > > I'm not too familiar with fonts in pygame, but my understanding is that > > it only handles truetype fonts at the moment. Do you know if adding > > support for general X11 fonts is in the plans, or even how hard a task > > that is? (Murphy's Law says that soon enough I'll find that I must have > > a given font, and it won't be .ttf... :) > > Well, GLText uses pygame's font capabilities, which is just a python binding > for SDL_ttf. SDL_ttf is a simple wrapper for freetype, so it will handle any > font format freetype can. This includes truetype, Postscript Type1, .pcf, > windows fonts, and probably more. Oh. So I just have to pass it the full path to a .pcf file? Just tried it; cool! Although when I tried it with helvetica, it seems it lacks metrics on ascenders because all the letters don't line up on the baseline, but are flushed to the top of the bounding box. Does this sounds like a GLText.py bug or something upstream in SDL_ttf? > The downside of using SDL_ttf is that it hides most of the glyph metrics stored > in the original font. The glyphs GLText stores will be padded to the font's > line height rather than stored in tightly fitting bounding boxes. Hmm, basically sounds like helvetica is NOT padded. I also tried "modd" font (character cell), and those were lined up. I guess the problem is only with proportional fonts (Utopia had the problem as well). I suppose it's not a big deal though.. these bitmapped fonts don't look nearly as nice as the scalable ones. -- "In a time of universal deceit, telling the truth is a revolutionary act." -- George Orwell |