## Gtk utility functions Gtk utility functions — Gtk related utility functions |

## Functions

void | font_manager_set_application_style ()
void | font_manager_clear_pango_cache ()
void | font_manager_widget_set_align ()
void | font_manager_widget_set_expand ()
void | font_manager_widget_set_margin ()
gchar * | font_manager_get_localized_pangram ()
gchar * | font_manager_get_localized_preview_text ()
void | font_manager_add_keyboard_shortcut ()

## Types and Values

#define | FONT_MANAGER_BUS_ID
#define | FONT_MANAGER_BUS_PATH
#define | FONT_MANAGER_FONT_VIEWER_BUS_ID
#define | FONT_MANAGER_FONT_VIEWER_BUS_PATH
#define | FONT_MANAGER_MIN_MARGIN
#define | FONT_MANAGER_DEFAULT_MARGIN
#define | FONT_MANAGER_DEFAULT_FONT
#define | FONT_MANAGER_MIN_FONT_SIZE
#define | FONT_MANAGER_MAX_FONT_SIZE
#define | FONT_MANAGER_DEFAULT_PREVIEW_SIZE
#define | FONT_MANAGER_CHARACTER_MAP_PREVIEW_SIZE
#define | FONT_MANAGER_DEFAULT_PREVIEW_TEXT
#define | FONT_MANAGER_LOREM_IPSUM
enum | FontManagerDragTargetType
#define | FONT_MANAGER_TYPE_DRAG_TARGET_TYPE

## Object Hierarchy

        GEnum
        ╰── FontManagerDragTargetType

## Includes

    #include <font-manager-gtk-utils.h>

## Description

## Functions

### font_manager_set_application_style ()

    void
    font_manager_set_application_style (void);

Load application specific CSS and icons.

### font_manager_clear_pango_cache ()

    void
    font_manager_clear_pango_cache (PangoContext *ctx);

Forces Pango to update the cached font configuration.

Required to render sourced fonts on Pango > 1.47

#### Parameters

ctx | PangoContext |

### font_manager_widget_set_align ()

    void
    font_manager_widget_set_align (GtkWidget *widget,
                                   GtkAlign align);

Set both halign and valign to the same value.

#### Parameters

widget | GtkWidget |
align | GtkAlign |

### font_manager_widget_set_expand ()

    void
    font_manager_widget_set_expand (GtkWidget *widget,
                                    gboolean expand);

Set both hexpand and vexpand to the same value.

#### Parameters

widget | GtkWidget |
expand | `TRUE` or `FALSE` |

### font_manager_widget_set_margin ()

    void
    font_manager_widget_set_margin (GtkWidget *widget,
                                    gint margin);

Set all margin properties to the same value.

#### Parameters

widget | GtkWidget |
margin | margin in pixels |

### font_manager_get_localized_pangram ()

    gchar *
    font_manager_get_localized_pangram (void);

Retrieve a sample string from Pango for the default language. If Pango does not have a sample string for language, the classic "The quick brown fox..." is returned.

#### Returns

A newly allocated string. Free the result using g_free.

[transfer full]

### font_manager_get_localized_preview_text ()

    gchar *
    font_manager_get_localized_preview_text
                                   (void);

#### Returns

A newly allocated string. Free the result using g_free.

[transfer full]

### font_manager_add_keyboard_shortcut ()

    void
    font_manager_add_keyboard_shortcut (GSimpleAction *action,
                                        const gchar *action_name,
                                        const gchar * const *accels);

Add the given `action` and `accels` to the default application.

#### Parameters

action | GSimpleAction |
action_name | name of action |
accels | list of accelerators. | [array zero-terminated=1]

## Types and Values

### FONT_MANAGER_BUS_ID

    #define FONT_MANAGER_BUS_ID "org.gnome.FontManager"

### FONT_MANAGER_BUS_PATH

    #define FONT_MANAGER_BUS_PATH "/org/gnome/FontManager"

### FONT_MANAGER_FONT_VIEWER_BUS_ID

    #define FONT_MANAGER_FONT_VIEWER_BUS_ID "org.gnome.FontViewer"

### FONT_MANAGER_FONT_VIEWER_BUS_PATH

    #define FONT_MANAGER_FONT_VIEWER_BUS_PATH "/org/gnome/FontViewer"

### FONT_MANAGER_MIN_MARGIN

    #define FONT_MANAGER_MIN_MARGIN 2

### FONT_MANAGER_DEFAULT_MARGIN

    #define FONT_MANAGER_DEFAULT_MARGIN 6

### FONT_MANAGER_DEFAULT_FONT

    #define FONT_MANAGER_DEFAULT_FONT "Sans"

### FONT_MANAGER_MIN_FONT_SIZE

    #define FONT_MANAGER_MIN_FONT_SIZE 6.0

### FONT_MANAGER_MAX_FONT_SIZE

    #define FONT_MANAGER_MAX_FONT_SIZE 96.0

### FONT_MANAGER_DEFAULT_PREVIEW_SIZE

    #define FONT_MANAGER_DEFAULT_PREVIEW_SIZE 10.0

### FONT_MANAGER_CHARACTER_MAP_PREVIEW_SIZE

    #define FONT_MANAGER_CHARACTER_MAP_PREVIEW_SIZE FONT_MANAGER_DEFAULT_PREVIEW_SIZE * 1.6

### FONT_MANAGER_DEFAULT_PREVIEW_TEXT

    #define             FONT_MANAGER_DEFAULT_PREVIEW_TEXT

### FONT_MANAGER_LOREM_IPSUM

    #define             FONT_MANAGER_LOREM_IPSUM

### enum FontManagerDragTargetType

#### Members

FONT_MANAGER_DRAG_TARGET_TYPE_FAMILY | Internal drag |
FONT_MANAGER_DRAG_TARGET_TYPE_COLLECTION | Internal drag |
FONT_MANAGER_DRAG_TARGET_TYPE_EXTERNAL | External drag |

### FONT_MANAGER_TYPE_DRAG_TARGET_TYPE

    #define FONT_MANAGER_TYPE_DRAG_TARGET_TYPE (font_manager_drag_target_type_get_type ())