PangoFc.Font¶
- Subclasses:
None
Methods¶
- Inherited:
- Structs:
class |
|
|
|
|
|
|
|
|
|
|
Virtual Methods¶
- Inherited:
Properties¶
Name |
Type |
Flags |
Short Description |
---|---|---|---|
r/w |
The PangoFc font map this font is associated with (Since: 1.26) |
||
r/w/co |
The fontconfig pattern for this font |
Signals¶
- Inherited:
Fields¶
- Inherited:
Name |
Type |
Access |
Description |
---|---|---|---|
description |
r |
||
font_pattern |
r |
||
fontmap |
r |
||
is_hinted |
r |
||
is_transformed |
r |
||
matrix |
r |
||
metrics_by_lang |
[ |
r |
|
parent_instance |
r |
||
priv |
r |
Class Details¶
- class PangoFc.Font(**kwargs)¶
- Bases:
- Abstract:
Yes
- Structure:
PangoFcFont
is a base class for font implementations using the Fontconfig and FreeType libraries.It is used in onjunction with [class`PangoFc`.FontMap]. When deriving from this class, you need to implement all of its virtual functions other than shutdown() along with the get_glyph_extents() virtual function from
PangoFont
.- classmethod description_from_pattern(pattern, include_size)¶
- Parameters:
pattern (
fontconfig.Pattern
) – aFcPattern
include_size (
bool
) – ifTrue
, the pattern will include the size from the pattern; otherwise the resulting pattern will be unsized. (only %FC_SIZE is examined, not %FC_PIXEL_SIZE)
- Returns:
a new
PangoFontDescription
. Free withPango.FontDescription.free
().- Return type:
Creates a
PangoFontDescription
that matches the specified Fontconfig pattern as closely as possible.Many possible Fontconfig pattern values, such as %FC_RASTERIZER or %FC_DPI, don’t make sense in the context of
PangoFontDescription
, so will be ignored.New in version 1.4.
- get_glyph(wc)¶
- Parameters:
wc (
str
) – Unicode character to look up- Returns:
the glyph index, or 0, if the Unicode character doesn’t exist in the font.
- Return type:
Gets the glyph index for a given Unicode character for self.
If you only want to determine whether the font has the glyph, use [method`PangoFc`.Font.has_char].
New in version 1.4.
- get_languages()¶
- Returns:
a
None
-terminated array ofPangoLanguage
*- Return type:
[
Pango.Language
] orNone
Returns the languages that are supported by self.
This corresponds to the FC_LANG member of the
fontconfig.Pattern
.The returned array is only valid as long as the font and its fontmap are valid.
New in version 1.48.
Deprecated since version 1.50: Use pango_font_get_language()
- get_unknown_glyph(wc)¶
- Parameters:
wc (
str
) – the Unicode character for which a glyph is needed.- Returns:
a glyph index into self.
- Return type:
Returns the index of a glyph suitable for drawing wc as an unknown character.
Use PANGO_GET_UNKNOWN_GLYPH() instead.
New in version 1.4.
- has_char(wc)¶
- Parameters:
wc (
str
) – Unicode codepoint to look up- Returns:
True
if self has the requested codepoint.- Return type:
Determines whether self has a glyph for the codepoint wc.
New in version 1.4.
Deprecated since version 1.44: Use [method`Pango`.Font.has_char]
- kern_glyphs(glyphs)¶
- Parameters:
glyphs (
Pango.GlyphString
) – aPangoGlyphString
This function used to adjust each adjacent pair of glyphs in glyphs according to kerning information in self.
Since 1.44, it does nothing.
New in version 1.4.
Deprecated since version 1.32.
- unlock_face()¶
Releases a font previously obtained with [method`PangoFc`.Font.lock_face].
New in version 1.4.
Deprecated since version 1.44: Use pango_font_get_hb_font() instead
Property Details¶
- PangoFc.Font.props.fontmap¶
- Name:
fontmap
- Type:
- Default Value:
- Flags:
The PangoFc font map this font is associated with.