## gnome-font

gnome-font

## Synopsis

                        GnomeFont;
                        GnomeFontFace;
    #define             gnome_font_ref                      (f)
    #define             gnome_font_unref                    (f)
    enum                GnomeFontWeight;
    const guchar*       gnome_font_get_name                 (const GnomeFont *font);
    const guchar*       gnome_font_get_family_name          (const GnomeFont *font);
    const guchar*       gnome_font_get_species_name         (const GnomeFont *font);
    const guchar*       gnome_font_get_ps_name              (const GnomeFont *font);
    gint                gnome_font_lookup_default           (GnomeFont *font,
                                                             gint unicode);
    ArtPoint*           gnome_font_get_glyph_stdadvance     (GnomeFont *font,
                                                             gint glyph,
                                                             ArtPoint *advance);
    ArtDRect*           gnome_font_get_glyph_stdbbox        (GnomeFont *font,
                                                             gint glyph,
                                                             ArtDRect *bbox);
    const ArtBpath*     gnome_font_get_glyph_stdoutline     (GnomeFont *font,
                                                             gint glyph);
    ArtPoint*           gnome_font_get_glyph_stdkerning     (GnomeFont *font,
                                                             gint glyph0,
                                                             gint glyph1,
                                                             ArtPoint *kerning);
    GnomeFontFace*      gnome_font_get_face                 (const GnomeFont *font);
    gdouble             gnome_font_get_size                 (const GnomeFont *font);
    #define             gnome_font_get_weight_code          (f)
    #define             gnome_font_is_italic                (f)
    #define             gnome_font_is_fixed_width           (f)
    gdouble             gnome_font_get_ascender             (GnomeFont *font);
    gdouble             gnome_font_get_descender            (GnomeFont *font);
    gdouble             gnome_font_get_underline_position   (GnomeFont *font);
    gdouble             gnome_font_get_underline_thickness  (GnomeFont *font);
    gdouble             gnome_font_get_glyph_width          (GnomeFont *font,
                                                             gint glyph);
    gdouble             gnome_font_get_glyph_kerning        (GnomeFont *font,
                                                             gint glyph1,
                                                             gint glyph2);
    GnomeFont*          gnome_font_find_closest_from_weight_slant
                                                            (const guchar *family,
                                                             GnomeFontWeight weight,
                                                             gboolean italic,
                                                             gdouble size);
    GnomeFont*          gnome_font_find                     (const guchar *name,
                                                             gdouble size);
    GnomeFont*          gnome_font_find_closest             (const guchar *name,
                                                             gdouble size);
    GnomeFont*          gnome_font_find_from_full_name      (const guchar *string);
    GnomeFont*          gnome_font_find_from_filename       (const guchar *filename,
                                                             gint index_,
                                                             gdouble size);
    GnomeFont*          gnome_font_find_closest_from_full_name
                                                            (const guchar *string);
    GList*              gnome_font_list                     (void);
    void                gnome_font_list_free                (GList *fontlist);
    GList*              gnome_font_family_list              (void);
    void                gnome_font_family_list_free         (GList *fontlist);
    GList*              gnome_font_style_list               (const guchar *family);
    void                gnome_font_style_list_free          (GList *styles);
    guchar*             gnome_font_get_full_name            (GnomeFont *font);
    PangoFont*          gnome_font_get_closest_pango_font   (const GnomeFont *font,
                                                             PangoFontMap *map,
                                                             gdouble dpi);
    PangoFontDescription* gnome_font_get_pango_description  (const GnomeFont *font,
                                                             gdouble dpi);

## Description

## Details

### GnomeFont

    typedef struct _GnomeFont GnomeFont;

### GnomeFontFace

    typedef struct _GnomeFontFace GnomeFontFace;

### gnome_font_ref()

    #define             gnome_font_ref(f)

`f` : |

### gnome_font_unref()

    #define             gnome_font_unref(f)

`f` : |

### enum GnomeFontWeight

    typedef enum {
    	GNOME_FONT_LIGHTEST = 100,
    	GNOME_FONT_EXTRA_LIGHT = 100,
    	GNOME_FONT_THIN = 200,
    	GNOME_FONT_LIGHT = 300,
    	GNOME_FONT_BOOK = 400,
    	GNOME_FONT_REGULAR = 400,
    	GNOME_FONT_MEDIUM = 500,
    	GNOME_FONT_SEMI = 600,
    	GNOME_FONT_DEMI = 600,
    	GNOME_FONT_BOLD = 700,
    	GNOME_FONT_HEAVY = 900,
    	GNOME_FONT_EXTRABOLD = 900,
    	GNOME_FONT_BLACK = 1000,
    	GNOME_FONT_EXTRABLACK = 1100,
    	GNOME_FONT_HEAVIEST = 1100
    } GnomeFontWeight;

### gnome_font_get_name ()

    const guchar*       gnome_font_get_name                 (const GnomeFont *font);

`font` : |
Returns : |

### gnome_font_get_family_name ()

    const guchar*       gnome_font_get_family_name          (const GnomeFont *font);

`font` : |
Returns : |

### gnome_font_get_species_name ()

    const guchar*       gnome_font_get_species_name         (const GnomeFont *font);

`font` : |
Returns : |

### gnome_font_get_ps_name ()

    const guchar*       gnome_font_get_ps_name              (const GnomeFont *font);

`font` : |
Returns : |

### gnome_font_lookup_default ()

    gint                gnome_font_lookup_default           (GnomeFont *font,
                                                             gint unicode);

Get the glyph number corresponding to a given unicode

`font` : |
`unicode` : |
Returns : | glyph number, -1 if it is not mapped

### gnome_font_get_glyph_stdadvance ()

    ArtPoint*           gnome_font_get_glyph_stdadvance     (GnomeFont *font,
                                                             gint glyph,
                                                             ArtPoint *advance);

`font` : |
`glyph` : |
`advance` : |
Returns : |

### gnome_font_get_glyph_stdbbox ()

    ArtDRect*           gnome_font_get_glyph_stdbbox        (GnomeFont *font,
                                                             gint glyph,
                                                             ArtDRect *bbox);

`font` : |
`glyph` : |
`bbox` : |
Returns : |

### gnome_font_get_glyph_stdoutline ()

    const ArtBpath*     gnome_font_get_glyph_stdoutline     (GnomeFont *font,
                                                             gint glyph);

`font` : |
`glyph` : |
Returns : |

### gnome_font_get_glyph_stdkerning ()

    ArtPoint*           gnome_font_get_glyph_stdkerning     (GnomeFont *font,
                                                             gint glyph0,
                                                             gint glyph1,
                                                             ArtPoint *kerning);

`font` : |
`glyph0` : |
`glyph1` : |
`kerning` : |
Returns : |

### gnome_font_get_face ()

    GnomeFontFace*      gnome_font_get_face                 (const GnomeFont *font);

`font` : |
Returns : |

### gnome_font_get_size ()

    gdouble             gnome_font_get_size                 (const GnomeFont *font);

`font` : |
Returns : |

### gnome_font_get_weight_code()

    #define             gnome_font_get_weight_code(f)

`f` : |

### gnome_font_is_italic()

    #define             gnome_font_is_italic(f)

`f` : |

### gnome_font_is_fixed_width()

    #define             gnome_font_is_fixed_width(f)

`f` : |

### gnome_font_get_ascender ()

    gdouble             gnome_font_get_ascender             (GnomeFont *font);

This works with the standard Adobe encoding and without kerning or ligatures. When the text libs get written, this function will be deprecated.

`font` : | the GnomeFont to operate on
Returns : | The ascender of the font.

### gnome_font_get_descender ()

    gdouble             gnome_font_get_descender            (GnomeFont *font);

This works with the standard Adobe encoding and without kerning or ligatures. When the text libs get written, this function will be deprecated.

`font` : | the GnomeFont to operate on
Returns : | The descender of the font.

### gnome_font_get_underline_position ()

    gdouble             gnome_font_get_underline_position   (GnomeFont *font);

This works with the standard Adobe encoding and without kerning or ligatures. When the text libs get written, this function will be deprecated.

`font` : | the GnomeFont to operate on
Returns : | The underline position of the font.

### gnome_font_get_underline_thickness ()

    gdouble             gnome_font_get_underline_thickness  (GnomeFont *font);

This works with the standard Adobe encoding and without kerning or ligatures. When the text libs get written, this function will be deprecated.

`font` : | the GnomeFont to operate on
Returns : | The underline thickness of the font.

### gnome_font_get_glyph_width ()

    gdouble             gnome_font_get_glyph_width          (GnomeFont *font,
                                                             gint glyph);

`font` : |
`glyph` : |
Returns : |

### gnome_font_get_glyph_kerning ()

    gdouble             gnome_font_get_glyph_kerning        (GnomeFont *font,
                                                             gint glyph1,
                                                             gint glyph2);

`font` : |
`glyph1` : |
`glyph2` : |
Returns : |

### gnome_font_find_closest_from_weight_slant ()

    GnomeFont*          gnome_font_find_closest_from_weight_slant
                                                            (const guchar *family,
                                                             GnomeFontWeight weight,
                                                             gboolean italic,
                                                             gdouble size);

`family` : |
`weight` : |
`italic` : |
`size` : |
Returns : |

### gnome_font_find ()

    GnomeFont*          gnome_font_find                     (const guchar *name,
                                                             gdouble size);

`name` : |
`size` : |
Returns : |

### gnome_font_find_closest ()

    GnomeFont*          gnome_font_find_closest             (const guchar *name,
                                                             gdouble size);

`name` : |
`size` : |
Returns : |

### gnome_font_find_from_full_name ()

    GnomeFont*          gnome_font_find_from_full_name      (const guchar *string);

`string` : |
Returns : |

### gnome_font_find_from_filename ()

    GnomeFont*          gnome_font_find_from_filename       (const guchar *filename,
                                                             gint index_,
                                                             gdouble size);

Creates a font using the filename and index of the face within the file to identify the GnomeFontFace. The font must already be within the system font database; this can't be used to access arbitrary fonts on disk.

`filename` : | filename of a font face in the system font database
`index_` : | index of the face within `filename`. (Font formats such as TTC/TrueType Collections can have multiple fonts within a single file.
`size` : | size (in points) at which to load the font
Returns : | a newly created font if the face could be located, otherwise `NULL`

### gnome_font_find_closest_from_full_name ()

    GnomeFont*          gnome_font_find_closest_from_full_name
                                                            (const guchar *string);

`string` : |
Returns : |

### gnome_font_list ()

    GList*              gnome_font_list                     (void);

Returns : |

### gnome_font_list_free ()

    void                gnome_font_list_free                (GList *fontlist);

`fontlist` : |

### gnome_font_family_list ()

    GList*              gnome_font_family_list              (void);

Returns : |

### gnome_font_family_list_free ()

    void                gnome_font_family_list_free         (GList *fontlist);

`fontlist` : |

### gnome_font_style_list ()

    GList*              gnome_font_style_list               (const guchar *family);

`family` : |
Returns : |

### gnome_font_style_list_free ()

    void                gnome_font_style_list_free          (GList *styles);

`styles` : |

### gnome_font_get_full_name ()

    guchar*             gnome_font_get_full_name            (GnomeFont *font);

`font` : |
Returns : |

### gnome_font_get_closest_pango_font ()

    PangoFont*          gnome_font_get_closest_pango_font   (const GnomeFont *font,
                                                             PangoFontMap *map,
                                                             gdouble dpi);

`font` : |
`map` : |
`dpi` : |
Returns : |

### gnome_font_get_pango_description ()

    PangoFontDescription* gnome_font_get_pango_description  (const GnomeFont *font,
                                                             gdouble dpi);

`font` : |
`dpi` : |
Returns : |