PangoFc.FontMap¶
- Subclasses:
None
Methods¶
- Inherited:
- Structs:
|
|
|
|
|
|
|
|
Virtual Methods¶
- Inherited:
Properties¶
- Inherited:
Signals¶
- Inherited:
Fields¶
- Inherited:
Class Details¶
- class PangoFc.FontMap(**kwargs)¶
- Bases:
- Abstract:
Yes
- Structure:
PangoFcFontMap
is a base class for font map implementations using the Fontconfig and FreeType libraries.It is used in the Xft and FreeType backends shipped with Pango, but can also be used when creating new backends. Any backend deriving from this base class will take advantage of the wide range of shapers implemented using FreeType that come with Pango.
- cache_clear()¶
Clear all cached information and fontsets for this font map.
This should be called whenever there is a change in the output of the default_substitute() virtual function of the font map, or if fontconfig has been reinitialized to new configuration.
New in version 1.4.
- config_changed()¶
Informs font map that the fontconfig configuration (i.e.,
fontconfig.Config
object) used by this font map has changed.This currently calls [method`PangoFc`.FontMap.cache_clear] which ensures that list of fonts, etc will be regenerated using the updated configuration.
New in version 1.38.
- create_context()¶
- Returns:
a new
PangoContext
- Return type:
Creates a new context for this fontmap.
This function is intended only for backend implementations deriving from
PangoFcFontMap
; it is possible that a backend will store additional information needed for correct operation on thePangoContext
after calling this function.New in version 1.4.
Deprecated since version 1.22: Use
Pango.FontMap.create_context
() instead.
- find_decoder(pattern)¶
- Parameters:
pattern (
fontconfig.Pattern
) – TheFcPattern
to find the decoder for.- Returns:
a newly created
PangoFcDecoder
object orNone
if no decoder is set for pattern.- Return type:
Finds the decoder to use for pattern.
Decoders can be added to a font map using [method`PangoFc`.FontMap.add_decoder_find_func].
New in version 1.26.
- set_default_substitute(func, *data)¶
- Parameters:
func (
PangoFc.SubstituteFunc
) – function to call to to do final config tweaking onFcPattern
objects
Sets a function that will be called to do final configuration substitution on a
FcPattern
before it is used to load the font.This function can be used to do things like set hinting and antialiasing options.
New in version 1.48.
- shutdown()¶
Clears all cached information for the fontmap and marks all fonts open for the fontmap as dead.
See the shutdown() virtual function of
PangoFcFont
.This function might be used by a backend when the underlying windowing system for the font map exits. This function is only intended to be called only for backend implementations deriving from
PangoFcFontMap
.New in version 1.4.
- substitute_changed()¶
Call this function any time the results of the default substitution function set with [method`PangoFc`.FontMap.set_default_substitute] change.
That is, if your substitution function will return different results for the same input pattern, you must call this function.
New in version 1.48.