PgMiscellaneous

Members

Static functions

configKeyGet
string configKeyGet(string key)

Do not use. Does not do anything.

configKeyGetSystem
string configKeyGetSystem(string key)

Do not use. Does not do anything.

getLibSubdirectory
string getLibSubdirectory()

Returns the name of the "pango" subdirectory of LIBDIR (which is set at compile time).

getSysconfSubdirectory
string getSysconfSubdirectory()

Returns the name of the "pango" subdirectory of SYSCONFDIR (which is set at compile time).

isZeroWidth
bool isZeroWidth(dchar ch)

Checks ch to see if it is a character that should not be normally rendered on the screen. This includes all Unicode characters with "ZERO WIDTH" in their name, as well as <firstterm>bidi</firstterm> formatting characters, and a few other ones. This is totally different from g_unichar_iszerowidth() and is at best misnamed.

log2visGetEmbeddingLevels
ubyte* log2visGetEmbeddingLevels(string text, int length, PangoDirection* pbaseDir)

This will return the bidirectional embedding levels of the input paragraph as defined by the Unicode Bidirectional Algorithm available at:

lookupAliases
void lookupAliases(string fontname, string[] families)

Look up all user defined aliases for the alias fontname. The resulting font family names will be stored in families, and the number of families in n_families.

parseEnum
bool parseEnum(GType type, string str, int value, bool warn, string possibleValues)

Parses an enum type and stores the result in value.

parseStretch
bool parseStretch(string str, PangoStretch stretch, bool 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.

parseStyle
bool parseStyle(string str, PangoStyle style, bool warn)

Parses a font style. The allowed values are "normal", "italic" and "oblique", case variations being ignored.

parseVariant
bool parseVariant(string str, PangoVariant variant, bool warn)

Parses a font variant. The allowed values are "normal" and "smallcaps" or "small_caps", case variations being ignored.

parseWeight
bool parseWeight(string str, PangoWeight weight, bool warn)

Parses a font weight. The allowed values are "heavy", "ultrabold", "bold", "normal", "light", "ultraleight" and integers. Case variations are ignored.

quantizeLineGeometry
void quantizeLineGeometry(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 PANGO_SCALE. The purpose of this function is to avoid such lines looking blurry.

readLine
int readLine(FILE* stream, StringG 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.

scanInt
bool scanInt(string pos, int out_)

Scans an integer. Leading white space is skipped.

scanString
bool scanString(string pos, StringG 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.

scanWord
bool scanWord(string pos, StringG 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.

skipSpace
bool skipSpace(string pos)

Skips 0 or more characters of white space.

splitFileList
string[] splitFileList(string str)

Splits a G_SEARCHPATH_SEPARATOR-separated list of files, stripping white space and substituting ~/ with $HOME/.

trimString
string trimString(string str)

Trims leading and trailing whitespace from a string.