Querying a font

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

 



Around 12 o'clock on Sep 21, David Shochat wrote:

> Things I want to know:
>
> 1. Is it a Unicode font?
> 2. What code points does it support?

Fontconfig has Unicode coverage information for each font; if the Unicode 
coverage is non-empty, then the font has some kind of mapping which can be 
used to map Unicode values to glyphs.  Note that fontconfig supports a
couple of non-Unicode mappings (Apple Roman and Symbol) so that older 
fonts without Unicode mapping tables can still be used by applications 
that use only Unicode values.

	FcCharSet	*cs;

	if (FcPatternGetCharSet (pattern, FC_CHARSET, &cs) != FcResultMatch)
		cs = 0;
	if (!cs)
		return;

This code fragment will extract the unicode coverage information for the 
specified font pattern; you can then use the various FcCharSet functions 
to examine that value.

-keith





[Index of Archives]     [Fedora Fonts]     [Fedora Users]     [Fedora Cloud]     [Kernel]     [Fedora Packaging]     [Fedora Desktop]     [PAM]     [Gimp Graphics Editor]     [Yosemite News]

  Powered by Linux