freetype
[Top][All Lists]
Advanced

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

Re: [ft] How to determine which Unicode blocks a True Type font supports


From: Lawrence D'Oliveiro
Subject: Re: [ft] How to determine which Unicode blocks a True Type font supports?
Date: Tue, 7 Jul 2015 11:30:28 +1200

On Mon, 6 Jul 2015 14:12:08 +0100, DK wrote:

> Is there a way using FreeType on Windows to determine:
> 
> 1. Which Unicode blocks (as per http://unicode.org/ V8.0.0) the
> font supports?
> 
> 2. In the blocks it supports, how many of the characters are
> supported?

It’s quite easy. Just call FT_Get_Char_Index for every character code,
and see which ones return a nonzero glyph index.

You can also iterate over all character/glyph mappings with
FT_Get_First_Char and FT_Get_Next_Char.

Example of both techniques (in Python) here:
<https://github.com/ldo/python_freetype_examples/blob/master/code_coverage>.



reply via email to

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