Skip to content

Fixed width / monospace fonts. #7

Description

@bagnose

Terminol should complain if the specified font couldn't be loaded or isn't monospace.

This will likely require iterating through the available families:

    PangoFontMap * fontmap = pango_cairo_font_map_get_default();

    PangoFontFamily ** families;
    int n_families;
    pango_font_map_list_families(fontmap, &families, &n_families);

    for (int i = 0; i < n_families; i++) {
        PangoFontFamily * family2 = families[i];
        if (pango_font_family_is_monospace(family2)) {
            const char * family_name = pango_font_family_get_name(family2);
            printf ("Family %d: %s\n", i, family_name);
        }
    }
    g_free(families);

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions