freetype
[Top][All Lists]
Advanced

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

About freetype2 bitmap strike


From: ????????????
Subject: About freetype2 bitmap strike
Date: Mon, 2 Dec 2024 16:23:44 +0800

Hi:
    I use freetype2 to retrieve the bitmap data embedded in the 
font, Using FT_LOAD_SBIS_ONLY.
In the "simsun.ttf" font, some characters can be obtained while others cannot.
Use "FontForge" software to view that these characters all contain bitmap data.


for example:
    characters "??", its Unicode is 0x00A4??The bitmap data 
obtained using freetype2 is consistent with the bitmap data viewed using 
FontForge software.
As shown in the following figure.

    







    But, characters "A", its Unicode is 0x0041??Freetype2 cannot 
obtain bitmap data. But using FontForge software, it can be seen that there is 
bitmap data.

As shown in the following figure.








My test code??

int ft_error;

FT_Select_Size(face, 4);

ft_error = FT_Load_Char(face, 0x00A4, FT_LOAD_RENDER | FT_LOAD_SBITS_ONLY | FT_LOAD_MONOCHROME);

ft_error is 0;

 

ft_error = FT_Load_Char(face, 0x0041, FT_LOAD_RENDER | FT_LOAD_SBITS_ONLY | FT_LOAD_MONOCHROME);

ft_error is 6;




    I found that the error occurred in tt_stit_decoder_load_image 
function and returns NoBitmap. 

But use "FontForge" software open the "simsun.ttf" and view characters "A",We 
can see that it has bitmap data.

I don't know if this is a bug or some other reason, I hope to get your 
help,Thank you.




My freetype2 version is V2.13.0, and the attachment is the "simsun. ttf" font.







????????????
990087812@qq.com



 

Attachment: 2CCDF80B@DF7C495D.906E4D67.png
Description: Binary data

Attachment: 37610209@7DD6DD1F.906E4D67.png
Description: Binary data

Attachment: 32FF005B@6885052D.906E4D67.png
Description: Binary data

Attachment: 2.png
Description: Binary data

Attachment: simsun.ttf
Description: Binary data


reply via email to

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