[PyOpenGL-Users] Re: any font fns on the horizon? (in Linux)
Brought to you by:
mcfletch
From: Maciej K. <ma...@dg...> - 2003-09-21 04:06:57
|
On Sat, Sep 20, 2003 at 09:08:18PM -0400, mi...@na... wrote: > I wrote a relatively simple but effective "GLText" module for pybzengine. > It's texture based, generally produces nicely hinted output, and has some > Unicode support. > > No documentation, but there is LGPL'ed source at > http://navi.picogui.org/svn/misc/trunk/pybzengine/BZEngine/UI/GLText.py Wow, very nice! I just took it for a spin. A bit of tweaking to disentangle it from rest of BZEngine, but works like a charm now. I like that this approach uses multiple textures per font; texfont was limited to a single texture per font. 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 area. I think pygame could be used to generate the fonts as a standalone utility, just like in genfont in "texfonts", which could then be pickled for use in apps which don't want to import pygame (e.g., in my stuff I'm trying to limit the number of packages it relies on...). I'm not super familiar with fonts. Could you elaborate a tiny bit on some of the terms you use in the head comment in GLText.py? I'm wondering about the full meaning of "proper hinting" and "escapement". 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... :) -- "If you sit down at a poker game and don't see a sucker, get up. You're the sucker." |