Hi,

the font API has changed in DirectFB this weekend. What used to be

  surface->DrawString (surface, text, x, y, flags);

has become

  surface->DrawString (surface, text, bytes, x, y, flags);

and 

  font->GetStringWidth (font, text, &width);

became

  font->GetStringWidth (font, text, bytes, &width);

The integer variable "bytes" allows to specify the number of bytes to use
from the character array "text". Both functions allow to specify -1 and
interpret it as "use the complete NULL-terminated string". The advantage
of this approach is that you can draw parts of string or non-NULL-terminated
strings without the need to copy the string.

Accompagning this change support for UTF-8-encoded strings was added. 
This means that, assuming you use a font that has the appropriate glyphs,
DirectFB is able to draw strings in almost all languages. Current DFBPoint 
from CVS gives a good example of how to add support for other encoding at 
the application level. 

      
Salut, Sven


-- 
Info:  To unsubscribe send a mail to [EMAIL PROTECTED] with 
"unsubscribe directfb-dev" as subject.

Reply via email to