freetype-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [ft-devel] GF's cmap fails


From: Werner LEMBERG
Subject: Re: [ft-devel] GF's cmap fails
Date: Mon, 13 Aug 2018 07:38:58 +0200 (CEST)

>>   ./ftview -e "" 20 cmr10.600gf
>>
>> only shows `A' glyphs.  [...]
> 
> Ok. Currently the GF's cmap is like, the first glyph in the file is
> indexed to 0, and so on.  So in cmr10.600gf, `ABCD...' appear first
> so they are now indexed from `0,1,2..'

This is correct.

> what happened previously is the glyphs were indexed according to
> their charcode values extracted from the `char_loc' command and this
> was the order `ΓΔΘΛΞΠ...'.  I have properly set the encoding values,

Obviously not.

> [...] Other options with `-e' except `-e "" ' are giving proper
> output.

Not at all.  They always show the font without any cmap applied,
because there isn't a cmap with the tag you are specifying at the
command line.  As soon as you will have implemented a Unicode cmap,
`-e unic' will work also.

> Any specific reason why `-e "" ' is failing so that I can fix it?

Set a break point at `FT_Get_Char_Index' and check the return value.
For example, the function returns 0 if argument `charcode' is zero.
This is wrong, of course, since it should return value 52 (which is
the glyph index of glyph `Γ').  Character code 1 should be mapped to
glyph index 53, code 2 to index 54, etc., etc.


    Werner

reply via email to

[Prev in Thread] Current Thread [Next in Thread]