Re: [openglean-devel]Font support.
Status: Beta
Brought to you by:
rkrolib
From: varol k. <var...@gm...> - 2005-09-17 19:38:03
|
Nice coincidence! As part of looking into using OpenGLEAN as a basis for a GUI I was also looking at way to use nice looking (antialiased + kerning) fonts. I think that everybody agrees that textured fonts are the way to go. Right now I have a way to automatically generate textured fonts from freetype2 (on the fly, precompute and embed into C source or save in a specialty format (subset of BDF + extensions)). Some questions that come to my mind are: 1. Do you want all the fonts to be embedded into OpenGLEAN (as they were in GLUT) or do you want to be able to provide external fonts as separate files? (I have mixed feelings about this, maybe a well-defined set of embedded fonts + ability to load extra) 2. Do you want any dependencies like freetype or do you prefer an all home-cooked solution with the minimal amount of external dependencies? (I assume you don't want external dependencies, right?) 3. Do you want to support stuff like Unicode, left-to-right or top-to-bottom scripts like chinese, arabic and japanese? (I would not, it is just too complicated to do right. But the API or internals can be designed to make it easy to implement later) Varol Kaptan P.S. I attached a test screenshot for amusement and the generated texture. The font is Vera at 16 pixel height. On 9/17/05, Richard Rauch <sf...@ol...> wrote: > I've been fiddling a bit with the gleanfonts genfonts program and > compile.sh which runs genfonts. >=20 > 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. >=20 > There are a few things on my mind: >=20 > * 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. >=20 > 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. >=20 > * 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. >=20 > 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". >=20 > * 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. >=20 >=20 > 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. >=20 > 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. >=20 > -- > "I probably don't know what I'm talking about." http://www.olib.org/~r= kr/ >=20 >=20 > ------------------------------------------------------- > SF.Net email is sponsored by: > Tame your development challenges with Apache's Geronimo App Server. > Download it for free - -and be entered to win a 42" plasma tv or your ver= y > own Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php > _______________________________________________ > openglean-devel mailing list > ope...@li... > https://lists.sourceforge.net/lists/listinfo/openglean-devel > |