GtkPSFont

## GtkPSFont GtkPSFont — PostScript Fonts handling. |

## Synopsis

    #include <gtkextra.h>

                        GtkPSFont;
    gint                gtk_psfont_init                     ();
    void                gtk_psfont_unref                    ();
    GtkPSFont*          gtk_psfont_get_by_name              (const gchar *name);
    GtkPSFont*          gtk_psfont_get_by_family            (const gchar *family_name,
                                                             gboolean italic,
                                                             gboolean bold);
    GdkFont*            gtk_psfont_get_gdkfont              (GtkPSFont *font,
                                                             gint height);
    PangoFontDescription* gtk_psfont_get_font_description   (GtkPSFont *font,
                                                             gint height);
    const gchar *       gtk_psfont_get_psfontname           (GtkPSFont *psfont);
    void                gtk_psfont_add_font                 (const char *fontname,
                                                             const gchar *psname,
                                                             const gchar *family,
                                                             const gchar *pango_description,
                                                             gboolean italic,
                                                             gboolean bold);
    void                gtk_psfont_add_i18n_font            (const char *fontname,
                                                             const gchar *psname,
                                                             const gchar *family,
                                                             const gchar *i18n_latinfamily,
                                                             const gchar *pango_description,
                                                             gboolean italic,
                                                             gboolean bold,
                                                             gboolean vertical);
    void                gtk_psfont_get_families             (GList **families,
                                                             gint *num_families);
    void                gtk_psfont_get_char_size            (GtkPSFont *psfont,
                                                             GdkFont *font,
                                                             GdkFont *latin_font,
                                                             GdkWChar wc,
                                                             gint *width,
                                                             gint *ascent,
                                                             gint *descent);

## Description

Handles Postscript fonts.

## Details

### GtkPSFont

    typedef struct {
    } GtkPSFont;

The GtkPSFont struct contains only private data. It should only be accessed through the functions described below.

### gtk_psfont_init ()

    gint                gtk_psfont_init                     ();

Returns : |

### gtk_psfont_unref ()

    void                gtk_psfont_unref                    ();

Unref ps fonts.

### gtk_psfont_get_by_name ()

    GtkPSFont*          gtk_psfont_get_by_name              (const gchar *name);

Get PS Font by font name.

`name` : | font name
Returns : | (transfer none) a GtkPSFont pointer.

### gtk_psfont_get_by_family ()

    GtkPSFont*          gtk_psfont_get_by_family            (const gchar *family_name,
                                                             gboolean italic,
                                                             gboolean bold);

Get GtkPSFont by family.

`family_name` : | font name
`italic` : | TRUE or FALSE
`bold` : | TRUE or FALSE
Returns : | (transfer none) the GtkPSFont

### gtk_psfont_get_gdkfont ()

    GdkFont*            gtk_psfont_get_gdkfont              (GtkPSFont *font,
                                                             gint height);

`font` : |
`height` : |
Returns : |

### gtk_psfont_get_font_description ()

    PangoFontDescription* gtk_psfont_get_font_description   (GtkPSFont *font,
                                                             gint height);

Get a PangoDescriptionFont from PS Font.

`font` : | a GtkPSFont
`height` : | font height
Returns : | a PangoFontDescription pointer.

### gtk_psfont_get_psfontname ()

    const gchar *       gtk_psfont_get_psfontname           (GtkPSFont *psfont);

Get font name from PS Font.

`psfont` : | a GtkPSFont
Returns : | font name.

### gtk_psfont_add_font ()

    void                gtk_psfont_add_font                 (const char *fontname,
                                                             const gchar *psname,
                                                             const gchar *family,
                                                             const gchar *pango_description,
                                                             gboolean italic,
                                                             gboolean bold);

Add font in user font list.

`fontname` : | font name
`psname` : | PS font name
`family` : | font family
`pango_description` : | font Pango description
`italic` : | TRUE or FALSE
`bold` : | TRUE or FALSE

### gtk_psfont_add_i18n_font ()

    void                gtk_psfont_add_i18n_font            (const char *fontname,
                                                             const gchar *psname,
                                                             const gchar *family,
                                                             const gchar *i18n_latinfamily,
                                                             const gchar *pango_description,
                                                             gboolean italic,
                                                             gboolean bold,
                                                             gboolean vertical);

Add international font in user font list.

`fontname` : | font name
`psname` : | PS font name
`family` : | font family
`i18n_latinfamily` : | International font family
`pango_description` : | font Pango description
`italic` : | TRUE or FALSE
`bold` : | TRUE or FALSE
`vertical` : | TRUE or FALSE

### gtk_psfont_get_families ()

    void                gtk_psfont_get_families             (GList **families,
                                                             gint *num_families);

Get GtkPSFont by family.

`families` : | (element-type gchar*) font families
`num_families` : | families number

### gtk_psfont_get_char_size ()

    void                gtk_psfont_get_char_size            (GtkPSFont *psfont,
                                                             GdkFont *font,
                                                             GdkFont *latin_font,
                                                             GdkWChar wc,
                                                             gint *width,
                                                             gint *ascent,
                                                             gint *descent);

Get font character size.

`psfont` : | a GtkPSFont
`font` : | a GdkFont
`latin_font` : | a GdkFont
`wc` : | a GdkWchar
`width` : | font width
`ascent` : | font ascent
`descent` : | font descent