Dimitar Zhekov escribió:
A question I don't know in advance, your Win driver uses the same extension ".fnt" as the GRX standard fonts. It can be a problem, will it?
Not at all. When loading a font, GRX attempts all font drivers in the order specified by _GrFontDriverTable, no matter the extension. For each driver, GRX attemps the name passed to GrLoadFont() first, name + driver extension next, and then, if name does not contain a path, GRXPATH + name and GRXPATH + name + ext. Not only GRX doesn't try to find a driver based on name extension, it doesn't even check if name contains an extension.
You are right, I have integrated your font drivers and they work ok, but I don't like really two different supported font formats in GRX with the same extension. Do you think .fnt is mandatory for the Windows fonts? can we chose another one?
I like the .fna format, it seems good to quick editing a font. It will be nice to have a function in GRX like
void GrDumpFnaFont(const GrFont *f, char *fileName);
and to have a doc describing the .fna format
Another question, for the Win driver to be usefull it will be nice if it extract the font from the .fon file, will be it harder?
Much harder. The .fon files are actually 16-bit MS Windows executables. Their full description is about 30KB, and they differ slightly from version to version. Moreover, they usually contain several fonts [one font in several different sizes], and there is no way to specify from GRX which of them should be loaded. Loading the first font is not acceptable, it is usually the smallest.
Ok, thanks, I understand
Actually, I can write a stand-alone utility that extracts all the resources from a MS Windows executable, albeit many such utilities already exist (the MS Windows resource editors, for example). That will be a much cleaner solution, and will also provide access to the .bmp, .ico, .cur and any other (.jpg for example) files contained in these executables. Want me to write such a tool? (N.B. MS Windows .EXE == .DLL == .FON == ...)
I think is not necesary (except if hundreds of people ask for them :-)
Another question, I will probably add a test program to show your three fonts, how do you want license they? Really fonts (except a few) are not part of GRX, so you can choose, the only condition: the fonts need to be redistributable, but it will be nice if they were under the X license (at least), so I can add they in the font subdir without a lot of advices.
Regards, M.Alvarez