`PangoFcDecoder` is a virtual base class that implementations will
inherit from.
It's the interface that is used to define a custom encoding for a font.
These objects are created in your code from a function callback that was
originally registered with [method@PangoFc.FontMap.add_decoder_find_func].
Pango requires information about the supported charset for a font as well
as the individual character to glyph conversions. Pango gets that
information via the #get_charset and #get_glyph callbacks into your
object implementation.
Generates an `FcCharSet` of supported characters for the @fcfont
given.
The returned `FcCharSet` will be a reference to an
internal value stored by the `PangoFcDecoder` and must not
be modified or freed.
the `FcCharset` for @fcfont; must not
be modified or freed.
a `PangoFcDecoder`
the `PangoFcFont` to query.
Generates a `PangoGlyph` for the given Unicode point using the
custom decoder.
For complex scripts where there can be multiple
glyphs for a single character, the decoder will return whatever
glyph is most convenient for it. (Usually whatever glyph is directly
in the fonts character map table.)
the glyph index, or 0 if the glyph isn't
covered by the font.
a `PangoFcDecoder`
a `PangoFcFont` to query.
the Unicode code point to convert to a single `PangoGlyph`.
Generates an `FcCharSet` of supported characters for the @fcfont
given.
The returned `FcCharSet` will be a reference to an
internal value stored by the `PangoFcDecoder` and must not
be modified or freed.
the `FcCharset` for @fcfont; must not
be modified or freed.
a `PangoFcDecoder`
the `PangoFcFont` to query.
Generates a `PangoGlyph` for the given Unicode point using the
custom decoder.
For complex scripts where there can be multiple
glyphs for a single character, the decoder will return whatever
glyph is most convenient for it. (Usually whatever glyph is directly
in the fonts character map table.)
the glyph index, or 0 if the glyph isn't
covered by the font.
a `PangoFcDecoder`
a `PangoFcFont` to query.
the Unicode code point to convert to a single `PangoGlyph`.
Class structure for `PangoFcDecoder`.
This returns an `FcCharset` given a `PangoFcFont` that
includes a list of supported characters in the font. The
#FcCharSet that is returned should be an internal reference to your
code. Pango will not free this structure. It is important that
you make this callback fast because this callback is called
separately for each character to determine Unicode coverage.
the `FcCharset` for @fcfont; must not
be modified or freed.
a `PangoFcDecoder`
the `PangoFcFont` to query.
This returns a single `PangoGlyph` for a given Unicode
code point.
the glyph index, or 0 if the glyph isn't
covered by the font.
a `PangoFcDecoder`
a `PangoFcFont` to query.
the Unicode code point to convert to a single `PangoGlyph`.
Callback function passed to [method@PangoFc.FontMap.add_decoder_find_func].
a new reference to a custom decoder for this pattern,
or %NULL if the default decoder handling should be used.
a fully resolved `FcPattern` specifying the font on the system
user data passed to
[method@PangoFc.FontMap.add_decoder_find_func]
Fontconfig property that Pango reads from font
patterns to populate list of OpenType features
to be enabled for the font by default.
The property will have a number of string elements,
each of which is the OpenType feature tag of one feature
to enable.
This is equivalent to FC_FONT_FEATURES in versions of
fontconfig that have that.
Fontconfig property that Pango reads from font
patterns to populate list of OpenType font variations
to be used for a font.
The property will have a string elements, each of which
a comma-separated list of OpenType axis setting of the
form AXIS=VALUE.
This is equivalent to FC_FONT_VARIATIONS in versions of
fontconfig that have that.
`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`.
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.
a new `PangoFontDescription`. Free with
pango_font_description_free().
a `FcPattern`
if %TRUE, 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)
Gets the glyph index for a given Unicode character
for @font.
If you only want to determine whether the font has
the glyph, use [method@PangoFc.Font.has_char].
the glyph index, or 0, if the Unicode
character doesn't exist in the font.
a `PangoFcFont`
Unicode character to look up
Returns the languages that are supported by @font.
This corresponds to the FC_LANG member of the FcPattern.
The returned array is only valid as long as the font
and its fontmap are valid.
Use pango_font_get_language()
a
%NULL-terminated array of `PangoLanguage`*
a `PangoFcFont`
Returns the FcPattern that @font is based on.
the fontconfig pattern for this font
a `PangoFcFont`
Returns the index of a glyph suitable for drawing @wc
as an unknown character.
Use PANGO_GET_UNKNOWN_GLYPH() instead.
a glyph index into @font.
a `PangoFcFont`
the Unicode character for which a glyph is needed.
Determines whether @font has a glyph for the codepoint @wc.
Use [method@Pango.Font.has_char]
%TRUE if @font has the requested codepoint.
a `PangoFcFont`
Unicode codepoint to look up
This function used to adjust each adjacent pair of glyphs
in @glyphs according to kerning information in @font.
Since 1.44, it does nothing.
a `PangoFcFont`
a `PangoGlyphString`
Gets the FreeType `FT_Face` associated with a font.
This face will be kept around until you call
[method@PangoFc.Font.unlock_face].
Use pango_font_get_hb_font() instead
the FreeType `FT_Face` associated with @font.
a `PangoFcFont`.
Releases a font previously obtained with
[method@PangoFc.Font.lock_face].
Use pango_font_get_hb_font() instead
a `PangoFcFont`.
The PangoFc font map this font is associated with.
The fontconfig pattern for this font.
`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.
This function saves a callback method in the `PangoFcFontMap` that
will be called whenever new fonts are created.
If the function returns a `PangoFcDecoder`, that decoder will be used
to determine both coverage via a `FcCharSet` and a one-to-one mapping
of characters to glyphs. This will allow applications to have
application-specific encodings for various fonts.
The `PangoFcFontMap` to add this method to.
The `PangoFcDecoderFindFunc` callback function
User data.
A `GDestroyNotify` callback that will be called when the
fontmap is finalized and the decoder is released.
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.
a `PangoFcFontMap`
Informs font map that the fontconfig configuration (i.e., FcConfig
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.
a `PangoFcFontMap`
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 the `PangoContext`
after calling this function.
Use pango_font_map_create_context() instead.
a new `PangoContext`
a `PangoFcFontMap`
Finds the decoder to use for @pattern.
Decoders can be added to a font map using
[method@PangoFc.FontMap.add_decoder_find_func].
a newly created `PangoFcDecoder`
object or %NULL if no decoder is set for @pattern.
The `PangoFcFontMap` to use.
The `FcPattern` to find the decoder for.
Fetches the `FcConfig` attached to a font map.
See also: [method@PangoFc.FontMap.set_config].
the `FcConfig` object attached to
@fcfontmap, which might be %NULL. The return value is
owned by Pango and should not be freed.
a `PangoFcFontMap`
Retrieves the `hb_face_t` for the given `PangoFcFont`.
the `hb_face_t`
for the given font
a `PangoFcFontMap`
a `PangoFcFont`
Set the `FcConfig` for this font map to use.
The default value
is %NULL, which causes Fontconfig to use its global "current config".
You can create a new `FcConfig` object and use this API to attach it
to a font map.
This is particularly useful for example, if you want to use application
fonts with Pango. For that, you would create a fresh `FcConfig`, add your
app fonts to it, and attach it to a new Pango font map.
If @fcconfig is different from the previous config attached to the font map,
[method@PangoFc.FontMap.config_changed] is called.
This function acquires a reference to the `FcConfig` object; the caller
does **not** need to retain a reference.
a `PangoFcFontMap`
a `FcConfig`
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.
a `PangoFcFontMap`
function to call to to do final config tweaking on `FcPattern` objects
data to pass to @func
function to call when @data is no longer used
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`.
a `PangoFcFontMap`
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.
a `PangoFcFontMap`
Fontconfig property that Pango sets on any
fontconfig pattern it passes to fontconfig
if a `PangoGravity` other than %PANGO_GRAVITY_SOUTH
is desired.
The property will have a `PangoGravity` value as a string,
like "east". This can be used to write fontconfig configuration
rules to choose different fonts for horizontal and vertical
writing directions.
Fontconfig property that Pango sets on any
fontconfig pattern it passes to fontconfig.
The property will have a string equal to what
g_get_prgname() returns. This can be used to write
fontconfig configuration rules that only affect
certain applications.
This is equivalent to FC_PRGNAME in versions of
fontconfig that have that.
Function type for doing final config tweaking on prepared `FcPattern`s.
the FcPattern to tweak.
user data.
Fontconfig property that Pango sets on any
fontconfig pattern it passes to fontconfig.
The property will have an integer value equal to what
[func@Pango.version] returns. This can be used to write
fontconfig configuration rules that only affect certain
pango versions (or only pango-using applications, or only
non-pango-using applications).