freetype
[Top][All Lists]
Advanced

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

Re: [ft] get all glyphs


From: dudasl
Subject: Re: [ft] get all glyphs
Date: Mon, 8 Apr 2019 23:36:52 +0200

Hello Thomas,

>From documentation about FT_Get_First_Char:

Return the first character code in the current charmap of a given face, ...

This mean you get only trough glyphs in current charmap. Try use
FT_Load_Glyph.

- Laco.

-----Original Message-----
From: Freetype <address@hidden> On
Behalf Of Dryden, Thomas
Sent: Monday, April 8, 2019 22:56
To: address@hidden
Subject: [ft] get all glyphs

I'm attempting to extract all glyphs from a TTF in order to create a table
of each glyph's width. I'm using a Chinese TTF, that reports it has 36k+
glyphs (via face->num_glyphs). When I use the following code, I only get 497
glyphs. Clearly, I'm doing something wrong... Any ideas?

Thanks,
-Thomas

        charcode = FT_Get_First_Char( Face, &gindex );
        while ( gindex != 0 )
        {
            printf("count: %d, charcode: 0x%X, gindex: %d\n", count,
charcode, gindex);
            charcode = FT_Get_Next_Char( Face, charcode, &gindex );
            count++;
        }
________________________________

Please be advised that this email may contain confidential information. If
you are not the intended recipient, please notify us by email by replying to
the sender and delete this message. The sender disclaims that the content of
this email constitutes an offer to enter into, or the acceptance of, any
agreement; provided that the foregoing does not invalidate the binding
effect of any digital or other electronic reproduction of a manual signature
that is included in any attachment.
_______________________________________________
Freetype mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/freetype




reply via email to

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