[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [ft-devel] porting: Where should i start debugging
From: |
Werner LEMBERG |
Subject: |
Re: [ft-devel] porting: Where should i start debugging |
Date: |
Sat, 03 Mar 2018 09:22:24 +0100 (CET) |
[This is a moderated mailing list. Don't send messages again and
again! You should rather subscribe to the list.]
> I am porting freetype to a "bare or rtos" system. This system
> supports fat file system and has "malloc" family routines.
>
> Here is build log for this target:
> https://paste.ubuntu.com/p/rxQsMTmtZV/
>
> Here is build log on my pc, Ubuntu GNU/Linux:
> https://paste.ubuntu.com/p/DjNkvGHPg3/
This looks OK.
> Here is my test program:
> https://paste.ubuntu.com/p/Wm5hZtYt7p/
This has problems, see below.
> FT_Load_Char: error=6
> FT_Load_Char: error=6
> FT_Load_Char: error=6
> FT_Load_Char: error=6
> FT_Load_Char: error=6
> FT_Load_Char: error=6
>
> Where should I start debugging?
* Your `dump_bitmap' version only produces crap for bitmap fonts (the
original function in the sample code doesn't work either, BTW – I've
just added a comment to `example1.c'). Reason is that you don't
check the buffer format of `slot->bitmap->pixel_mode', which is
FT_PIXEL_MODE_MONO in this case (meaning 8 pixels per byte).
* `FT_Load_Char' doesn't work for `gbst16.pcf' as expected. Reason is
that this font is not encoded in Unicode (it is rather using GB2312
encoding), thus FreeType can't set up a cmap. In this case,
`FT_Load_Char' behaves like `FT_Load_Glyph', this is, it handles the
input character codes as glyph indices.
You have to manually convert input character codes to glyph indices
(for example, using `iconv'), then using `FT_Load_Glyph'.
Werner