module Pango

Extended Modules

Defined in:

lib/gi-crystal/src/auto/pango-1.0/analysis.cr
lib/gi-crystal/src/auto/pango-1.0/attr_class.cr
lib/gi-crystal/src/auto/pango-1.0/attr_color.cr
lib/gi-crystal/src/auto/pango-1.0/attr_float.cr
lib/gi-crystal/src/auto/pango-1.0/attr_font_desc.cr
lib/gi-crystal/src/auto/pango-1.0/attr_font_features.cr
lib/gi-crystal/src/auto/pango-1.0/attr_int.cr
lib/gi-crystal/src/auto/pango-1.0/attr_iterator.cr
lib/gi-crystal/src/auto/pango-1.0/attr_language.cr
lib/gi-crystal/src/auto/pango-1.0/attr_list.cr
lib/gi-crystal/src/auto/pango-1.0/attr_shape.cr
lib/gi-crystal/src/auto/pango-1.0/attr_size.cr
lib/gi-crystal/src/auto/pango-1.0/attr_string.cr
lib/gi-crystal/src/auto/pango-1.0/attribute.cr
lib/gi-crystal/src/auto/pango-1.0/color.cr
lib/gi-crystal/src/auto/pango-1.0/context.cr
lib/gi-crystal/src/auto/pango-1.0/coverage.cr
lib/gi-crystal/src/auto/pango-1.0/font.cr
lib/gi-crystal/src/auto/pango-1.0/font_description.cr
lib/gi-crystal/src/auto/pango-1.0/font_face.cr
lib/gi-crystal/src/auto/pango-1.0/font_family.cr
lib/gi-crystal/src/auto/pango-1.0/font_map.cr
lib/gi-crystal/src/auto/pango-1.0/font_metrics.cr
lib/gi-crystal/src/auto/pango-1.0/fontset.cr
lib/gi-crystal/src/auto/pango-1.0/fontset_simple.cr
lib/gi-crystal/src/auto/pango-1.0/glyph_geometry.cr
lib/gi-crystal/src/auto/pango-1.0/glyph_info.cr
lib/gi-crystal/src/auto/pango-1.0/glyph_item.cr
lib/gi-crystal/src/auto/pango-1.0/glyph_item_iter.cr
lib/gi-crystal/src/auto/pango-1.0/glyph_string.cr
lib/gi-crystal/src/auto/pango-1.0/glyph_vis_attr.cr
lib/gi-crystal/src/auto/pango-1.0/item.cr
lib/gi-crystal/src/auto/pango-1.0/language.cr
lib/gi-crystal/src/auto/pango-1.0/layout.cr
lib/gi-crystal/src/auto/pango-1.0/layout_iter.cr
lib/gi-crystal/src/auto/pango-1.0/layout_line.cr
lib/gi-crystal/src/auto/pango-1.0/log_attr.cr
lib/gi-crystal/src/auto/pango-1.0/matrix.cr
lib/gi-crystal/src/auto/pango-1.0/pango.cr
lib/gi-crystal/src/auto/pango-1.0/rectangle.cr
lib/gi-crystal/src/auto/pango-1.0/renderer.cr
lib/gi-crystal/src/auto/pango-1.0/renderer_private.cr
lib/gi-crystal/src/auto/pango-1.0/script_iter.cr
lib/gi-crystal/src/auto/pango-1.0/tab_array.cr
lib/gtk4/src/bindings/pango/attribute.cr
lib/gtk4/src/bindings/pango/font_metrics.cr
lib/gtk4/src/bindings/pango/layout.cr

Constant Summary

ANALYSIS_FLAG_CENTERED_BASELINE = 1

Whether the segment should be shifted to center around the baseline.

This is mainly used in vertical writing directions.

ANALYSIS_FLAG_IS_ELLIPSIS = 2

Whether this run holds ellipsized text.

ANALYSIS_FLAG_NEED_HYPHEN = 4

Whether to add a hyphen at the end of the run during shaping.

ATTR_INDEX_FROM_TEXT_BEGINNING = 0_u32

Value for @start_index in Pango::Attribute that indicates the beginning of the text.

ATTR_INDEX_TO_TEXT_END = 4294967295_u32

Value for @end_index in Pango::Attribute that indicates the end of the text.

GLYPH_EMPTY = 268435455_u32

A Pango::Glyph value that indicates a zero-width empty glpyh.

This is useful for example in shaper modules, to use as the glyph for various zero-width Unicode characters (those passing #is_zero_width?).

GLYPH_INVALID_INPUT = 4294967295_u32

A Pango::Glyph value for invalid input.

Pango::Layout produces one such glyph per invalid input UTF-8 byte and such a glyph is rendered as a crossed box.

Note that this value is defined such that it has the %PANGO_GLYPH_UNKNOWN_FLAG set.

GLYPH_UNKNOWN_FLAG = 268435456_u32

Flag used in Pango::Glyph to turn a gunichar value of a valid Unicode character into an unknown-character glyph for that gunichar.

Such unknown-character glyphs may be rendered as a 'hex box'.

SCALE = 1024

The scale between dimensions used for Pango distances and device units.

The definition of device units is dependent on the output device; it will typically be pixels for a screen, and points for a printer. %PANGO_SCALE is currently 1024, but this may be changed in the future.

When setting font sizes, device units are always considered to be points (as in "12 point font"), rather than pixels.

VERSION_MAJOR = 1

The major component of the version of Pango available at compile-time.

VERSION_MICRO = 10

The micro component of the version of Pango available at compile-time.

VERSION_MINOR = 50

The minor component of the version of Pango available at compile-time.

VERSION_STRING = "1.50.10"

A string literal containing the version of Pango available at compile-time.

Class Method Summary

Instance Method Summary

Class Method Detail

def self.attr_allow_breaks_new(allow_breaks : Bool) : Pango::Attribute #

def self.attr_background_alpha_new(alpha : UInt16) : Pango::Attribute #

def self.attr_background_new(red : UInt16, green : UInt16, blue : UInt16) : Pango::Attribute #

def self.attr_baseline_shift_new(shift : Int32) : Pango::Attribute #

def self.attr_break(text : String, length : Int32, attr_list : Pango::AttrList, offset : Int32, attrs : Enumerable(Pango::LogAttr)) : Nil #

def self.attr_fallback_new(enable_fallback : Bool) : Pango::Attribute #

def self.attr_family_new(family : String) : Pango::Attribute #

def self.attr_font_desc_new(desc : Pango::FontDescription) : Pango::Attribute #

def self.attr_font_features_new(features : String) : Pango::Attribute #

def self.attr_font_scale_new(scale : Pango::FontScale) : Pango::Attribute #

def self.attr_foreground_alpha_new(alpha : UInt16) : Pango::Attribute #

def self.attr_foreground_new(red : UInt16, green : UInt16, blue : UInt16) : Pango::Attribute #

def self.attr_gravity_hint_new(hint : Pango::GravityHint) : Pango::Attribute #

def self.attr_gravity_new(gravity : Pango::Gravity) : Pango::Attribute #

def self.attr_insert_hyphens_new(insert_hyphens : Bool) : Pango::Attribute #

def self.attr_language_new(language : Pango::Language) : Pango::Attribute #

def self.attr_letter_spacing_new(letter_spacing : Int32) : Pango::Attribute #

def self.attr_line_height_new(factor : Float64) : Pango::Attribute #

def self.attr_line_height_new_absolute(height : Int32) : Pango::Attribute #

def self.attr_list_from_string(text : String) : Pango::AttrList? #

def self.attr_overline_color_new(red : UInt16, green : UInt16, blue : UInt16) : Pango::Attribute #

def self.attr_overline_new(overline : Pango::Overline) : Pango::Attribute #

def self.attr_rise_new(rise : Int32) : Pango::Attribute #

def self.attr_scale_new(scale_factor : Float64) : Pango::Attribute #

def self.attr_sentence_new : Pango::Attribute #

def self.attr_shape_new(ink_rect : Pango::Rectangle, logical_rect : Pango::Rectangle) : Pango::Attribute #

def self.attr_shape_new_with_data(ink_rect : Pango::Rectangle, logical_rect : Pango::Rectangle, data : Pointer(Void)?, copy_func : Pango::AttrDataCopyFunc?, destroy_func : GLib::DestroyNotify?) : Pango::Attribute #

def self.attr_show_new(flags : Pango::ShowFlags) : Pango::Attribute #

def self.attr_size_new(size : Int32) : Pango::Attribute #

def self.attr_size_new_absolute(size : Int32) : Pango::Attribute #

def self.attr_stretch_new(stretch : Pango::Stretch) : Pango::Attribute #

def self.attr_strikethrough_color_new(red : UInt16, green : UInt16, blue : UInt16) : Pango::Attribute #

def self.attr_strikethrough_new(strikethrough : Bool) : Pango::Attribute #

def self.attr_style_new(style : Pango::Style) : Pango::Attribute #

def self.attr_text_transform_new(transform : Pango::TextTransform) : Pango::Attribute #

def self.attr_type_get_name(type : Pango::AttrType) : String? #

def self.attr_type_register(name : String) : Pango::AttrType #

def self.attr_underline_color_new(red : UInt16, green : UInt16, blue : UInt16) : Pango::Attribute #

def self.attr_underline_new(underline : Pango::Underline) : Pango::Attribute #

def self.attr_variant_new(variant : Pango::Variant) : Pango::Attribute #

def self.attr_weight_new(weight : Pango::Weight) : Pango::Attribute #

def self.attr_word_new : Pango::Attribute #

def self.bidi_type_for_unichar(ch : UInt32) : Pango::BidiType #

def self.break(text : String, length : Int32, analysis : Pango::Analysis, attrs : Enumerable(Pango::LogAttr)) : Nil #

def self.default_break(text : String, length : Int32, analysis : Pango::Analysis?, attrs : Pango::LogAttr, attrs_len : Int32) : Nil #

def self.extents_to_pixels(inclusive : Pango::Rectangle?, nearest : Pango::Rectangle?) : Nil #

def self.find_base_dir(text : String, length : Int32) : Pango::Direction #

def self.find_paragraph_boundary(text : String, length : Int32, paragraph_delimiter_index : Int32, next_paragraph_start : Int32) : Nil #

def self.font_description_from_string(str : String) : Pango::FontDescription #

def self.gravity_get_for_matrix(matrix : Pango::Matrix?) : Pango::Gravity #

def self.gravity_get_for_script(script : Pango::Script, base_gravity : Pango::Gravity, hint : Pango::GravityHint) : Pango::Gravity #

def self.gravity_get_for_script_and_width(script : Pango::Script, wide : Bool, base_gravity : Pango::Gravity, hint : Pango::GravityHint) : Pango::Gravity #

def self.gravity_to_rotation(gravity : Pango::Gravity) : Float64 #

def self.is_zero_width(ch : UInt32) : Bool #

def self.itemize(context : Pango::Context, text : String, start_index : Int32, length : Int32, attrs : Pango::AttrList, cached_iter : Pango::AttrIterator?) : GLib::List #

def self.itemize_with_base_dir(context : Pango::Context, base_dir : Pango::Direction, text : String, start_index : Int32, length : Int32, attrs : Pango::AttrList, cached_iter : Pango::AttrIterator?) : GLib::List #

def self.language_from_string(language : String?) : Pango::Language? #

def self.language_get_default : Pango::Language #

def self.language_get_preferred : Pango::Language? #

def self.layout_deserialize_error_quark : UInt32 #

def self.log2vis_get_embedding_levels(text : String, length : Int32, pbase_dir : Pango::Direction) : Pointer(UInt8) #

def self.log_attrs(text : String, length : Int32, level : Int32, language : Pango::Language, attrs : Enumerable(Pango::LogAttr)) : Nil #

def self.markup_parser_new(accel_marker : UInt32) : GLib::MarkupParseContext #

def self.mirror_char(ch : UInt32, mirrored_ch : Pointer(UInt32)) : Bool #

def self.parse_enum(type : UInt64, str : String?, warn : Bool) : Bool #

def self.parse_stretch(str : String, stretch : Pango::Stretch, warn : Bool) : Bool #

def self.parse_style(str : String, style : Pango::Style, warn : Bool) : Bool #

def self.parse_variant(str : String, variant : Pango::Variant, warn : Bool) : Bool #

def self.parse_weight(str : String, weight : Pango::Weight, warn : Bool) : Bool #

def self.quantize_line_geometry(thickness : Int32, position : Int32) : Nil #

def self.read_line(stream : Pointer(Void)?, str : GLib::String) : Int32 #

def self.reorder_items(items : GLib::List) : GLib::List #

def self.scan_int(pos : String, out _out : Int32) : Bool #

def self.scan_string(pos : String, out _out : GLib::String) : Bool #

def self.scan_word(pos : String, out _out : GLib::String) : Bool #

def self.script_for_unichar(ch : UInt32) : Pango::Script #

def self.script_get_sample_language(script : Pango::Script) : Pango::Language? #

def self.shape(text : String, length : Int32, analysis : Pango::Analysis, glyphs : Pango::GlyphString) : Nil #

def self.shape_full(item_text : String, item_length : Int32, paragraph_text : String?, paragraph_length : Int32, analysis : Pango::Analysis, glyphs : Pango::GlyphString) : Nil #

def self.shape_item(item : Pango::Item, paragraph_text : String?, paragraph_length : Int32, log_attrs : Pango::LogAttr?, glyphs : Pango::GlyphString, flags : Pango::ShapeFlags) : Nil #

def self.shape_with_flags(item_text : String, item_length : Int32, paragraph_text : String?, paragraph_length : Int32, analysis : Pango::Analysis, glyphs : Pango::GlyphString, flags : Pango::ShapeFlags) : Nil #

def self.skip_space(pos : String) : Bool #

def self.split_file_list(str : String) : Enumerable(String) #

def self.tab_array_from_string(text : String) : Pango::TabArray? #

def self.tailor_break(text : String, length : Int32, analysis : Pango::Analysis, offset : Int32, attrs : Enumerable(Pango::LogAttr)) : Nil #

def self.trim_string(str : String) : String #

def self.unichar_direction(ch : UInt32) : Pango::Direction #

def self.units_from_double(d : Float64) : Int32 #

def self.units_to_double(i : Int32) : Float64 #

def self.version : Int32 #

def self.version_check(required_major : Int32, required_minor : Int32, required_micro : Int32) : String? #

def self.version_string : String #

Instance Method Detail

def markup_parser_finish(context : GLib::MarkupParseContext) : Bool #

def parse_markup(markup_text : String, length : Int32, accel_marker : UInt32) : Bool #