Quoting Lee Brown <[EMAIL PROTECTED]>:

> Hmm... how would you make the following three functions happen?  
> 
> fnt_font_t fntInitFTFont(FT_Face ftface); 
> fnt_font_t fntInitXFont(XFont xfont); 

IMHO you'd have to define a ggi_font struct (or fnt_font) which abstracts
underlying font systems.

Then the two functions merges into something like:

ggi_font_t fntInitFont(const char * font,....)

where font describe a set of requested attributes (like : scalable?,
name,slant,...), just like ggi_mode.

> int fntPrintChar(ggi_visual_t vis, fnt_font_t font, uint32 char_code,
> sint32 x,sint32 y); 

Simply(?!) calls the appropriate backend.

It needs to be properly designed (font attributes,...) but that's the
'clean way'.

Regards.

Reply via email to