How to determine if a font is monospaced using GTK and Pango?

I have one PangoFontDescription, and I want to know if it describes a monospace font.

I saw a feature pango_font_family_is_monospace()in the documentation API Pango, but after a few hours ozadachivaniya I'm still not clear what the relationship between the PangoFontFamily, PangoFontMap, PangoFont, PangoFontset, PangoContextand PangoFontDescription, and if I need any or all of them to achieve what I want. So far, this PangoFontDescriptionis the only part of Pango that I need to use, since GTK manages to abstract everything else.

Can anyone who has done this before help me?

+3
source share
1

pango_font_description_get_family() pango_font_family_is_monospace() .

EDIT:

pango_font_description_get_family() , : pango_context_list_families() . pango_font_family_is_monospace() . , , .

+3

Source: https://habr.com/ru/post/1742660/


All Articles