Import line: | Pango = imports.gi.Pango; |
GIR File: | Pango-1.0.gir |
C documentation: | Pango |
Namespace : | Pango |
Properties | |
---|---|
gint32 Pango.ANALYSIS_FLAG_CENTERED_BASELINE : 0
|
|
gint32 Pango.ATTR_INDEX_FROM_TEXT_BEGINNING : 0
|
|
String Pango.ENGINE_TYPE_LANG : null
|
|
String Pango.ENGINE_TYPE_SHAPE : null
|
|
String Pango.RENDER_TYPE_NONE : null
|
|
gint32 Pango.SCALE : 0
|
|
gint32 Pango.UNKNOWN_GLYPH_HEIGHT : 0
|
|
gint32 Pango.UNKNOWN_GLYPH_WIDTH : 0
|
None |
Method / Constructor | Defined By | |
---|---|---|
Fetches the attribute type name passed in when registering the type using
pango_attr_type_register().
Fetches the attribute type name passed in when registering the type using
pango_attr_type_register(). The returned value is an interned string (see g_intern_string() for what that means) that should not be modified or freed. a built-in Pango attribute type or invalid.
|
Pango | |
Allocate a new attribute type ID.
Allocate a new attribute type ID. The attribute type name can be accessed
later by using pango_attr_type_get_name().
|
Pango | |
Determines the normative bidirectional character type of a
character, as specified in the Unicode Character Database.
Determines the normative bidirectional character type of a
character, as specified in the Unicode Character Database. A simplified version of this function is available as pango_unichar_get_direction(). Unicode bidirectional algorithm.
|
Pango | |
Determines possible line, word, and character breaks
for a string of Unicode text with a single analysis.
Determines possible line, word, and character breaks
for a string of Unicode text with a single analysis. For most purposes you may want to use pango_get_log_attrs().
|
Pango | |
Converts extents from Pango units to device units, dividing by the
PANGO_SCALE factor and performing rounding.
Converts extents from Pango units to device units, dividing by the
PANGO_SCALE factor and performing rounding. The inclusive rectangle is converted by flooring the x/y coordinates and extending width/height, such that the final rectangle completely includes the original rectangle. The nearest rectangle is converted by rounding the coordinates of the rectangle to the nearest device unit (pixel). rectangle to completely contain the original rectangle, pass it in as inclusive. If you want two touching-but-not-overlapping rectangles stay touching-but-not-overlapping after rounding to device units, pass them in as nearest.
|
Pango | |
Searches a string the first character that has a strong
direction, according to the Unicode bidirectional algorithm.
Searches a string the first character that has a strong
direction, according to the Unicode bidirectional algorithm. If no such character is found, then PANGO_DIRECTION_NEUTRAL is returned.
|
Pango | |
Pango.find_paragraph_boundary
(String text, gint32 length, gint32 paragraph_delimiter_index, gint32 next_paragraph_start)
:
none
Locates a paragraph boundary in text.
Locates a paragraph boundary in text. A boundary is caused by
delimiter characters, such as a newline, carriage return, carriage return-newline pair, or Unicode paragraph separator character. The index of the run of delimiters is returned in (index after all delimiters) is stored in next_paragraph_start. If no delimiters are found, both paragraph_delimiter_index and off the end).
|
Pango | |
Creates a new font description from a string representation in the
form "[FAMILY-LIST] [STYLE-OPTIONS] [SIZE]", where FAMILY-LIST is a comma separated list of families optionally terminated by a comma, STYLE_OPTIONS is a whitespace separated list of words where each WORD describes one of style, variant, weight, stretch, or gravity, and SIZE is a decimal number (size in points) or optionally followed by the unit modifier "px" for absolute size.
Creates a new font description from a string representation in the
form "[FAMILY-LIST] [STYLE-OPTIONS] [SIZE]", where FAMILY-LIST is a comma separated list of families optionally terminated by a comma, STYLE_OPTIONS is a whitespace separated list of words where each WORD describes one of style, variant, weight, stretch, or gravity, and SIZE is a decimal number (size in points) or optionally followed by the unit modifier "px" for absolute size. Any one of the options may be absent. If FAMILY-LIST is absent, then the family_name field of the resulting font description will be initialized to NULL. If STYLE-OPTIONS is missing, then all style options will be set to the default values. If SIZE is missing, the size in the resulting font description will be set to 0.
|
Pango | |
Pango.get_log_attrs
(String text, gint32 length, gint32 level, Language language, LogAttr log_attrs, gint32 attrs_len)
:
none
Computes a PangoLogAttr for each character in text.
Computes a PangoLogAttr for each character in text. The log_attrs
array must have one PangoLogAttr for each position in text; if last position at the end of the text. text should be an entire paragraph; logical attributes can't be computed without context (for example you need to see spaces on either side of a word to know the word is a word).
|
Pango | |
If ch has the Unicode mirrored property and there is another Unicode
character that typically has a glyph that is the mirror image of ch's glyph, puts that character in the address pointed to by mirrored_ch.
If ch has the Unicode mirrored property and there is another Unicode
character that typically has a glyph that is the mirror image of ch's glyph, puts that character in the address pointed to by mirrored_ch. Use g_unichar_get_mirror_char() instead; the docs for that function provide full details. filled in, FALSE otherwise
|
Pango | |
Finds the gravity that best matches the rotation component
in a PangoMatrix.
Finds the gravity that best matches the rotation component
in a PangoMatrix. PANGO_GRAVITY_AUTO, or PANGO_GRAVITY_SOUTH if matrix is NULL
|
Pango | |
Pango.gravity_get_for_script
(Script script, Gravity base_gravity, GravityHint hint)
:
Pango.Gravity
Based on the script, base gravity, and hint, returns actual gravity
to use in laying out a single PangoItem.
Based on the script, base gravity, and hint, returns actual gravity
to use in laying out a single PangoItem. If base_gravity is PANGO_GRAVITY_AUTO, it is first replaced with the preferred gravity of script. To get the preferred gravity of a script, pass PANGO_GRAVITY_AUTO and PANGO_GRAVITY_HINT_STRONG in. with script.
|
Pango | |
Pango.gravity_get_for_script_and_width
(Script script, gboolean wide, Gravity base_gravity, GravityHint hint)
:
Pango.Gravity
Based on the script, East Asian width, base gravity, and hint,
returns actual gravity to use in laying out a single character or PangoItem.
Based on the script, East Asian width, base gravity, and hint,
returns actual gravity to use in laying out a single character or PangoItem. This function is similar to pango_gravity_get_for_script() except that this function makes a distinction between narrow/half-width and wide/full-width characters also. Wide/full-width characters always stand whereas narrow/full-width characters are always rotated in vertical context. If base_gravity is PANGO_GRAVITY_AUTO, it is first replaced with the preferred gravity of script. with script and wide.
|
Pango | |
Converts a PangoGravity value to its natural rotation in radians.
Converts a PangoGravity value to its natural rotation in radians.
Note that pango_matrix_rotate() takes angle in degrees, not radians. So, to call pango_matrix_rotate() with the output of this function you should multiply it by (180. / G_PI).
|
Pango | |
Checks ch to see if it is a character that should not be
normally rendered on the screen.
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 a few other ones. This is totally different from g_unichar_iszerowidth() and is at best misnamed.
|
Pango | |
Take a RFC-3066 format language tag as a string and convert it to a
PangoLanguage pointer that can be efficiently copied (copy the pointer) and compared with other language tags (compare the pointer.
Take a RFC-3066 format language tag as a string and convert it to a
PangoLanguage pointer that can be efficiently copied (copy the pointer) and compared with other language tags (compare the pointer.) This function first canonicalizes the string by converting it to lowercase, mapping '_' to '-', and stripping all characters other than letters and '-'. Use pango_language_get_default() if you want to get the PangoLanguage for the current locale of the process. if language was NULL. The returned pointer will be valid forever after, and should not be freed.
|
Pango | |
Pango.language_get_default
()
:
Pango.Language
Returns the PangoLanguage for the current locale of the process.
Returns the PangoLanguage for the current locale of the process.
Note that this can change over the life of an application. On Unix systems, this is the return value is derived from affect this through the environment variables LC_ALL, LC_CTYPE or LANG (checked in that order). The locale string typically is in the form lang_COUNTRY, where lang is an ISO-639 language code, and COUNTRY is an ISO-3166 country code. For instance, sv_FI for Swedish as written in Finland or pt_BR for Portuguese as written in Brazil. On Windows, the C library does not use any such environment variables, and setting them won't affect the behavior of functions like ctime(). The user sets the locale through the Regional Options in the Control Panel. The C library (in the setlocale() function) does not use country and language codes, but country and language names spelled out in English. However, this function does check the above environment variables, and does return a Unix-style locale string based on either said environment variables or the thread's current locale. Your application should call for the user settings to take effect. Gtk+ does this in its initialization functions automatically (by calling gtk_set_locale()). See freed.
|
Pango | |
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.
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. character (not byte), that should be freed using g_free.
|
Pango | |
Pango.parse_enum
(Number type, String str, gint32 value, gboolean warn, String possible_values)
:
gboolean
Parses an enum type and stores the result in value.
Parses an enum type and stores the result in value.
If str does not match the nick name of any of the possible values for the enum and is not an integer, FALSE is returned, a warning is issued if warn is TRUE, and a string representing the list of possible values is stored in "none/start/middle/end". If failed and possible_values is not NULL, returned string should be freed using g_free().
|
Pango | |
Pango.parse_markup
(String markup_text, gint32 length, gunichar accel_marker, Object out_values)
:
gboolean
Parses marked-up text (see
markup format) to create a plain-text string and an attribute list.
Parses marked-up text (see
markup format) to create a plain-text string and an attribute list. If accel_marker is nonzero, the given character will mark the character following it as an accelerator. For example, accel_marker might be an ampersand or underscore. All characters marked as an accelerator will receive a PANGO_UNDERLINE_LOW attribute, and the first character so marked will be returned in accel_char. Two accel_marker characters following each other produce a single literal accel_marker character. If any error happens, none of the output arguments are touched except for error.
|
Pango | |
Parses a font stretch.
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 | |
Parses a font style.
Parses a font style. The allowed values are "normal",
"italic" and "oblique", case variations being ignored.
|
Pango | |
Parses a font variant.
Parses a font variant. The allowed values are "normal"
and "smallcaps" or "small_caps", case variations being ignored.
|
Pango | |
Parses a font weight.
Parses a font weight. The allowed values are "heavy",
"ultrabold", "bold", "normal", "light", "ultraleight" and integers. Case variations are ignored.
|
Pango | |
Quantizes the thickness and position of a line, typically an
underline or strikethrough, to whole device pixels, that is integer multiples of PANGO_SCALE.
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. Care is taken to make sure thickness is at least one pixel when this function returns, but returned position may become zero as a result of rounding.
|
Pango | |
Reads an entire line from a file into a buffer.
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. the number of lines read (this is useful for maintaining a line number counter which doesn't combine lines with '\')
|
Pango | |
Pango | ||
Scans a string into a GString buffer.
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 | |
Scans a word into a GString buffer.
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 | |
Looks up the PangoScript for a particular character (as defined by
Unicode Standard Annex #24).
Looks up the PangoScript for a particular character (as defined by
Unicode Standard Annex #24). No check is made for ch being a valid Unicode character; if you pass in invalid character, the result is undefined. As of Pango 1.18, this function simply returns the return value of g_unichar_get_script().
|
Pango | |
Given a script, finds a language tag that is reasonably
representative of that script.
Given a script, finds a language tag that is reasonably
representative of that script. This will usually be the most widely spoken or used language written in that script: for instance, the sample language for PANGO_SCRIPT_CYRILLIC is for PANGO_SCRIPT_ARABIC is For some scripts, no sample language will be returned because there is no language that is sufficiently representative. The best example of this is PANGO_SCRIPT_HAN, where various different variants of written Chinese, Japanese, and Korean all use significantly different sets of Han characters and forms of shared characters. No sample language can be provided for many historical scripts as well. As of 1.18, this function checks the environment variables PANGO_LANGUAGE and LANGUAGE (checked in that order) first. If one of them is set, it is parsed as a list of language tags separated by colons or other separators. This function will return the first language in the parsed list that Pango believes may use script for writing. This last predicate is tested using pango_language_includes_script(). This can be used to control Pango's font selection for non-primary languages. For example, a PANGO_LANGUAGE enviroment variable set to "en:fa" makes Pango choose fonts suitable for Persian (fa) instead of Arabic (ar) when a segment of Arabic text is found in an otherwise non-Arabic text. The same trick can be used to choose a default language for PANGO_SCRIPT_HAN when setting context language is not feasible. of the script, or NULL if no such language exists.
|
Pango | |
Given a segment of text and the corresponding
PangoAnalysis structure returned from pango_itemize(), convert the characters into glyphs.
Given a segment of text and the corresponding
PangoAnalysis structure returned from pango_itemize(), convert the characters into glyphs. You may also pass in only a substring of the item from pango_itemize().
|
Pango | |
Pango | ||
Pango | ||
Determines the inherent direction of a character; either
PANGO_DIRECTION_LTR, PANGO_DIRECTION_RTL, or PANGO_DIRECTION_NEUTRAL.
Determines the inherent direction of a character; either
PANGO_DIRECTION_LTR, PANGO_DIRECTION_RTL, or PANGO_DIRECTION_NEUTRAL. This function is useful to categorize characters into left-to-right letters, right-to-left letters, and everything else. If full Unicode bidirectional type of a character is needed, pango_bidi_type_for_gunichar() can be used instead.
|
Pango | |
Pango | ||
Pango | ||
Pango.version
()
:
gint32
This is similar to the macro PANGO_VERSION except that
it returns the encoded version of Pango available at run-time, as opposed to the version available at compile-time.
This is similar to the macro PANGO_VERSION except that
it returns the encoded version of Pango available at run-time, as opposed to the version available at compile-time. A version number can be encoded into an integer using PANGO_VERSION_ENCODE(). available at run time.
|
Pango | |
Checks that the Pango library in use is compatible with the
given version.
Checks that the Pango library in use is compatible with the
given version. Generally you would pass in the constants PANGO_VERSION_MAJOR, PANGO_VERSION_MINOR, PANGO_VERSION_MICRO as the three arguments to this function; that produces a check that the library in use at run-time is compatible with the version of Pango the application or module was compiled against. of the running library is newer than the version the running library must be binary compatible with the version required_major.required_minor.required_micro (same major version.) For compile-time version checking use PANGO_VERSION_CHECK(). given version, or a string describing the version mismatch. The returned string is owned by Pango and should not be modified or freed.
|
Pango | |
Pango.version_string
()
:
String
This is similar to the macro PANGO_VERSION_STRING except that
it returns the version of Pango available at run-time, as opposed to the version available at compile-time.
This is similar to the macro PANGO_VERSION_STRING except that
it returns the version of Pango available at run-time, as opposed to the version available at compile-time. available at run time. The returned string is owned by Pango and should not be modified or freed.
|
Pango |
None |