freetype
[Top][All Lists]
Advanced

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

[Freetype] 答复: [Freetype] A question about font effect


From: 王毅
Subject: [Freetype] 答复: [Freetype] A question about font effect
Date: Mon, 16 Jul 2001 10:33:11 +0800

Werner:

Now I use ftc_image_flag_no_sbits to avoid this problem because sfnt->load_sbit_image won't be called any more. And which kind of input file do you want? A picture or a data file or a EXE file? I think the behaviour is very simple and I stated it clearly.

Now I have another very serious question about embedded font of PDF. I list some examples as below and hope you can give me an answer, thanks.

In these examples, I use the same way to display characters used embedded font as common font file, except FT_New_Memory_Face() function is called instead of FT_New_Face() function.

(1)About Embedded Type1 Font
After initialized the font face through FT_New_Memory_Face() function, I called FT_Get_Char_Index() function to get the glyph index(m_ftFace->charmap->encoding = ft_encoding_unicode). I found that sometimes I got the correct index but sometimes I got the wrong index:

        when uCode = 0x21, FT_Get_Char_Index() return 1, correct.
        when uCode = 0x22, FT_Get_Char_Index() return 2, correct.
        ......
        when uCode = 0x26, FT_Get_Char_Index() return 6, correct.
        when uCode = 0x27, FT_Get_Char_Index() return 0, wrong!

I debugged it and found the return value depended on an array -- names_to_unicode[](in pstables.h). Can you tell me why the array is defined as below:

static const unsigned short  names_to_unicode[1033] =
{
    0,
    0x0020,
    0x0021,
    0x0022,
    0x0023,
    0x0024,
    0x0025,
    0x0026,
    0x2019,(--??????)
    0x0028,
    ...
}

(2)About Embedded TrueType Font
When displaying a character with embedded truetype font which use built-in encoding in PDF, I find that the font face's charmap is NULL. In fact, the font face has two charmaps, one's encoding is ft_encoding_apple_roman, the other is ft_encoding_symbol. Because there is no ft_encoding_unicode, the font face's charmap is set to NULL.

So I can't use FT_Get_Char_Index() funtion to get the glyph index, please tell me how to solve this problem, thanks very much.

Jacky/2001/7/16

> When the font size is under 15 point, the glyph that I got through
> FTC_Image_Cache_Lookup() function is to be a black square. And when I
> zoom in the font size, the glyph that I got is ok.

This looks like a bug.  May I ask that you provide a very simple input file which shows the incorrect behaviour?

BTW, it may took a while until this is fixed since we all deserve some vacation...


    Werner


reply via email to

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