[haiku-appserver] BFont ServerFont implementation, GetHasGlyphs()

  • From: Korli <korli@xxxxxxxx>
  • To: haiku-appserver@xxxxxxxxxxxxx
  • Date: Tue, 19 Jul 2005 23:00:32 +0200


I tried to have GetHasGlyphs working and went through several issues :

* how a BFont is identified server side : should there be a ServerFont object for every BFont ? If not, a lot of BFont properties have to be sent server side for most FT computations. Is this the way to go ?

* BFont is using a Encoding()/SetEncoding() scheme, which makes me think methods can accept character string in a non utf8 encoding. What are we supposed to do ? (convert_to_utf8 client side, server side, let FT know the encoding and handle) (the last point implies we pass a complete character string to FT)

* ServerFont is sometimes implemented with this kind of code, which is wrong :
for (int i = 0; i < numChars; i++) {
FT_Load_Char(face, charArray[i], FT_LOAD_NO_BITMAP);

nth char of charArray isn't charArray[i]. I would go with a next_utf8_char() if we were sure about the UTF8 encoding.

* GetHasGlyphs needs to know when a glyph is available for a character : do I have to call FT_Load_Char(face, charArray[i], FT_LOAD_NO_BITMAP); and check for the return value ?



Other related posts: