afm-font-database

afm-font-database —

Synopsis




struct      AfmFontChar;
struct      AfmFontInfo;
struct      AfmFontDatabase;
struct      AfmFontExtents;
AfmFontDatabase* afm_font_database_global   (void);
AfmFontInfo* afm_font_database_peek_info    (AfmFontDatabase *db,
                                             PangoFontDescription *description);
void        afm_font_info_get_extents       (AfmFontInfo *info,
                                             double point_size,
                                             const char *text,
                                             gssize len,
                                             AfmFontExtents *extents_out);
void        afm_font_database_destroy       (AfmFontDatabase *db);
AfmFontDatabase* afm_font_database_parse_files
                                            (unsigned n_filenames,
                                             char **filenames);

Description

Details

struct AfmFontChar

struct AfmFontChar {

  gunichar unicode;
  double width;
  double glyph_x, glyph_y;
  double glyph_width, glyph_height;
};


struct AfmFontInfo

struct AfmFontInfo {

  char *font_name;
  double x_height, ascender;
  double width;
  double descender;	/* a positive value */
  unsigned n_chars;
  AfmFontChar *chars;	/* sorted by unicode value */

  /* TODO: kerning pairs */
};


struct AfmFontDatabase

struct AfmFontDatabase;


struct AfmFontExtents

struct AfmFontExtents {

  double logical_width, logical_height;
  double glyph_x, glyph_y;
  double glyph_width, glyph_height;
};


afm_font_database_global ()

AfmFontDatabase* afm_font_database_global   (void);

Returns :

afm_font_database_peek_info ()

AfmFontInfo* afm_font_database_peek_info    (AfmFontDatabase *db,
                                             PangoFontDescription *description);

db:
description:
Returns :

afm_font_info_get_extents ()

void        afm_font_info_get_extents       (AfmFontInfo *info,
                                             double point_size,
                                             const char *text,
                                             gssize len,
                                             AfmFontExtents *extents_out);

info:
point_size:
text:
len:
extents_out:

afm_font_database_destroy ()

void        afm_font_database_destroy       (AfmFontDatabase *db);

db:

afm_font_database_parse_files ()

AfmFontDatabase* afm_font_database_parse_files
                                            (unsigned n_filenames,
                                             char **filenames);

Param1:
filenames:
Returns :