1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
// Take a look at the license at the top of the repository in the LICENSE file.

#![cfg_attr(feature = "dox", feature(doc_cfg))]
#![doc = include_str!("../README.md")]

pub use ffi;
pub use glib;

#[allow(clippy::too_many_arguments)]
#[allow(clippy::derived_hash_with_manual_eq)]
#[allow(clippy::missing_safety_doc)]
mod auto;
pub use crate::{
    auto::{functions::*, *},
    functions::*,
};

/// 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.
#[doc(alias = "PANGO_SCALE")]
pub const SCALE: i32 = ffi::PANGO_SCALE;
/// Whether the segment should be shifted to center around the baseline.
///
/// This is mainly used in vertical writing directions.
#[doc(alias = "PANGO_ANALYSIS_FLAG_CENTERED_BASELINE")]
pub const ANALYSIS_FLAG_CENTERED_BASELINE: i32 = ffi::PANGO_ANALYSIS_FLAG_CENTERED_BASELINE;
/// Whether this run holds ellipsized text.
#[doc(alias = "PANGO_ANALYSIS_FLAG_IS_ELLIPSIS")]
pub const ANALYSIS_FLAG_IS_ELLIPSIS: i32 = ffi::PANGO_ANALYSIS_FLAG_IS_ELLIPSIS;
/// Whether to add a hyphen at the end of the run during shaping.
#[doc(alias = "PANGO_ANALYSIS_FLAG_NEED_HYPHEN")]
pub const ANALYSIS_FLAG_NEED_HYPHEN: i32 = ffi::PANGO_ANALYSIS_FLAG_NEED_HYPHEN;
/// Value for @start_index in [`Attribute`][crate::Attribute] that indicates
/// the beginning of the text.
#[doc(alias = "PANGO_ATTR_INDEX_FROM_TEXT_BEGINNING")]
pub const ATTR_INDEX_FROM_TEXT_BEGINNING: u32 = ffi::PANGO_ATTR_INDEX_FROM_TEXT_BEGINNING;
/// Value for @end_index in [`Attribute`][crate::Attribute] that indicates
/// the end of the text.
#[doc(alias = "PANGO_ATTR_INDEX_TO_TEXT_END")]
pub const ATTR_INDEX_TO_TEXT_END: u32 = ffi::PANGO_ATTR_INDEX_TO_TEXT_END;
/// A `PangoGlyph` 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()`][crate::is_zero_width()]).
#[doc(alias = "PANGO_GLYPH_EMPTY")]
pub const GLYPH_EMPTY: Glyph = ffi::PANGO_GLYPH_EMPTY;
/// A `PangoGlyph` value for invalid input.
///
/// [`Layout`][crate::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.
#[doc(alias = "PANGO_GLYPH_INVALID_INPUT")]
pub const GLYPH_INVALID_INPUT: Glyph = ffi::PANGO_GLYPH_INVALID_INPUT;
/// Flag used in `PangoGlyph` 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'.
#[doc(alias = "PANGO_GLYPH_UNKNOWN_FLAG")]
pub const GLYPH_UNKNOWN_FLAG: Glyph = ffi::PANGO_GLYPH_UNKNOWN_FLAG;

// rustdoc-stripper-ignore-next
/// The scale factor for three shrinking steps (1 / (1.2 * 1.2 * 1.2)).
pub const SCALE_XX_SMALL: f64 = 0.5787037037037;

// rustdoc-stripper-ignore-next
/// The scale factor for two shrinking steps (1 / (1.2 * 1.2)).
pub const SCALE_X_SMALL: f64 = 0.6944444444444;

// rustdoc-stripper-ignore-next
/// The scale factor for one shrinking step (1 / 1.2).
pub const SCALE_SMALL: f64 = 0.8333333333333;

// rustdoc-stripper-ignore-next
/// The scale factor for normal size (1.0).
pub const SCALE_MEDIUM: f64 = 1.0;

// rustdoc-stripper-ignore-next
/// The scale factor for one magnification step (1.2).
pub const SCALE_LARGE: f64 = 1.2;

// rustdoc-stripper-ignore-next
/// The scale factor for two magnification steps (1.2 * 1.2).
pub const SCALE_X_LARGE: f64 = 1.44;

// rustdoc-stripper-ignore-next
/// The scale factor for three magnification steps (1.2 * 1.2 * 1.2).
pub const SCALE_XX_LARGE: f64 = 1.728;

pub mod prelude;

#[macro_use]
mod attribute;
pub use attribute::IsAttribute;

mod analysis;
pub use analysis::Analysis;
mod attr_class;
pub use attr_class::AttrClass;
mod attr_color;
pub use attr_color::AttrColor;
mod attr_float;
pub use attr_float::AttrFloat;
mod attr_font_desc;
pub use attr_font_desc::AttrFontDesc;
mod attr_font_features;
pub use attr_font_features::AttrFontFeatures;
mod attr_int;
pub use attr_int::AttrInt;
mod attr_iterator;
pub use attr_iterator::{AttrIntoIter, AttrIterator};
mod attr_language;
pub use attr_language::AttrLanguage;
mod attr_list;
mod attr_shape;
pub use attr_shape::AttrShape;
mod attr_size;
pub use attr_size::AttrSize;
mod attr_string;
pub use attr_string::AttrString;
mod color;
mod coverage;
pub use coverage::Coverage;
mod enums;
mod functions;
mod glyph_geometry;
pub use glyph_geometry::GlyphGeometry;
mod glyph_info;
pub use glyph_info::GlyphInfo;
mod glyph_item;
mod glyph_item_iter;
pub use glyph_item_iter::{GlyphItemIntoIter, GlyphItemIter};
mod glyph_string;
mod item;
mod language;
mod layout;
pub use layout::HitPosition;
mod matrix;
mod rectangle;
pub use rectangle::Rectangle;
mod script_iter;
pub use script_iter::{ScriptIntoIter, ScriptIter};
mod tab_array;