[openglean-devel]Font support.
Status: Beta
Brought to you by:
rkrolib
From: Richard R. <sf...@ol...> - 2005-09-17 07:19:41
|
I've been fiddling a bit with the gleanfonts genfonts program and compile.sh which runs genfonts. One thing that I've more or less decided, for the near term, is to try to fill out a a fairly useful set of basic fonts at various uniform sizes, with bold, italic, and bold-italic versions at each resolution. There are a few things on my mind: * Eventually, I want to redo the font API to work in model space for all fonts. (Bitmapped fonts will then become textures.) At that point, only a few actual font sizes would be built into the library (probably about 3 sizes), with mipmapping. Since the bitmapped fonts are presently blitted into the graphics area, however, I think that a large set of sizes is presently called for. This is just a heads-up both about the addition of new sizes coming soon and that those sizes will likely be replaced by textures. * It turns out that using the genfonts program, some fonts (e.g., TimesRoman) are available in "italic" form but not "oblique", while others (Helvetica) are in an "oblique" form but have no italicized version. The difference between italics and obliques is that obliques are just slanted, while italics tend to be a little curly. I am undecided if I should try to retain the two different modes. Opinions? I'm inclined, for simplicity's sake, to use italicized typefaces where I can, and where no italics exist, use obliqued typefaces and just call them "italics". * Italics and obliques, by virtue of slanting, bring a new aspect into issue. In most fonts, you have an origin of the letter and a distance to advance the origin (cursor) after rendering---but the character is permitted to use some space to the left of the letter. Basically, italics and slanting can mess up horizontal spacing. The upshot is that adding new fonts to the library should be difficult, but making a good API for using the fonts properly will bring some new issues. For today, I am content to expand the font set, and I already planned to overhaul the API anyway. But I thought that I'd toss this out for anyone to discuss. -- "I probably don't know what I'm talking about." http://www.olib.org/~rkr/ |