Synopsischar** pango_split_file_list (const char *str); char* pango_trim_string (const char *str); gint pango_read_line (FILE *stream, GString *str); gboolean pango_skip_space (const char **pos); gboolean pango_scan_word (const char **pos, GString *out); gboolean pango_scan_string (const char **pos, GString *out); gboolean pango_scan_int (const char **pos, int *out); char* pango_config_key_get (const char *key); void pango_lookup_aliases (const char *fontname, char ***families, int *n_families); gboolean pango_parse_enum (GType type, const char *str, int *value, gboolean warn, char **possible_values); gboolean pango_parse_style (const char *str, PangoStyle *style, gboolean warn); gboolean pango_parse_variant (const char *str, PangoVariant *variant, gboolean warn); gboolean pango_parse_weight (const char *str, PangoWeight *weight, gboolean warn); gboolean pango_parse_stretch (const char *str, PangoStretch *stretch, gboolean warn); const char* pango_get_sysconf_subdirectory (void); const char* pango_get_lib_subdirectory (void); guint8* pango_log2vis_get_embedding_levels (const gchar *text, int length, PangoDirection *pbase_dir); gboolean pango_is_zero_width (gunichar ch); void pango_quantize_line_geometry (int *thickness, int *position); DescriptionThe functions and utilities in this section are mostly used from Pango backends and modules, but may be useful for other purposes too. Detailspango_split_file_list ()char** pango_split_file_list (const char *str);
Splits a
pango_trim_string ()char* pango_trim_string (const char *str); Trims leading and trailing whitespace from a string.
pango_read_line ()gint pango_read_line (FILE *stream, GString *str); Reads an entire line from a file into a buffer. Lines may be delimited with '\n', '\r', '\n\r', or '\r\n'. The delimiter is not written into the buffer. Text after a '#' character is treated as a comment and skipped. '\' can be used to escape a # character. '\' proceeding a line delimiter combines adjacent lines. A '\' proceeding any other character is ignored and written into the output buffer unmodified.
pango_skip_space ()gboolean pango_skip_space (const char **pos); Skips 0 or more characters of white space.
pango_scan_word ()gboolean pango_scan_word (const char **pos, GString *out); Scans a word into a GString buffer. A word consists of [A-Za-z_] followed by zero or more [A-Za-z_0-9] Leading white space is skipped.
pango_scan_string ()gboolean pango_scan_string (const char **pos, GString *out); Scans a string into a GString buffer. The string may either be a sequence of non-white-space characters, or a quoted string with '"'. Instead a quoted string, '\"' represents a literal quote. Leading white space outside of quotes is skipped.
pango_scan_int ()gboolean pango_scan_int (const char **pos, int *out); Scans an integer. Leading white space is skipped.
pango_config_key_get ()char* pango_config_key_get (const char *key); Looks up a key in the Pango config database (pseudo-win.ini style, read from $sysconfdir/pango/pangorc, ~/.pangorc, and getenv (PANGO_RC_FILE).)
pango_lookup_aliases ()void pango_lookup_aliases (const char *fontname, char ***families, int *n_families);
Look up all user defined aliases for the alias
pango_parse_enum ()gboolean pango_parse_enum (GType type, const char *str, int *value, gboolean warn, char **possible_values);
Parses an enum type and stored the result in
If
Since 1.16 pango_parse_style ()gboolean pango_parse_style (const char *str, PangoStyle *style, gboolean warn); Parses a font style. The allowed values are "normal", "italic" and "oblique", case variations being ignored.
pango_parse_variant ()gboolean pango_parse_variant (const char *str, PangoVariant *variant, gboolean warn); Parses a font variant. The allowed values are "normal" and "smallcaps" or "small_caps", case variations being ignored.
pango_parse_weight ()gboolean pango_parse_weight (const char *str, PangoWeight *weight, gboolean warn); Parses a font weight. The allowed values are "heavy", "ultrabold", "bold", "normal", "light", "ultraleight" and integers. Case variations are ignored.
pango_parse_stretch ()gboolean pango_parse_stretch (const char *str, PangoStretch *stretch, gboolean warn); Parses a font stretch. The allowed values are "ultra_condensed", "extra_condensed", "condensed", "semi_condensed", "normal", "semi_expanded", "expanded", "extra_expanded" and "ultra_expanded". Case variations are ignored and the '_' characters may be omitted.
pango_get_sysconf_subdirectory ()const char* pango_get_sysconf_subdirectory (void); On Unix, returns the name of the "pango" subdirectory of SYSCONFDIR (which is set at compile time). On Windows, returns the etc\pango subdirectory of the Pango installation directory (which is deduced at run time from the DLL's location).
pango_get_lib_subdirectory ()const char* pango_get_lib_subdirectory (void); On Unix, returns the name of the "pango" subdirectory of LIBDIR (which is set at compile time). On Windows, returns the lib\pango subdirectory of the Pango installation directory (which is deduced at run time from the DLL's location).
pango_log2vis_get_embedding_levels ()guint8* pango_log2vis_get_embedding_levels (const gchar *text, int length, PangoDirection *pbase_dir); This will return the bidirectional embedding levels of the input paragraph as defined by the Unicode Bidirectional Algorithm available at: http://www.unicode.org/reports/tr9/ If the input base direction is a weak direction, the direction of the characters in the text will determine the final resolved direction.
Since 1.4 pango_is_zero_width ()gboolean pango_is_zero_width (gunichar ch);
Checks
Since 1.10 pango_quantize_line_geometry ()void pango_quantize_line_geometry (int *thickness, int *position);
Quantizes the thickness and position of a line, typically an
underline or strikethrough, to whole device pixels, that is integer
multiples of
Care is taken to make sure
Since 1.12 |