/** * hb_position_t: * * Data type for holding a single coordinate value. * Contour points and other multi-dimensional data are * stored as tuples of #hb_position_t's. *
**/ typedef int32_t hb_position_t; /** * hb_mask_t: * * Data type for bitmasks. *
**/ typedef uint32_t hb_mask_t;
/** * hb_tag_t: * * Data type for tag identifiers. Tags are four * byte integers, each byte representing a character. * * Tags are used to identify tables, design-variation axes, * scripts, languages, font features, and baselines with * human-readable names. *
**/ typedef uint32_t hb_tag_t;
/** * HB_TAG: * @c1: 1st character of the tag * @c2: 2nd character of the tag * @c3: 3rd character of the tag * @c4: 4th character of the tag * * Constructs an #hb_tag_t from four character literals. *
**/ #define HB_TAG(c1,c2,c3,c4) ((hb_tag_t)((((uint32_t)(c1)&0xFF)<<24)|(((uint32_t)(c2)&0xFF)<<16)|(((uint32_t)(c3)&0xFF)<<8)|((uint32_t)(c4)&0xFF)))
/** * HB_UNTAG: * @tag: an #hb_tag_t * * Extracts four character literals from an #hb_tag_t. * * Since: 0.6.0 *
**/ #define HB_UNTAG(tag) (uint8_t)(((tag)>>24)&0xFF), (uint8_t)(((tag)>>16)&0xFF), (uint8_t)(((tag)>>8)&0xFF), (uint8_t)((tag)&0xFF)
/** * HB_TAG_NONE: * * Unset #hb_tag_t.
*/ #define HB_TAG_NONE HB_TAG(0,0,0,0) /** * HB_TAG_MAX: * * Maximum possible unsigned #hb_tag_t. * * Since: 0.9.26
*/ #define HB_TAG_MAX HB_TAG(0xff,0xff,0xff,0xff) /** * HB_TAG_MAX_SIGNED: * * Maximum possible signed #hb_tag_t. * * Since: 0.9.33
*/ #define HB_TAG_MAX_SIGNED HB_TAG(0x7f,0xff,0xff,0xff)
/* len=-1 means str is NUL-terminated. */
HB_EXTERN hb_tag_t
hb_tag_from_string (constchar *str, int len);
/* buf should have 4 bytes. */
HB_EXTERN void
hb_tag_to_string (hb_tag_t tag, char *buf);
/** * hb_direction_t: * @HB_DIRECTION_INVALID: Initial, unset direction. * @HB_DIRECTION_LTR: Text is set horizontally from left to right. * @HB_DIRECTION_RTL: Text is set horizontally from right to left. * @HB_DIRECTION_TTB: Text is set vertically from top to bottom. * @HB_DIRECTION_BTT: Text is set vertically from bottom to top. * * The direction of a text segment or buffer. * * A segment can also be tested for horizontal or vertical * orientation (irrespective of specific direction) with * HB_DIRECTION_IS_HORIZONTAL() or HB_DIRECTION_IS_VERTICAL(). *
*/ typedefenum {
HB_DIRECTION_INVALID = 0,
HB_DIRECTION_LTR = 4,
HB_DIRECTION_RTL,
HB_DIRECTION_TTB,
HB_DIRECTION_BTT
} hb_direction_t;
/* len=-1 means str is NUL-terminated */
HB_EXTERN hb_direction_t
hb_direction_from_string (constchar *str, int len);
/** * HB_DIRECTION_IS_VALID: * @dir: #hb_direction_t to test * * Tests whether a text direction is valid. *
**/ #define HB_DIRECTION_IS_VALID(dir) ((((unsignedint) (dir)) & ~3U) == 4) /* Direction must be valid for the following */ /** * HB_DIRECTION_IS_HORIZONTAL: * @dir: #hb_direction_t to test * * Tests whether a text direction is horizontal. Requires * that the direction be valid. *
**/ #define HB_DIRECTION_IS_HORIZONTAL(dir) ((((unsignedint) (dir)) & ~1U) == 4) /** * HB_DIRECTION_IS_VERTICAL: * @dir: #hb_direction_t to test * * Tests whether a text direction is vertical. Requires * that the direction be valid. *
**/ #define HB_DIRECTION_IS_VERTICAL(dir) ((((unsignedint) (dir)) & ~1U) == 6) /** * HB_DIRECTION_IS_FORWARD: * @dir: #hb_direction_t to test * * Tests whether a text direction moves forward (from left to right, or from * top to bottom). Requires that the direction be valid. *
**/ #define HB_DIRECTION_IS_FORWARD(dir) ((((unsignedint) (dir)) & ~2U) == 4) /** * HB_DIRECTION_IS_BACKWARD: * @dir: #hb_direction_t to test * * Tests whether a text direction moves backward (from right to left, or from * bottom to top). Requires that the direction be valid. *
**/ #define HB_DIRECTION_IS_BACKWARD(dir) ((((unsignedint) (dir)) & ~2U) == 5) /** * HB_DIRECTION_REVERSE: * @dir: #hb_direction_t to reverse * * Reverses a text direction. Requires that the direction * be valid. *
**/ #define HB_DIRECTION_REVERSE(dir) ((hb_direction_t) (((unsignedint) (dir)) ^ 1))
/* hb_language_t */
/** * hb_language_t: * * Data type for languages. Each #hb_language_t corresponds to a BCP 47 * language tag. *
*/ typedefconststruct hb_language_impl_t *hb_language_t;
HB_EXTERN hb_language_t
hb_language_from_string (constchar *str, int len);
/* No script set. */
HB_SCRIPT_INVALID = HB_TAG_NONE,
/*< private >*/
/* Dummy values to ensure any hb_tag_t value can be passed/stored as hb_script_t * without risking undefined behavior. We have two, for historical reasons. * HB_TAG_MAX used to be unsigned, but that was invalid Ansi C, so was changed * to _HB_SCRIPT_MAX_VALUE to be equal to HB_TAG_MAX_SIGNED as well. * * See this thread for technicalities: * * https://lists.freedesktop.org/archives/harfbuzz/2014-March/004150.html
*/
_HB_SCRIPT_MAX_VALUE = HB_TAG_MAX_SIGNED, /*< skip >*/
_HB_SCRIPT_MAX_VALUE_SIGNED = HB_TAG_MAX_SIGNED /*< skip >*/
/** * hb_destroy_func_t: * @user_data: the data to be destroyed * * A virtual method for destroy user-data callbacks. *
*/ typedefvoid (*hb_destroy_func_t) (void *user_data);
/* Font features and variations. */
/** * HB_FEATURE_GLOBAL_START: * * Special setting for #hb_feature_t.start to apply the feature from the start * of the buffer. * * Since: 2.0.0
*/ #define HB_FEATURE_GLOBAL_START 0
/** * HB_FEATURE_GLOBAL_END: * * Special setting for #hb_feature_t.end to apply the feature from to the end * of the buffer. * * Since: 2.0.0
*/ #define HB_FEATURE_GLOBAL_END ((unsignedint) -1)
/** * hb_feature_t: * @tag: The #hb_tag_t tag of the feature * @value: The value of the feature. 0 disables the feature, non-zero (usually * 1) enables the feature. For features implemented as lookup type 3 (like * 'salt') the @value is a one based index into the alternates. * @start: the cluster to start applying this feature setting (inclusive). * @end: the cluster to end applying this feature setting (exclusive). * * The #hb_feature_t is the structure that holds information about requested * feature application. The feature will be applied with the given value to all * glyphs which are in clusters between @start (inclusive) and @end (exclusive). * Setting start to #HB_FEATURE_GLOBAL_START and end to #HB_FEATURE_GLOBAL_END * specifies that the feature always applies to the entire buffer.
*/ typedefstruct hb_feature_t {
hb_tag_t tag;
uint32_t value; unsignedint start; unsignedint end;
} hb_feature_t;
HB_EXTERN hb_bool_t
hb_feature_from_string (constchar *str, int len,
hb_feature_t *feature);
/** * hb_variation_t: * @tag: The #hb_tag_t tag of the variation-axis name * @value: The value of the variation axis * * Data type for holding variation data. Registered OpenType * variation-axis tags are listed in * [OpenType Axis Tag Registry](https://docs.microsoft.com/en-us/typography/opentype/spec/dvaraxisreg). * * Since: 1.4.2
*/ typedefstruct hb_variation_t {
hb_tag_t tag; float value;
} hb_variation_t;
HB_EXTERN hb_bool_t
hb_variation_from_string (constchar *str, int len,
hb_variation_t *variation);
/** * hb_color_t: * * Data type for holding color values. Colors are eight bits per * channel RGB plus alpha transparency. * * Since: 2.1.0
*/ typedef uint32_t hb_color_t;
/** * HB_COLOR: * @b: blue channel value * @g: green channel value * @r: red channel value * @a: alpha channel value * * Constructs an #hb_color_t from four integers. * * Since: 2.1.0
*/ #define HB_COLOR(b,g,r,a) ((hb_color_t) HB_TAG ((b),(g),(r),(a)))
/** * hb_glyph_extents_t: * @x_bearing: Distance from the x-origin to the left extremum of the glyph. * @y_bearing: Distance from the top extremum of the glyph to the y-origin. * @width: Distance from the left extremum of the glyph to the right extremum. * @height: Distance from the top extremum of the glyph to the bottom extremum. * * Glyph extent values, measured in font units. * * Note that @height is negative, in coordinate systems that grow up.
**/ typedefstruct hb_glyph_extents_t {
hb_position_t x_bearing;
hb_position_t y_bearing;
hb_position_t width;
hb_position_t height;
} hb_glyph_extents_t;
/** * hb_font_t: * * Data type for holding fonts. *
*/ typedefstruct hb_font_t hb_font_t;
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.