w32tex
About: TeX Live provides a comprehensive TeX system including all the major TeX-related programs, macro packages, and fonts that are free software. Windows sources.
  Fossies Dox: w32tex-src.tar.xz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

hb-font.h File Reference
#include "hb-common.h"
#include "hb-face.h"
#include "hb-draw.h"
Include dependency graph for hb-font.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  hb_font_extents_t
 
struct  hb_glyph_extents_t
 

Typedefs

typedef struct hb_font_t hb_font_t
 
typedef struct hb_font_funcs_t hb_font_funcs_t
 
typedef struct hb_font_extents_t hb_font_extents_t
 
typedef struct hb_glyph_extents_t hb_glyph_extents_t
 
typedef hb_bool_t(* hb_font_get_font_extents_func_t) (hb_font_t *font, void *font_data, hb_font_extents_t *extents, void *user_data)
 
typedef hb_font_get_font_extents_func_t hb_font_get_font_h_extents_func_t
 
typedef hb_font_get_font_extents_func_t hb_font_get_font_v_extents_func_t
 
typedef hb_bool_t(* hb_font_get_nominal_glyph_func_t) (hb_font_t *font, void *font_data, hb_codepoint_t unicode, hb_codepoint_t *glyph, void *user_data)
 
typedef hb_bool_t(* hb_font_get_variation_glyph_func_t) (hb_font_t *font, void *font_data, hb_codepoint_t unicode, hb_codepoint_t variation_selector, hb_codepoint_t *glyph, void *user_data)
 
typedef unsigned int(* hb_font_get_nominal_glyphs_func_t) (hb_font_t *font, void *font_data, unsigned int count, const hb_codepoint_t *first_unicode, unsigned int unicode_stride, hb_codepoint_t *first_glyph, unsigned int glyph_stride, void *user_data)
 
typedef hb_position_t(* hb_font_get_glyph_advance_func_t) (hb_font_t *font, void *font_data, hb_codepoint_t glyph, void *user_data)
 
typedef hb_font_get_glyph_advance_func_t hb_font_get_glyph_h_advance_func_t
 
typedef hb_font_get_glyph_advance_func_t hb_font_get_glyph_v_advance_func_t
 
typedef void(* hb_font_get_glyph_advances_func_t) (hb_font_t *font, void *font_data, unsigned int count, const hb_codepoint_t *first_glyph, unsigned glyph_stride, hb_position_t *first_advance, unsigned advance_stride, void *user_data)
 
typedef hb_font_get_glyph_advances_func_t hb_font_get_glyph_h_advances_func_t
 
typedef hb_font_get_glyph_advances_func_t hb_font_get_glyph_v_advances_func_t
 
typedef hb_bool_t(* hb_font_get_glyph_origin_func_t) (hb_font_t *font, void *font_data, hb_codepoint_t glyph, hb_position_t *x, hb_position_t *y, void *user_data)
 
typedef hb_font_get_glyph_origin_func_t hb_font_get_glyph_h_origin_func_t
 
typedef hb_font_get_glyph_origin_func_t hb_font_get_glyph_v_origin_func_t
 
typedef hb_position_t(* hb_font_get_glyph_kerning_func_t) (hb_font_t *font, void *font_data, hb_codepoint_t first_glyph, hb_codepoint_t second_glyph, void *user_data)
 
typedef hb_font_get_glyph_kerning_func_t hb_font_get_glyph_h_kerning_func_t
 
typedef hb_bool_t(* hb_font_get_glyph_extents_func_t) (hb_font_t *font, void *font_data, hb_codepoint_t glyph, hb_glyph_extents_t *extents, void *user_data)
 
typedef hb_bool_t(* hb_font_get_glyph_contour_point_func_t) (hb_font_t *font, void *font_data, hb_codepoint_t glyph, unsigned int point_index, hb_position_t *x, hb_position_t *y, void *user_data)
 
typedef hb_bool_t(* hb_font_get_glyph_name_func_t) (hb_font_t *font, void *font_data, hb_codepoint_t glyph, char *name, unsigned int size, void *user_data)
 
typedef hb_bool_t(* hb_font_get_glyph_from_name_func_t) (hb_font_t *font, void *font_data, const char *name, int len, hb_codepoint_t *glyph, void *user_data)
 

Functions

hb_font_funcs_thb_font_funcs_create (void)
 
hb_font_funcs_thb_font_funcs_get_empty (void)
 
hb_font_funcs_thb_font_funcs_reference (hb_font_funcs_t *ffuncs)
 
void hb_font_funcs_destroy (hb_font_funcs_t *ffuncs)
 
hb_bool_t hb_font_funcs_set_user_data (hb_font_funcs_t *ffuncs, hb_user_data_key_t *key, void *data, hb_destroy_func_t destroy, hb_bool_t replace)
 
voidhb_font_funcs_get_user_data (hb_font_funcs_t *ffuncs, hb_user_data_key_t *key)
 
void hb_font_funcs_make_immutable (hb_font_funcs_t *ffuncs)
 
hb_bool_t hb_font_funcs_is_immutable (hb_font_funcs_t *ffuncs)
 
void hb_font_funcs_set_font_h_extents_func (hb_font_funcs_t *ffuncs, hb_font_get_font_h_extents_func_t func, void *user_data, hb_destroy_func_t destroy)
 
void hb_font_funcs_set_font_v_extents_func (hb_font_funcs_t *ffuncs, hb_font_get_font_v_extents_func_t func, void *user_data, hb_destroy_func_t destroy)
 
void hb_font_funcs_set_nominal_glyph_func (hb_font_funcs_t *ffuncs, hb_font_get_nominal_glyph_func_t func, void *user_data, hb_destroy_func_t destroy)
 
void hb_font_funcs_set_nominal_glyphs_func (hb_font_funcs_t *ffuncs, hb_font_get_nominal_glyphs_func_t func, void *user_data, hb_destroy_func_t destroy)
 
void hb_font_funcs_set_variation_glyph_func (hb_font_funcs_t *ffuncs, hb_font_get_variation_glyph_func_t func, void *user_data, hb_destroy_func_t destroy)
 
void hb_font_funcs_set_glyph_h_advance_func (hb_font_funcs_t *ffuncs, hb_font_get_glyph_h_advance_func_t func, void *user_data, hb_destroy_func_t destroy)
 
void hb_font_funcs_set_glyph_v_advance_func (hb_font_funcs_t *ffuncs, hb_font_get_glyph_v_advance_func_t func, void *user_data, hb_destroy_func_t destroy)
 
void hb_font_funcs_set_glyph_h_advances_func (hb_font_funcs_t *ffuncs, hb_font_get_glyph_h_advances_func_t func, void *user_data, hb_destroy_func_t destroy)
 
void hb_font_funcs_set_glyph_v_advances_func (hb_font_funcs_t *ffuncs, hb_font_get_glyph_v_advances_func_t func, void *user_data, hb_destroy_func_t destroy)
 
void hb_font_funcs_set_glyph_h_origin_func (hb_font_funcs_t *ffuncs, hb_font_get_glyph_h_origin_func_t func, void *user_data, hb_destroy_func_t destroy)
 
void hb_font_funcs_set_glyph_v_origin_func (hb_font_funcs_t *ffuncs, hb_font_get_glyph_v_origin_func_t func, void *user_data, hb_destroy_func_t destroy)
 
void hb_font_funcs_set_glyph_h_kerning_func (hb_font_funcs_t *ffuncs, hb_font_get_glyph_h_kerning_func_t func, void *user_data, hb_destroy_func_t destroy)
 
void hb_font_funcs_set_glyph_extents_func (hb_font_funcs_t *ffuncs, hb_font_get_glyph_extents_func_t func, void *user_data, hb_destroy_func_t destroy)
 
void hb_font_funcs_set_glyph_contour_point_func (hb_font_funcs_t *ffuncs, hb_font_get_glyph_contour_point_func_t func, void *user_data, hb_destroy_func_t destroy)
 
void hb_font_funcs_set_glyph_name_func (hb_font_funcs_t *ffuncs, hb_font_get_glyph_name_func_t func, void *user_data, hb_destroy_func_t destroy)
 
void hb_font_funcs_set_glyph_from_name_func (hb_font_funcs_t *ffuncs, hb_font_get_glyph_from_name_func_t func, void *user_data, hb_destroy_func_t destroy)
 
hb_bool_t hb_font_get_h_extents (hb_font_t *font, hb_font_extents_t *extents)
 
hb_bool_t hb_font_get_v_extents (hb_font_t *font, hb_font_extents_t *extents)
 
hb_bool_t hb_font_get_nominal_glyph (hb_font_t *font, hb_codepoint_t unicode, hb_codepoint_t *glyph)
 
hb_bool_t hb_font_get_variation_glyph (hb_font_t *font, hb_codepoint_t unicode, hb_codepoint_t variation_selector, hb_codepoint_t *glyph)
 
unsigned int hb_font_get_nominal_glyphs (hb_font_t *font, unsigned int count, const hb_codepoint_t *first_unicode, unsigned int unicode_stride, hb_codepoint_t *first_glyph, unsigned int glyph_stride)
 
hb_position_t hb_font_get_glyph_h_advance (hb_font_t *font, hb_codepoint_t glyph)
 
hb_position_t hb_font_get_glyph_v_advance (hb_font_t *font, hb_codepoint_t glyph)
 
void hb_font_get_glyph_h_advances (hb_font_t *font, unsigned int count, const hb_codepoint_t *first_glyph, unsigned glyph_stride, hb_position_t *first_advance, unsigned advance_stride)
 
void hb_font_get_glyph_v_advances (hb_font_t *font, unsigned int count, const hb_codepoint_t *first_glyph, unsigned glyph_stride, hb_position_t *first_advance, unsigned advance_stride)
 
hb_bool_t hb_font_get_glyph_h_origin (hb_font_t *font, hb_codepoint_t glyph, hb_position_t *x, hb_position_t *y)
 
hb_bool_t hb_font_get_glyph_v_origin (hb_font_t *font, hb_codepoint_t glyph, hb_position_t *x, hb_position_t *y)
 
hb_position_t hb_font_get_glyph_h_kerning (hb_font_t *font, hb_codepoint_t left_glyph, hb_codepoint_t right_glyph)
 
hb_bool_t hb_font_get_glyph_extents (hb_font_t *font, hb_codepoint_t glyph, hb_glyph_extents_t *extents)
 
hb_bool_t hb_font_get_glyph_contour_point (hb_font_t *font, hb_codepoint_t glyph, unsigned int point_index, hb_position_t *x, hb_position_t *y)
 
hb_bool_t hb_font_get_glyph_name (hb_font_t *font, hb_codepoint_t glyph, char *name, unsigned int size)
 
hb_bool_t hb_font_get_glyph_from_name (hb_font_t *font, const char *name, int len, hb_codepoint_t *glyph)
 
hb_bool_t hb_font_get_glyph (hb_font_t *font, hb_codepoint_t unicode, hb_codepoint_t variation_selector, hb_codepoint_t *glyph)
 
void hb_font_get_extents_for_direction (hb_font_t *font, hb_direction_t direction, hb_font_extents_t *extents)
 
void hb_font_get_glyph_advance_for_direction (hb_font_t *font, hb_codepoint_t glyph, hb_direction_t direction, hb_position_t *x, hb_position_t *y)
 
void hb_font_get_glyph_advances_for_direction (hb_font_t *font, hb_direction_t direction, unsigned int count, const hb_codepoint_t *first_glyph, unsigned glyph_stride, hb_position_t *first_advance, unsigned advance_stride)
 
void hb_font_get_glyph_origin_for_direction (hb_font_t *font, hb_codepoint_t glyph, hb_direction_t direction, hb_position_t *x, hb_position_t *y)
 
void hb_font_add_glyph_origin_for_direction (hb_font_t *font, hb_codepoint_t glyph, hb_direction_t direction, hb_position_t *x, hb_position_t *y)
 
void hb_font_subtract_glyph_origin_for_direction (hb_font_t *font, hb_codepoint_t glyph, hb_direction_t direction, hb_position_t *x, hb_position_t *y)
 
void hb_font_get_glyph_kerning_for_direction (hb_font_t *font, hb_codepoint_t first_glyph, hb_codepoint_t second_glyph, hb_direction_t direction, hb_position_t *x, hb_position_t *y)
 
hb_bool_t hb_font_get_glyph_extents_for_origin (hb_font_t *font, hb_codepoint_t glyph, hb_direction_t direction, hb_glyph_extents_t *extents)
 
hb_bool_t hb_font_get_glyph_contour_point_for_origin (hb_font_t *font, hb_codepoint_t glyph, unsigned int point_index, hb_direction_t direction, hb_position_t *x, hb_position_t *y)
 
void hb_font_glyph_to_string (hb_font_t *font, hb_codepoint_t glyph, char *s, unsigned int size)
 
hb_bool_t hb_font_glyph_from_string (hb_font_t *font, const char *s, int len, hb_codepoint_t *glyph)
 
hb_font_thb_font_create (hb_face_t *face)
 
hb_font_thb_font_create_sub_font (hb_font_t *parent)
 
hb_font_thb_font_get_empty (void)
 
hb_font_thb_font_reference (hb_font_t *font)
 
void hb_font_destroy (hb_font_t *font)
 
hb_bool_t hb_font_set_user_data (hb_font_t *font, hb_user_data_key_t *key, void *data, hb_destroy_func_t destroy, hb_bool_t replace)
 
voidhb_font_get_user_data (hb_font_t *font, hb_user_data_key_t *key)
 
void hb_font_make_immutable (hb_font_t *font)
 
hb_bool_t hb_font_is_immutable (hb_font_t *font)
 
void hb_font_set_parent (hb_font_t *font, hb_font_t *parent)
 
hb_font_thb_font_get_parent (hb_font_t *font)
 
void hb_font_set_face (hb_font_t *font, hb_face_t *face)
 
hb_face_thb_font_get_face (hb_font_t *font)
 
void hb_font_set_funcs (hb_font_t *font, hb_font_funcs_t *klass, void *font_data, hb_destroy_func_t destroy)
 
void hb_font_set_funcs_data (hb_font_t *font, void *font_data, hb_destroy_func_t destroy)
 
void hb_font_set_scale (hb_font_t *font, int x_scale, int y_scale)
 
void hb_font_get_scale (hb_font_t *font, int *x_scale, int *y_scale)
 
void hb_font_set_ppem (hb_font_t *font, unsigned int x_ppem, unsigned int y_ppem)
 
void hb_font_get_ppem (hb_font_t *font, unsigned int *x_ppem, unsigned int *y_ppem)
 
void hb_font_set_ptem (hb_font_t *font, float ptem)
 
float hb_font_get_ptem (hb_font_t *font)
 
void hb_font_set_variations (hb_font_t *font, const hb_variation_t *variations, unsigned int variations_length)
 
void hb_font_set_var_coords_design (hb_font_t *font, const float *coords, unsigned int coords_length)
 
void hb_font_set_var_coords_normalized (hb_font_t *font, const int *coords, unsigned int coords_length)
 
const inthb_font_get_var_coords_normalized (hb_font_t *font, unsigned int *length)
 
void hb_font_set_var_named_instance (hb_font_t *font, unsigned instance_index)
 

Typedef Documentation

◆ hb_font_extents_t

hb_font_extents_t: @ascender: The height of typographic ascenders. @descender: The depth of typographic descenders. @line_gap: The suggested line-spacing gap.

Font-wide extent values, measured in font units.

Note that typically @ascender is positive and @descender negative, in coordinate systems that grow up.

◆ hb_font_funcs_t

hb_font_funcs_t:

Data type containing a set of virtual methods used for working on hb_font_t font objects.

HarfBuzz provides a lightweight default function for each of the methods in hb_font_funcs_t. Client programs can implement their own replacements for the individual font functions, as needed, and replace the default by calling the setter for a method.

Definition at line 1 of file hb-font.h.

◆ hb_font_get_font_extents_func_t

typedef hb_bool_t(* hb_font_get_font_extents_func_t) (hb_font_t *font, void *font_data, hb_font_extents_t *extents, void *user_data)

Definition at line 144 of file hb-font.h.

◆ hb_font_get_font_h_extents_func_t

hb_font_get_font_h_extents_func_t:

A virtual method for the hb_font_funcs_t of an hb_font_t object.

This method should retrieve the extents for a font, in horizontal-direction text segments. Extents must be returned in an #hb_glyph_extents output parameter.

Definition at line 158 of file hb-font.h.

◆ hb_font_get_font_v_extents_func_t

hb_font_get_font_v_extents_func_t:

A virtual method for the hb_font_funcs_t of an hb_font_t object.

This method should retrieve the extents for a font, in vertical-direction text segments. Extents must be returned in an #hb_glyph_extents output parameter.

Definition at line 170 of file hb-font.h.

◆ hb_font_get_glyph_advance_func_t

typedef hb_position_t(* hb_font_get_glyph_advance_func_t) (hb_font_t *font, void *font_data, hb_codepoint_t glyph, void *user_data)

hb_font_get_glyph_advance_func_t:

A virtual method for the hb_font_funcs_t of an hb_font_t object.

This method should retrieve the advance for a specified glyph. The method must return an hb_position_t.

Definition at line 230 of file hb-font.h.

◆ hb_font_get_glyph_advances_func_t

typedef void(* hb_font_get_glyph_advances_func_t) (hb_font_t *font, void *font_data, unsigned int count, const hb_codepoint_t *first_glyph, unsigned glyph_stride, hb_position_t *first_advance, unsigned advance_stride, void *user_data)

hb_font_get_glyph_advances_func_t:

A virtual method for the hb_font_funcs_t of an hb_font_t object.

This method should retrieve the advances for a sequence of glyphs.

Definition at line 266 of file hb-font.h.

◆ hb_font_get_glyph_contour_point_func_t

typedef hb_bool_t(* hb_font_get_glyph_contour_point_func_t) (hb_font_t *font, void *font_data, hb_codepoint_t glyph, unsigned int point_index, hb_position_t *x, hb_position_t *y, void *user_data)

hb_font_get_glyph_contour_point_func_t:

A virtual method for the hb_font_funcs_t of an hb_font_t object.

This method should retrieve the (X,Y) coordinates (in font units) for a specified contour point in a glyph. Each coordinate must be returned as an hb_position_t output parameter.

Definition at line 365 of file hb-font.h.

◆ hb_font_get_glyph_extents_func_t

typedef hb_bool_t(* hb_font_get_glyph_extents_func_t) (hb_font_t *font, void *font_data, hb_codepoint_t glyph, hb_glyph_extents_t *extents, void *user_data)

hb_font_get_glyph_extents_func_t:

A virtual method for the hb_font_funcs_t of an hb_font_t object.

This method should retrieve the extents for a specified glyph. Extents must be returned in an #hb_glyph_extents output parameter.

Definition at line 350 of file hb-font.h.

◆ hb_font_get_glyph_from_name_func_t

typedef hb_bool_t(* hb_font_get_glyph_from_name_func_t) (hb_font_t *font, void *font_data, const char *name, int len, hb_codepoint_t *glyph, void *user_data)

hb_font_get_glyph_from_name_func_t:

A virtual method for the hb_font_funcs_t of an hb_font_t object.

This method should retrieve the glyph ID that corresponds to a glyph-name string.

Definition at line 394 of file hb-font.h.

◆ hb_font_get_glyph_h_advance_func_t

hb_font_get_glyph_h_advance_func_t:

A virtual method for the hb_font_funcs_t of an hb_font_t object.

This method should retrieve the advance for a specified glyph, in horizontal-direction text segments. Advances must be returned in an hb_position_t output parameter.

Definition at line 244 of file hb-font.h.

◆ hb_font_get_glyph_h_advances_func_t

hb_font_get_glyph_h_advances_func_t:

A virtual method for the hb_font_funcs_t of an hb_font_t object.

This method should retrieve the advances for a sequence of glyphs, in horizontal-direction text segments.

Definition at line 283 of file hb-font.h.

◆ hb_font_get_glyph_h_kerning_func_t

◆ hb_font_get_glyph_h_origin_func_t

hb_font_get_glyph_h_origin_func_t:

A virtual method for the hb_font_funcs_t of an hb_font_t object.

This method should retrieve the (X,Y) coordinates (in font units) of the origin for a glyph, in horizontal-direction text segments. Each coordinate must be returned in an hb_position_t output parameter.

Definition at line 321 of file hb-font.h.

◆ hb_font_get_glyph_kerning_func_t

typedef hb_position_t(* hb_font_get_glyph_kerning_func_t) (hb_font_t *font, void *font_data, hb_codepoint_t first_glyph, hb_codepoint_t second_glyph, void *user_data)

Definition at line 335 of file hb-font.h.

◆ hb_font_get_glyph_name_func_t

typedef hb_bool_t(* hb_font_get_glyph_name_func_t) (hb_font_t *font, void *font_data, hb_codepoint_t glyph, char *name, unsigned int size, void *user_data)

hb_font_get_glyph_name_func_t:

A virtual method for the hb_font_funcs_t of an hb_font_t object.

This method should retrieve the glyph name that corresponds to a glyph ID. The name should be returned in a string output parameter.

Definition at line 380 of file hb-font.h.

◆ hb_font_get_glyph_origin_func_t

typedef hb_bool_t(* hb_font_get_glyph_origin_func_t) (hb_font_t *font, void *font_data, hb_codepoint_t glyph, hb_position_t *x, hb_position_t *y, void *user_data)

hb_font_get_glyph_origin_func_t:

A virtual method for the hb_font_funcs_t of an hb_font_t object.

This method should retrieve the (X,Y) coordinates (in font units) of the origin for a glyph. Each coordinate must be returned in an hb_position_t output parameter.

Definition at line 306 of file hb-font.h.

◆ hb_font_get_glyph_v_advance_func_t

hb_font_get_glyph_v_advance_func_t:

A virtual method for the hb_font_funcs_t of an hb_font_t object.

This method should retrieve the advance for a specified glyph, in vertical-direction text segments. Advances must be returned in an hb_position_t output parameter.

Definition at line 256 of file hb-font.h.

◆ hb_font_get_glyph_v_advances_func_t

hb_font_get_glyph_v_advances_func_t:

A virtual method for the hb_font_funcs_t of an hb_font_t object.

This method should retrieve the advances for a sequence of glyphs, in vertical-direction text segments.

Definition at line 294 of file hb-font.h.

◆ hb_font_get_glyph_v_origin_func_t

hb_font_get_glyph_v_origin_func_t:

A virtual method for the hb_font_funcs_t of an hb_font_t object.

This method should retrieve the (X,Y) coordinates (in font units) of the origin for a glyph, in vertical-direction text segments. Each coordinate must be returned in an hb_position_t output parameter.

Definition at line 333 of file hb-font.h.

◆ hb_font_get_nominal_glyph_func_t

typedef hb_bool_t(* hb_font_get_nominal_glyph_func_t) (hb_font_t *font, void *font_data, hb_codepoint_t unicode, hb_codepoint_t *glyph, void *user_data)

hb_font_get_nominal_glyph_func_t:

A virtual method for the hb_font_funcs_t of an hb_font_t object.

This method should retrieve the nominal glyph ID for a specified Unicode code point. Glyph IDs must be returned in a hb_codepoint_t output parameter.

Definition at line 182 of file hb-font.h.

◆ hb_font_get_nominal_glyphs_func_t

typedef unsigned int(* hb_font_get_nominal_glyphs_func_t) (hb_font_t *font, void *font_data, unsigned int count, const hb_codepoint_t *first_unicode, unsigned int unicode_stride, hb_codepoint_t *first_glyph, unsigned int glyph_stride, void *user_data)

hb_font_get_nominal_glyphs_func_t:

A virtual method for the hb_font_funcs_t of an hb_font_t object.

This method should retrieve the nominal glyph IDs for a sequence of Unicode code points. Glyph IDs must be returned in a hb_codepoint_t output parameter.

Definition at line 213 of file hb-font.h.

◆ hb_font_get_variation_glyph_func_t

typedef hb_bool_t(* hb_font_get_variation_glyph_func_t) (hb_font_t *font, void *font_data, hb_codepoint_t unicode, hb_codepoint_t variation_selector, hb_codepoint_t *glyph, void *user_data)

hb_font_get_variation_glyph_func_t:

A virtual method for the hb_font_funcs_t of an hb_font_t object.

This method should retrieve the glyph ID for a specified Unicode code point followed by a specified Variation Selector code point. Glyph IDs must be returned in a hb_codepoint_t output parameter.

Definition at line 197 of file hb-font.h.

◆ hb_font_t

typedef struct hb_font_t hb_font_t

Definition at line 1 of file hb-font.h.

◆ hb_glyph_extents_t

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.

Function Documentation

◆ hb_font_add_glyph_origin_for_direction()

void hb_font_add_glyph_origin_for_direction ( hb_font_t font,
hb_codepoint_t  glyph,
hb_direction_t  direction,
hb_position_t x,
hb_position_t y 
)

hb_font_add_glyph_origin_for_direction: @font: hb_font_t to work upon @glyph: The glyph ID to query @direction: The direction of the text segment @x: (inout): Input = The original X coordinate Output = The X coordinate plus the X-coordinate of the origin @y: (inout): Input = The original Y coordinate Output = The Y coordinate plus the Y-coordinate of the origin

Adds the origin coordinates to an (X,Y) point coordinate, in the specified glyph ID in the specified font.

Calls the appropriate direction-specific variant (horizontal or vertical) depending on the value of @direction.

Since: 0.9.2

Definition at line 1289 of file hb-font.cc.

References direction, cordic::x, and y.

◆ hb_font_create()

hb_font_t* hb_font_create ( hb_face_t face)

hb_font_create: (Xconstructor) @face: a face.

Constructs a new font object from the specified face.

Return value: (transfer full): The new font object

Since: 0.9.2

Definition at line 1523 of file hb-font.cc.

References _hb_font_create(), face, font, and hb_ot_font_set_funcs().

Referenced by font_new(), and XeTeXFontInst::initialize().

◆ hb_font_create_sub_font()

hb_font_t* hb_font_create_sub_font ( hb_font_t parent)

hb_font_create_sub_font: @parent: The parent font object

Constructs a sub-font font object from the specified @parent font, replicating the parent's properties.

Return value: (transfer full): The new sub-font font object

Since: 0.9.2

Definition at line 1561 of file hb-font.cc.

References _hb_font_adopt_var_coords(), _hb_font_create(), calloc(), font, free, hb_font_get_empty(), hb_font_reference(), hb_object_is_immutable(), likely, memcpy, parent, sizeof(), and unlikely.

◆ hb_font_destroy()

void hb_font_destroy ( hb_font_t font)

hb_font_destroy: (skip) @font: hb_font_t to work upon

Decreases the reference count on the given font object. When the reference count reaches zero, the font is destroyed, freeing all memory.

Since: 0.9.2

Definition at line 1643 of file hb-font.cc.

References free, hb_face_destroy(), hb_font_destroy(), hb_font_funcs_destroy(), and hb_object_destroy().

Referenced by af_face_globals_free(), font_destroy(), hb_font_destroy(), hb_font_set_parent(), and XeTeXFontInst::~XeTeXFontInst().

◆ hb_font_funcs_create()

hb_font_funcs_t* hb_font_funcs_create ( )

hb_font_funcs_create: (Xconstructor)

Creates a new hb_font_funcs_t structure of font functions.

Return value: (transfer full): The font-functions structure

Since: 0.9.2

Definition at line 560 of file hb-font.cc.

References _hb_font_funcs_default, hb_font_funcs_t::get, and hb_font_funcs_get_empty().

Referenced by _get_font_funcs(), and hb_ot_font_funcs_lazy_loader_t::create().

◆ hb_font_funcs_destroy()

void hb_font_funcs_destroy ( hb_font_funcs_t ffuncs)

hb_font_funcs_destroy: (skip) @ffuncs: The font-functions structure

Decreases the reference count on a font-functions structure. When the reference count reaches zero, the font-functions structure is destroyed, freeing all memory.

Since: 0.9.2

Definition at line 614 of file hb-font.cc.

References free, HB_FONT_FUNCS_IMPLEMENT_CALLBACKS, and hb_object_destroy().

Referenced by hb_font_funcs_lazy_loader_t< Subclass >::destroy(), hb_font_destroy(), and hb_font_set_funcs().

◆ hb_font_funcs_get_empty()

hb_font_funcs_t* hb_font_funcs_get_empty ( )

hb_font_funcs_get_empty:

Fetches an empty font-functions structure.

Return value: (transfer full): The font-functions structure

Since: 0.9.2

Definition at line 582 of file hb-font.cc.

References _hb_font_funcs_default.

Referenced by _hb_font_create(), hb_font_funcs_lazy_loader_t< Subclass >::get_null(), hb_font_funcs_create(), and hb_font_set_funcs().

◆ hb_font_funcs_get_user_data()

void* hb_font_funcs_get_user_data ( hb_font_funcs_t ffuncs,
hb_user_data_key_t key 
)

hb_font_funcs_get_user_data: (skip) @ffuncs: The font-functions structure @key: The user-data key to query

Fetches the user data associated with the specified key, attached to the specified font-functions structure.

Return value: (transfer none): A pointer to the user data

Since: 0.9.2

Definition at line 663 of file hb-font.cc.

References hb_object_get_user_data(), and key.

◆ hb_font_funcs_is_immutable()

hb_bool_t hb_font_funcs_is_immutable ( hb_font_funcs_t ffuncs)

hb_font_funcs_is_immutable: @ffuncs: The font-functions structure

Tests whether a font-functions structure is immutable.

Return value: true if @ffuncs is immutable, false otherwise

Since: 0.9.2

Definition at line 698 of file hb-font.cc.

References hb_object_is_immutable().

◆ hb_font_funcs_make_immutable()

void hb_font_funcs_make_immutable ( hb_font_funcs_t ffuncs)

hb_font_funcs_make_immutable: @ffuncs: The font-functions structure

Makes a font-functions structure immutable.

Since: 0.9.2

Definition at line 679 of file hb-font.cc.

References hb_object_is_immutable(), and hb_object_make_immutable().

Referenced by hb_ot_font_funcs_lazy_loader_t::create().

◆ hb_font_funcs_reference()

hb_font_funcs_t* hb_font_funcs_reference ( hb_font_funcs_t ffuncs)

hb_font_funcs_reference: (skip) @ffuncs: The font-functions structure

Increases the reference count on a font-functions structure.

Return value: The font-functions structure

Since: 0.9.2

Definition at line 598 of file hb-font.cc.

References hb_object_reference().

Referenced by hb_font_set_funcs().

◆ hb_font_funcs_set_font_h_extents_func()

void hb_font_funcs_set_font_h_extents_func ( hb_font_funcs_t ffuncs,
hb_font_get_font_h_extents_func_t  func,
void user_data,
hb_destroy_func_t  destroy 
)

hb_font_funcs_set_font_h_extents_func: @ffuncs: A font-function structure @func: (closure user_data) (destroy destroy) (scope notified): The callback function to assign @user_data: Data to pass to @func @destroy: (optional): The function to call when @user_data is not needed anymore

Sets the implementation function for hb_font_get_font_h_extents_func_t.

Since: 1.1.2

Definition at line 733 of file hb-font.cc.

References hb_font_funcs_t::get_t::array, hb_font_funcs_t::get, i, and hb_font_t::klass.

Referenced by hb_ot_font_funcs_lazy_loader_t::create().

◆ hb_font_funcs_set_font_v_extents_func()

void hb_font_funcs_set_font_v_extents_func ( hb_font_funcs_t ffuncs,
hb_font_get_font_v_extents_func_t  func,
void user_data,
hb_destroy_func_t  destroy 
)

hb_font_funcs_set_font_v_extents_func: @ffuncs: A font-function structure @func: (closure user_data) (destroy destroy) (scope notified): The callback function to assign @user_data: Data to pass to @func @destroy: (optional): The function to call when @user_data is not needed anymore

Sets the implementation function for hb_font_get_font_v_extents_func_t.

Since: 1.1.2

Definition at line 733 of file hb-font.cc.

Referenced by hb_ot_font_funcs_lazy_loader_t::create().

◆ hb_font_funcs_set_glyph_contour_point_func()

void hb_font_funcs_set_glyph_contour_point_func ( hb_font_funcs_t ffuncs,
hb_font_get_glyph_contour_point_func_t  func,
void user_data,
hb_destroy_func_t  destroy 
)

hb_font_funcs_set_glyph_contour_point_func: @ffuncs: A font-function structure @func: (closure user_data) (destroy destroy) (scope notified): The callback function to assign @user_data: Data to pass to @func @destroy: (optional): The function to call when @user_data is not needed anymore

Sets the implementation function for hb_font_get_glyph_contour_point_func_t.

Since: 0.9.2

Definition at line 733 of file hb-font.cc.

Referenced by _get_font_funcs().

◆ hb_font_funcs_set_glyph_extents_func()

void hb_font_funcs_set_glyph_extents_func ( hb_font_funcs_t ffuncs,
hb_font_get_glyph_extents_func_t  func,
void user_data,
hb_destroy_func_t  destroy 
)

hb_font_funcs_set_glyph_extents_func: @ffuncs: A font-function structure @func: (closure user_data) (destroy destroy) (scope notified): The callback function to assign @user_data: Data to pass to @func @destroy: (optional): The function to call when @user_data is not needed anymore

Sets the implementation function for hb_font_get_glyph_extents_func_t.

Since: 0.9.2

Definition at line 733 of file hb-font.cc.

Referenced by _get_font_funcs(), and hb_ot_font_funcs_lazy_loader_t::create().

◆ hb_font_funcs_set_glyph_from_name_func()

void hb_font_funcs_set_glyph_from_name_func ( hb_font_funcs_t ffuncs,
hb_font_get_glyph_from_name_func_t  func,
void user_data,
hb_destroy_func_t  destroy 
)

hb_font_funcs_set_glyph_from_name_func: @ffuncs: A font-function structure @func: (closure user_data) (destroy destroy) (scope notified): The callback function to assign @user_data: Data to pass to @func @destroy: (optional): The function to call when @user_data is not needed anymore

Sets the implementation function for hb_font_get_glyph_from_name_func_t.

Since: 0.9.2

Definition at line 733 of file hb-font.cc.

Referenced by hb_ot_font_funcs_lazy_loader_t::create().

◆ hb_font_funcs_set_glyph_h_advance_func()

void hb_font_funcs_set_glyph_h_advance_func ( hb_font_funcs_t ffuncs,
hb_font_get_glyph_h_advance_func_t  func,
void user_data,
hb_destroy_func_t  destroy 
)

hb_font_funcs_set_glyph_h_advance_func: @ffuncs: A font-function structure @func: (closure user_data) (destroy destroy) (scope notified): The callback function to assign @user_data: Data to pass to @func @destroy: (optional): The function to call when @user_data is not needed anymore

Sets the implementation function for hb_font_get_glyph_h_advance_func_t.

Since: 0.9.2

Definition at line 733 of file hb-font.cc.

Referenced by _get_font_funcs().

◆ hb_font_funcs_set_glyph_h_advances_func()

void hb_font_funcs_set_glyph_h_advances_func ( hb_font_funcs_t ffuncs,
hb_font_get_glyph_h_advances_func_t  func,
void user_data,
hb_destroy_func_t  destroy 
)

hb_font_funcs_set_glyph_h_advances_func: @ffuncs: A font-function structure @func: (closure user_data) (destroy destroy) (scope notified): The callback function to assign @user_data: Data to pass to @func @destroy: (optional): The function to call when @user_data is not needed anymore

Sets the implementation function for hb_font_get_glyph_h_advances_func_t.

Since: 1.8.6

Definition at line 733 of file hb-font.cc.

Referenced by hb_ot_font_funcs_lazy_loader_t::create().

◆ hb_font_funcs_set_glyph_h_kerning_func()

void hb_font_funcs_set_glyph_h_kerning_func ( hb_font_funcs_t ffuncs,
hb_font_get_glyph_h_kerning_func_t  func,
void user_data,
hb_destroy_func_t  destroy 
)

hb_font_funcs_set_glyph_h_kerning_func: @ffuncs: font functions. @func: (closure user_data) (destroy destroy) (scope notified): @user_data: @destroy:

Since: 0.9.2

Definition at line 733 of file hb-font.cc.

Referenced by _get_font_funcs().

◆ hb_font_funcs_set_glyph_h_origin_func()

void hb_font_funcs_set_glyph_h_origin_func ( hb_font_funcs_t ffuncs,
hb_font_get_glyph_h_origin_func_t  func,
void user_data,
hb_destroy_func_t  destroy 
)

hb_font_funcs_set_glyph_h_origin_func: @ffuncs: A font-function structure @func: (closure user_data) (destroy destroy) (scope notified): The callback function to assign @user_data: Data to pass to @func @destroy: (optional): The function to call when @user_data is not needed anymore

Sets the implementation function for hb_font_get_glyph_h_origin_func_t.

Since: 0.9.2

Definition at line 733 of file hb-font.cc.

Referenced by _get_font_funcs().

◆ hb_font_funcs_set_glyph_name_func()

void hb_font_funcs_set_glyph_name_func ( hb_font_funcs_t ffuncs,
hb_font_get_glyph_name_func_t  func,
void user_data,
hb_destroy_func_t  destroy 
)

hb_font_funcs_set_glyph_name_func: @ffuncs: A font-function structure @func: (closure user_data) (destroy destroy) (scope notified): The callback function to assign @user_data: Data to pass to @func @destroy: (optional): The function to call when @user_data is not needed anymore

Sets the implementation function for hb_font_get_glyph_name_func_t.

Since: 0.9.2

Definition at line 733 of file hb-font.cc.

Referenced by _get_font_funcs(), and hb_ot_font_funcs_lazy_loader_t::create().

◆ hb_font_funcs_set_glyph_v_advance_func()

void hb_font_funcs_set_glyph_v_advance_func ( hb_font_funcs_t ffuncs,
hb_font_get_glyph_v_advance_func_t  func,
void user_data,
hb_destroy_func_t  destroy 
)

hb_font_funcs_set_glyph_v_advance_func: @ffuncs: A font-function structure @func: (closure user_data) (destroy destroy) (scope notified): The callback function to assign @user_data: Data to pass to @func @destroy: (optional): The function to call when @user_data is not needed anymore

Sets the implementation function for hb_font_get_glyph_v_advance_func_t.

Since: 0.9.2

Definition at line 733 of file hb-font.cc.

Referenced by _get_font_funcs().

◆ hb_font_funcs_set_glyph_v_advances_func()

void hb_font_funcs_set_glyph_v_advances_func ( hb_font_funcs_t ffuncs,
hb_font_get_glyph_v_advances_func_t  func,
void user_data,
hb_destroy_func_t  destroy 
)

hb_font_funcs_set_glyph_v_advances_func: @ffuncs: A font-function structure @func: (closure user_data) (destroy destroy) (scope notified): The callback function to assign @user_data: Data to pass to @func @destroy: (optional): The function to call when @user_data is not needed anymore

Sets the implementation function for hb_font_get_glyph_v_advances_func_t.

Since: 1.8.6

Definition at line 733 of file hb-font.cc.

Referenced by hb_ot_font_funcs_lazy_loader_t::create().

◆ hb_font_funcs_set_glyph_v_origin_func()

void hb_font_funcs_set_glyph_v_origin_func ( hb_font_funcs_t ffuncs,
hb_font_get_glyph_v_origin_func_t  func,
void user_data,
hb_destroy_func_t  destroy 
)

hb_font_funcs_set_glyph_v_origin_func: @ffuncs: A font-function structure @func: (closure user_data) (destroy destroy) (scope notified): The callback function to assign @user_data: Data to pass to @func @destroy: (optional): The function to call when @user_data is not needed anymore

Sets the implementation function for hb_font_get_glyph_v_origin_func_t.

Since: 0.9.2

Definition at line 733 of file hb-font.cc.

Referenced by _get_font_funcs(), and hb_ot_font_funcs_lazy_loader_t::create().

◆ hb_font_funcs_set_nominal_glyph_func()

void hb_font_funcs_set_nominal_glyph_func ( hb_font_funcs_t ffuncs,
hb_font_get_nominal_glyph_func_t  func,
void user_data,
hb_destroy_func_t  destroy 
)

hb_font_funcs_set_nominal_glyph_func: @ffuncs: A font-function structure @func: (closure user_data) (destroy destroy) (scope notified): The callback function to assign @user_data: Data to pass to @func @destroy: (optional): The function to call when @user_data is not needed anymore

Sets the implementation function for hb_font_get_nominal_glyph_func_t.

Since: 1.2.3

Definition at line 733 of file hb-font.cc.

Referenced by hb_ot_font_funcs_lazy_loader_t::create(), and hb_font_funcs_set_glyph_func().

◆ hb_font_funcs_set_nominal_glyphs_func()

void hb_font_funcs_set_nominal_glyphs_func ( hb_font_funcs_t ffuncs,
hb_font_get_nominal_glyphs_func_t  func,
void user_data,
hb_destroy_func_t  destroy 
)

hb_font_funcs_set_nominal_glyphs_func: @ffuncs: A font-function structure @func: (closure user_data) (destroy destroy) (scope notified): The callback function to assign @user_data: Data to pass to @func @destroy: (optional): The function to call when @user_data is not needed anymore

Sets the implementation function for hb_font_get_nominal_glyphs_func_t.

Since: 2.0.0

Definition at line 733 of file hb-font.cc.

Referenced by hb_ot_font_funcs_lazy_loader_t::create().

◆ hb_font_funcs_set_user_data()

hb_bool_t hb_font_funcs_set_user_data ( hb_font_funcs_t ffuncs,
hb_user_data_key_t key,
void data,
hb_destroy_func_t  destroy,
hb_bool_t  replace 
)

hb_font_funcs_set_user_data: (skip) @ffuncs: The font-functions structure @key: The user-data key to set @data: A pointer to the user data set @destroy: (optional): A callback to call when @data is not needed anymore @replace: Whether to replace an existing data with the same key

Attaches a user-data key/data pair to the specified font-functions structure.

Return value: true if success, false otherwise

Since: 0.9.2

Definition at line 641 of file hb-font.cc.

References data, hb_object_set_user_data(), key, and replace().

◆ hb_font_funcs_set_variation_glyph_func()

void hb_font_funcs_set_variation_glyph_func ( hb_font_funcs_t ffuncs,
hb_font_get_variation_glyph_func_t  func,
void user_data,
hb_destroy_func_t  destroy 
)

hb_font_funcs_set_variation_glyph_func: @ffuncs: A font-function structure @func: (closure user_data) (destroy destroy) (scope notified): The callback function to assign @user_data: Data to pass to @func @destroy: (optional): The function to call when @user_data is not needed anymore

Sets the implementation function for hb_font_get_variation_glyph_func_t.

Since: 1.2.3

Definition at line 733 of file hb-font.cc.

Referenced by hb_ot_font_funcs_lazy_loader_t::create(), and hb_font_funcs_set_glyph_func().

◆ hb_font_get_empty()

hb_font_t* hb_font_get_empty ( )

hb_font_get_empty:

Fetches the empty font object.

Return value: (transfer full): The empty font object

Since: 0.9.2

Definition at line 1611 of file hb-font.cc.

References Null.

Referenced by _hb_font_create(), hb_buffer_deserialize_glyphs(), hb_buffer_deserialize_unicode(), hb_buffer_serialize_glyphs(), hb_font_create_sub_font(), and hb_font_set_parent().

◆ hb_font_get_extents_for_direction()

void hb_font_get_extents_for_direction ( hb_font_t font,
hb_direction_t  direction,
hb_font_extents_t extents 
)

hb_font_get_extents_for_direction: @font: hb_font_t to work upon @direction: The direction of the text segment @extents: (out): The hb_glyph_extents_t retrieved

Fetches the extents for a font in a text segment of the specified direction.

Calls the appropriate direction-specific variant (horizontal or vertical) depending on the value of @direction.

Since: 1.1.3

Definition at line 1183 of file hb-font.cc.

References direction.

◆ hb_font_get_face()

◆ hb_font_get_glyph()

hb_bool_t hb_font_get_glyph ( hb_font_t font,
hb_codepoint_t  unicode,
hb_codepoint_t  variation_selector,
hb_codepoint_t glyph 
)

hb_font_get_glyph: @font: hb_font_t to work upon @unicode: The Unicode code point to query @variation_selector: (optional): A variation-selector code point @glyph: (out): The glyph ID retrieved

Fetches the glyph ID for a Unicode code point in the specified font, with an optional variation selector.

If @variation_selector is 0, calls hb_font_get_nominal_glyph(); otherwise calls hb_font_get_variation_glyph().

Return value: true if data found, false otherwise

Since: 0.9.2

Definition at line 807 of file hb-font.cc.

References unicode, and unlikely.

Referenced by arabic_fallback_plan_init_win1256(), arabic_fallback_synthesize_lookup_ligature(), arabic_fallback_synthesize_lookup_single(), is_zero_width_char(), and thai_pua_shape().

◆ hb_font_get_glyph_advance_for_direction()

void hb_font_get_glyph_advance_for_direction ( hb_font_t font,
hb_codepoint_t  glyph,
hb_direction_t  direction,
hb_position_t x,
hb_position_t y 
)

hb_font_get_glyph_advance_for_direction: @font: hb_font_t to work upon @glyph: The glyph ID to query @direction: The direction of the text segment @x: (out): The horizontal advance retrieved @y: (out): The vertical advance retrieved

Fetches the advance for a glyph ID from the specified font, in a text segment of the specified direction.

Calls the appropriate direction-specific variant (horizontal or vertical) depending on the value of @direction.

Since: 0.9.2

Definition at line 1206 of file hb-font.cc.

References direction, cordic::x, and y.

◆ hb_font_get_glyph_advances_for_direction()

void hb_font_get_glyph_advances_for_direction ( hb_font_t font,
hb_direction_t  direction,
unsigned int  count,
const hb_codepoint_t first_glyph,
unsigned  glyph_stride,
hb_position_t first_advance,
unsigned  advance_stride 
)

hb_font_get_glyph_advances_for_direction: @font: hb_font_t to work upon @direction: The direction of the text segment @count: The number of glyph IDs in the sequence queried @first_glyph: The first glyph ID to query @glyph_stride: The stride between successive glyph IDs @first_advance: (out): The first advance retrieved @advance_stride: (out): The stride between successive advances

Fetches the advances for a sequence of glyph IDs in the specified font, in a text segment of the specified direction.

Calls the appropriate direction-specific variant (horizontal or vertical) depending on the value of @direction.

Since: 1.8.6

Definition at line 1233 of file hb-font.cc.

References count, and direction.

◆ hb_font_get_glyph_contour_point()

hb_bool_t hb_font_get_glyph_contour_point ( hb_font_t font,
hb_codepoint_t  glyph,
unsigned int  point_index,
hb_position_t x,
hb_position_t y 
)

hb_font_get_glyph_contour_point: @font: hb_font_t to work upon @glyph: The glyph ID to query @point_index: The contour-point index to query @x: (out): The X value retrieved for the contour point @y: (out): The Y value retrieved for the contour point

Fetches the (x,y) coordinates of a specified contour-point index in the specified glyph, within the specified font.

Return value: true if data found, false otherwise

Since: 0.9.2

Definition at line 1110 of file hb-font.cc.

References cordic::x, and y.

◆ hb_font_get_glyph_contour_point_for_origin()

hb_bool_t hb_font_get_glyph_contour_point_for_origin ( hb_font_t font,
hb_codepoint_t  glyph,
unsigned int  point_index,
hb_direction_t  direction,
hb_position_t x,
hb_position_t y 
)

hb_font_get_glyph_contour_point_for_origin: @font: hb_font_t to work upon @glyph: The glyph ID to query @point_index: The contour-point index to query @direction: The direction of the text segment @x: (out): The X value retrieved for the contour point @y: (out): The Y value retrieved for the contour point

Fetches the (X,Y) coordinates of a specified contour-point index in the specified glyph ID in the specified font, with respect to the origin in a text segment in the specified direction.

Calls the appropriate direction-specific variant (horizontal or vertical) depending on the value of @direction.

Return value: true if data found, false otherwise

Since: 0.9.2

Definition at line 1401 of file hb-font.cc.

References direction, cordic::x, and y.

◆ hb_font_get_glyph_extents()

hb_bool_t hb_font_get_glyph_extents ( hb_font_t font,
hb_codepoint_t  glyph,
hb_glyph_extents_t extents 
)

hb_font_get_glyph_extents: @font: hb_font_t to work upon @glyph: The glyph ID to query @extents: (out): The hb_glyph_extents_t retrieved

Fetches the hb_glyph_extents_t data for a glyph ID in the specified font.

Return value: true if data found, false otherwise

Since: 0.9.2

Definition at line 1087 of file hb-font.cc.

Referenced by _hb_buffer_serialize_glyphs_json(), _hb_buffer_serialize_glyphs_text(), and font_get_glyph_extents().

◆ hb_font_get_glyph_extents_for_origin()

hb_bool_t hb_font_get_glyph_extents_for_origin ( hb_font_t font,
hb_codepoint_t  glyph,
hb_direction_t  direction,
hb_glyph_extents_t extents 
)

hb_font_get_glyph_extents_for_origin: @font: hb_font_t to work upon @glyph: The glyph ID to query @direction: The direction of the text segment @extents: (out): The hb_glyph_extents_t retrieved

Fetches the hb_glyph_extents_t data for a glyph ID in the specified font, with respect to the origin in a text segment in the specified direction.

Calls the appropriate direction-specific variant (horizontal or vertical) depending on the value of @direction.

Return value: true if data found, false otherwise

Since: 0.9.2

Definition at line 1372 of file hb-font.cc.

References direction.

◆ hb_font_get_glyph_from_name()

hb_bool_t hb_font_get_glyph_from_name ( hb_font_t font,
const char *  name,
int  len,
hb_codepoint_t glyph 
)

Definition at line 1157 of file hb-font.cc.

References len, and name.

Referenced by font_get_glyph_from_name().

◆ hb_font_get_glyph_h_advance()

hb_position_t hb_font_get_glyph_h_advance ( hb_font_t font,
hb_codepoint_t  glyph 
)

hb_font_get_glyph_h_advance: @font: hb_font_t to work upon @glyph: The glyph ID to query

Fetches the advance for a glyph ID in the specified font, for horizontal text segments.

Return value: The advance of @glyph within @font

Since: 0.9.2

Definition at line 902 of file hb-font.cc.

Referenced by font_get_glyph_h_advance(), and is_zero_width_char().

◆ hb_font_get_glyph_h_advances()

void hb_font_get_glyph_h_advances ( hb_font_t font,
unsigned int  count,
const hb_codepoint_t first_glyph,
unsigned  glyph_stride,
hb_position_t first_advance,
unsigned  advance_stride 
)

hb_font_get_glyph_h_advances: @font: hb_font_t to work upon @count: The number of glyph IDs in the sequence queried @first_glyph: The first glyph ID to query @glyph_stride: The stride between successive glyph IDs @first_advance: (out): The first advance retrieved @advance_stride: (out): The stride between successive advances

Fetches the advances for a sequence of glyph IDs in the specified font, for horizontal text segments.

Since: 1.8.6

Definition at line 942 of file hb-font.cc.

References count.

◆ hb_font_get_glyph_h_kerning()

hb_position_t hb_font_get_glyph_h_kerning ( hb_font_t font,
hb_codepoint_t  left_glyph,
hb_codepoint_t  right_glyph 
)

hb_font_get_glyph_h_kerning: @font: hb_font_t to work upon @left_glyph: The glyph ID of the left glyph in the glyph pair @right_glyph: The glyph ID of the right glyph in the glyph pair

Fetches the kerning-adjustment value for a glyph-pair in the specified font, in horizontal text segments.

<note>It handles legacy kerning only (as returned by the corresponding hb_font_funcs_t function).</note>

Return value: The kerning adjustment value

Since: 0.9.2

Definition at line 1039 of file hb-font.cc.

References left_glyph, and right_glyph.

◆ hb_font_get_glyph_h_origin()

hb_bool_t hb_font_get_glyph_h_origin ( hb_font_t font,
hb_codepoint_t  glyph,
hb_position_t x,
hb_position_t y 
)

hb_font_get_glyph_h_origin: @font: hb_font_t to work upon @glyph: The glyph ID to query @x: (out): The X coordinate of the origin @y: (out): The Y coordinate of the origin

Fetches the (X,Y) coordinates of the origin for a glyph ID in the specified font, for horizontal text segments.

Return value: true if data found, false otherwise

Since: 0.9.2

Definition at line 991 of file hb-font.cc.

References cordic::x, and y.

◆ hb_font_get_glyph_kerning_for_direction()

void hb_font_get_glyph_kerning_for_direction ( hb_font_t font,
hb_codepoint_t  first_glyph,
hb_codepoint_t  second_glyph,
hb_direction_t  direction,
hb_position_t x,
hb_position_t y 
)

hb_font_get_glyph_kerning_for_direction: @font: hb_font_t to work upon @first_glyph: The glyph ID of the first glyph in the glyph pair to query @second_glyph: The glyph ID of the second glyph in the glyph pair to query @direction: The direction of the text segment @x: (out): The horizontal kerning-adjustment value retrieved @y: (out): The vertical kerning-adjustment value retrieved

Fetches the kerning-adjustment value for a glyph-pair in the specified font.

Calls the appropriate direction-specific variant (horizontal or vertical) depending on the value of @direction.

Since: 0.9.2

Definition at line 1343 of file hb-font.cc.

References direction, cordic::x, and y.

◆ hb_font_get_glyph_name()

hb_bool_t hb_font_get_glyph_name ( hb_font_t font,
hb_codepoint_t  glyph,
char *  name,
unsigned int  size 
)

Definition at line 1133 of file hb-font.cc.

References name, and size.

Referenced by font_get_glyph_name().

◆ hb_font_get_glyph_origin_for_direction()

void hb_font_get_glyph_origin_for_direction ( hb_font_t font,
hb_codepoint_t  glyph,
hb_direction_t  direction,
hb_position_t x,
hb_position_t y 
)

hb_font_get_glyph_origin_for_direction: @font: hb_font_t to work upon @glyph: The glyph ID to query @direction: The direction of the text segment @x: (out): The X coordinate retrieved for the origin @y: (out): The Y coordinate retrieved for the origin

Fetches the (X,Y) coordinates of the origin for a glyph in the specified font.

Calls the appropriate direction-specific variant (horizontal or vertical) depending on the value of @direction.

Since: 0.9.2

Definition at line 1261 of file hb-font.cc.

References direction, cordic::x, and y.

◆ hb_font_get_glyph_v_advance()

hb_position_t hb_font_get_glyph_v_advance ( hb_font_t font,
hb_codepoint_t  glyph 
)

hb_font_get_glyph_v_advance: @font: hb_font_t to work upon @glyph: The glyph ID to query

Fetches the advance for a glyph ID in the specified font, for vertical text segments.

Return value: The advance of @glyph within @font

Since: 0.9.2

Definition at line 921 of file hb-font.cc.

Referenced by font_get_glyph_v_advance().

◆ hb_font_get_glyph_v_advances()

void hb_font_get_glyph_v_advances ( hb_font_t font,
unsigned int  count,
const hb_codepoint_t first_glyph,
unsigned  glyph_stride,
hb_position_t first_advance,
unsigned  advance_stride 
)

hb_font_get_glyph_v_advances: @font: hb_font_t to work upon @count: The number of glyph IDs in the sequence queried @first_glyph: The first glyph ID to query @glyph_stride: The stride between successive glyph IDs @first_advance: (out): The first advance retrieved @advance_stride: (out): The stride between successive advances

Fetches the advances for a sequence of glyph IDs in the specified font, for vertical text segments.

Since: 1.8.6

Definition at line 966 of file hb-font.cc.

References count.

◆ hb_font_get_glyph_v_origin()

hb_bool_t hb_font_get_glyph_v_origin ( hb_font_t font,
hb_codepoint_t  glyph,
hb_position_t x,
hb_position_t y 
)

hb_font_get_glyph_v_origin: @font: hb_font_t to work upon @glyph: The glyph ID to query @x: (out): The X coordinate of the origin @y: (out): The Y coordinate of the origin

Fetches the (X,Y) coordinates of the origin for a glyph ID in the specified font, for vertical text segments.

Return value: true if data found, false otherwise

Since: 0.9.2

Definition at line 1014 of file hb-font.cc.

References cordic::x, and y.

◆ hb_font_get_h_extents()

hb_bool_t hb_font_get_h_extents ( hb_font_t font,
hb_font_extents_t extents 
)

hb_font_get_h_extents: @font: hb_font_t to work upon @extents: (out): The font extents retrieved

Fetches the extents for a specified font, in horizontal text segments.

Return value: true if data found, false otherwise

Since: 1.1.3

Definition at line 764 of file hb-font.cc.

Referenced by font_get_h_extents().

◆ hb_font_get_nominal_glyph()

hb_bool_t hb_font_get_nominal_glyph ( hb_font_t font,
hb_codepoint_t  unicode,
hb_codepoint_t glyph 
)

hb_font_get_nominal_glyph: @font: hb_font_t to work upon @unicode: The Unicode code point to query @glyph: (out): The glyph ID retrieved

Fetches the nominal glyph ID for a Unicode code point in the specified font.

This version of the function should not be used to fetch glyph IDs for code points modified by variation selectors. For variation-selector support, user hb_font_get_variation_glyph() or use hb_font_get_glyph().

Return value: true if data found, false otherwise

Since: 1.2.3

Definition at line 835 of file hb-font.cc.

References unicode.

Referenced by font_get_nominal_glyph().

◆ hb_font_get_nominal_glyphs()

unsigned int hb_font_get_nominal_glyphs ( hb_font_t font,
unsigned int  count,
const hb_codepoint_t first_unicode,
unsigned int  unicode_stride,
hb_codepoint_t first_glyph,
unsigned int  glyph_stride 
)

hb_font_get_nominal_glyphs: @font: a font.

Return value:

Since: 2.6.3

Definition at line 853 of file hb-font.cc.

References count.

◆ hb_font_get_parent()

hb_font_t* hb_font_get_parent ( hb_font_t font)

hb_font_get_parent: @font: hb_font_t to work upon

Fetches the parent font of @font.

Return value: (transfer none): The parent font object

Since: 0.9.2

Definition at line 1778 of file hb-font.cc.

◆ hb_font_get_ppem()

void hb_font_get_ppem ( hb_font_t font,
unsigned int x_ppem,
unsigned int y_ppem 
)

hb_font_get_ppem: @font: hb_font_t to work upon @x_ppem: (out): Horizontal ppem value @y_ppem: (out): Vertical ppem value

Fetches the horizontal and vertical points-per-em (ppem) of a font.

Since: 0.9.2

Definition at line 1973 of file hb-font.cc.

◆ hb_font_get_ptem()

float hb_font_get_ptem ( hb_font_t font)

hb_font_get_ptem: @font: hb_font_t to work upon

Fetches the "point size" of a font. Used in CoreText to implement optical sizing.

Return value: Point size. A value of zero means "not set."

Since: 0.9.2

Definition at line 2015 of file hb-font.cc.

◆ hb_font_get_scale()

void hb_font_get_scale ( hb_font_t font,
int x_scale,
int y_scale 
)

hb_font_get_scale: @font: hb_font_t to work upon @x_scale: (out): Horizontal scale value @y_scale: (out): Vertical scale value

Fetches the horizontal and vertical scale of a font.

Since: 0.9.2

Definition at line 1932 of file hb-font.cc.

References y_scale.

Referenced by font_get_scale().

◆ hb_font_get_user_data()

void* hb_font_get_user_data ( hb_font_t font,
hb_user_data_key_t key 
)

hb_font_get_user_data: (skip) @font: hb_font_t to work upon @key: The user-data key to query

Fetches the user-data object associated with the specified key, attached to the specified font object.

Return value: (transfer none): Pointer to the user data

Since: 0.9.2

Definition at line 1699 of file hb-font.cc.

References hb_object_get_user_data(), and key.

◆ hb_font_get_v_extents()

hb_bool_t hb_font_get_v_extents ( hb_font_t font,
hb_font_extents_t extents 
)

hb_font_get_v_extents: @font: hb_font_t to work upon @extents: (out): The font extents retrieved

Fetches the extents for a specified font, in vertical text segments.

Return value: true if data found, false otherwise

Since: 1.1.3

Definition at line 783 of file hb-font.cc.

Referenced by font_get_v_extents().

◆ hb_font_get_var_coords_normalized()

const int* hb_font_get_var_coords_normalized ( hb_font_t font,
unsigned int length 
)

hb_font_get_var_coords_normalized: @font: hb_font_t to work upon @length: Number of coordinates retrieved

Fetches the list of normalized variation coordinates currently set on a font.

Return value is valid as long as variation coordinates of the font are not modified.

Since: 1.4.2

Definition at line 2203 of file hb-font.cc.

References length.

◆ hb_font_get_variation_glyph()

hb_bool_t hb_font_get_variation_glyph ( hb_font_t font,
hb_codepoint_t  unicode,
hb_codepoint_t  variation_selector,
hb_codepoint_t glyph 
)

hb_font_get_variation_glyph: @font: hb_font_t to work upon @unicode: The Unicode code point to query @variation_selector: The variation-selector code point to query @glyph: (out): The glyph ID retrieved

Fetches the glyph ID for a Unicode code point when followed by by the specified variation-selector code point, in the specified font.

Return value: true if data found, false otherwise

Since: 1.2.3

Definition at line 881 of file hb-font.cc.

References unicode.

◆ hb_font_glyph_from_string()

hb_bool_t hb_font_glyph_from_string ( hb_font_t font,
const char *  s,
int  len,
hb_codepoint_t glyph 
)

hb_font_glyph_from_string: @font: hb_font_t to work upon @s: (array length=len) (element-type uint8_t): string to query @len: The length of the string @s @glyph: (out): The glyph ID corresponding to the string requested

Fetches the glyph ID from @font that matches the specified string. Strings of the format gidDDD or uniUUUU are parsed automatically.

<note>Note: @len == -1 means the string is null-terminated.</note>

Return value: true if data found, false otherwise

Since: 0.9.2

Definition at line 1452 of file hb-font.cc.

References len, and s.

Referenced by _hb_buffer_deserialize_json(), and _hb_buffer_deserialize_text().

◆ hb_font_glyph_to_string()

void hb_font_glyph_to_string ( hb_font_t font,
hb_codepoint_t  glyph,
char *  s,
unsigned int  size 
)

hb_font_glyph_to_string: @font: hb_font_t to work upon @glyph: The glyph ID to query @s: (out) (array length=size): The string containing the glyph name @size: Length of string @s

Fetches the name of the specified glyph ID in @font and returns it in string @s.

If the glyph ID has no name in @font, a string of the form gidDDD is generated, with DDD being the glyph ID.

Since: 0.9.2

Definition at line 1427 of file hb-font.cc.

References s, and size.

Referenced by _hb_buffer_serialize_glyphs_json(), and _hb_buffer_serialize_glyphs_text().

◆ hb_font_is_immutable()

hb_bool_t hb_font_is_immutable ( hb_font_t font)

hb_font_is_immutable: @font: hb_font_t to work upon

Tests whether a font object is immutable.

Return value: true if @font is immutable, false otherwise

Since: 0.9.2

Definition at line 1736 of file hb-font.cc.

References hb_object_is_immutable().

◆ hb_font_make_immutable()

void hb_font_make_immutable ( hb_font_t font)

hb_font_make_immutable: @font: hb_font_t to work upon

Makes @font immutable.

Since: 0.9.2

Definition at line 1714 of file hb-font.cc.

References hb_font_make_immutable(), hb_object_is_immutable(), and hb_object_make_immutable().

Referenced by hb_font_make_immutable().

◆ hb_font_reference()

hb_font_t* hb_font_reference ( hb_font_t font)

hb_font_reference: (skip) @font: hb_font_t to work upon

Increases the reference count on the given font object.

Return value: (transfer full): The @font object

Since: 0.9.2

Definition at line 1627 of file hb-font.cc.

References hb_object_reference().

Referenced by hb_font_create_sub_font(), and hb_font_set_parent().

◆ hb_font_set_face()

void hb_font_set_face ( hb_font_t font,
hb_face_t face 
)

hb_font_set_face: @font: hb_font_t to work upon @face: The hb_face_t to assign

Sets @face as the font-face value of @font.

Since: 1.4.3

Definition at line 1793 of file hb-font.cc.

References face, hb_face_destroy(), hb_face_get_empty(), hb_face_make_immutable(), hb_face_reference(), hb_object_is_immutable(), and unlikely.

◆ hb_font_set_funcs()

void hb_font_set_funcs ( hb_font_t font,
hb_font_funcs_t klass,
void font_data,
hb_destroy_func_t  destroy 
)

hb_font_set_funcs: @font: hb_font_t to work upon @klass: (closure font_data) (destroy destroy) (scope notified): @font_data: Data to attach to @font @destroy: (optional): The function to call when @font_data is not needed anymore

Replaces the font-functions structure attached to a font, updating the font's user-data with @font-data and the @destroy callback.

Since: 0.9.2

Definition at line 1841 of file hb-font.cc.

References hb_font_funcs_destroy(), hb_font_funcs_get_empty(), hb_font_funcs_reference(), and hb_object_is_immutable().

Referenced by hb_ot_font_set_funcs(), and XeTeXFontInst::initialize().

◆ hb_font_set_funcs_data()

void hb_font_set_funcs_data ( hb_font_t font,
void font_data,
hb_destroy_func_t  destroy 
)

hb_font_set_funcs_data: @font: hb_font_t to work upon @font_data: (destroy destroy) (scope notified): Data to attach to @font @destroy: (optional): The function to call when @font_data is not needed anymore

Replaces the user data attached to a font, updating the font's @destroy callback.

Since: 0.9.2

Definition at line 1878 of file hb-font.cc.

References hb_object_is_immutable().

◆ hb_font_set_parent()

void hb_font_set_parent ( hb_font_t font,
hb_font_t parent 
)

hb_font_set_parent: @font: hb_font_t to work upon @parent: The parent font object to assign

Sets the parent font of @font.

Since: 1.0.5

Definition at line 1751 of file hb-font.cc.

References hb_font_destroy(), hb_font_get_empty(), hb_font_reference(), hb_object_is_immutable(), and parent.

◆ hb_font_set_ppem()

void hb_font_set_ppem ( hb_font_t font,
unsigned int  x_ppem,
unsigned int  y_ppem 
)

hb_font_set_ppem: @font: hb_font_t to work upon @x_ppem: Horizontal ppem value to assign @y_ppem: Vertical ppem value to assign

Sets the horizontal and vertical pixels-per-em (ppem) of a font.

Since: 0.9.2

Definition at line 1951 of file hb-font.cc.

References hb_object_is_immutable().

Referenced by XeTeXFontInst::initialize().

◆ hb_font_set_ptem()

void hb_font_set_ptem ( hb_font_t font,
float  ptem 
)

hb_font_set_ptem: @font: hb_font_t to work upon @ptem: font size in points.

Sets the "point size" of a font. Set to zero to unset. Used in CoreText to implement optical sizing.

<note>Note: There are 72 points in an inch.</note>

Since: 1.6.0

Definition at line 1994 of file hb-font.cc.

References hb_object_is_immutable().

◆ hb_font_set_scale()

void hb_font_set_scale ( hb_font_t font,
int  x_scale,
int  y_scale 
)

hb_font_set_scale: @font: hb_font_t to work upon @x_scale: Horizontal scale value to assign @y_scale: Vertical scale value to assign

Sets the horizontal and vertical scale of a font.

Since: 0.9.2

Definition at line 1909 of file hb-font.cc.

References hb_object_is_immutable(), and y_scale.

Referenced by font_new(), font_set_scale(), and XeTeXFontInst::initialize().

◆ hb_font_set_user_data()

hb_bool_t hb_font_set_user_data ( hb_font_t font,
hb_user_data_key_t key,
void data,
hb_destroy_func_t  destroy,
hb_bool_t  replace 
)

hb_font_set_user_data: (skip) @font: hb_font_t to work upon @key: The user-data key @data: A pointer to the user data @destroy: (optional): A callback to call when @data is not needed anymore @replace: Whether to replace an existing data with the same key

Attaches a user-data key/data pair to the specified font object.

Return value:

Since: 0.9.2

Definition at line 1677 of file hb-font.cc.

References data, hb_object_set_user_data(), key, and replace().

◆ hb_font_set_var_coords_design()

void hb_font_set_var_coords_design ( hb_font_t font,
const float *  coords,
unsigned int  coords_length 
)

hb_font_set_var_coords_design: @font: hb_font_t to work upon @coords: (array length=coords_length): Array of variation coordinates to apply @coords_length: Number of coordinates to apply

Applies a list of variation coordinates (in design-space units) to a font.

Since: 1.4.2

Definition at line 2090 of file hb-font.cc.

References _hb_font_adopt_var_coords(), calloc(), free, hb_object_is_immutable(), hb_ot_var_normalize_coords(), memcpy, and unlikely.

Referenced by hb_font_set_var_named_instance().

◆ hb_font_set_var_coords_normalized()

void hb_font_set_var_coords_normalized ( hb_font_t font,
const int coords,
unsigned int  coords_length 
)

hb_font_set_var_coords_normalized: @font: hb_font_t to work upon @coords: (array length=coords_length): Array of variation coordinates to apply @coords_length: Number of coordinates to apply

Applies a list of variation coordinates (in normalized units) to a font.

<note>Note: Coordinates should be normalized to 2.14.</note>

Since: 1.4.2

Definition at line 2155 of file hb-font.cc.

References _hb_font_adopt_var_coords(), calloc(), copy(), free, hb_object_is_immutable(), i, memcpy, and unlikely.

Referenced by hb_font_set_variations().

◆ hb_font_set_var_named_instance()

void hb_font_set_var_named_instance ( hb_font_t font,
unsigned  instance_index 
)

hb_font_set_var_named_instance: @font: a font. @instance_index: named instance index.

Sets design coords of a font from a named instance index.

Since: 2.6.0

Definition at line 2124 of file hb-font.cc.

References calloc(), free, hb_font_set_var_coords_design(), hb_object_is_immutable(), hb_ot_var_named_instance_get_design_coords(), and unlikely.

◆ hb_font_set_variations()

void hb_font_set_variations ( hb_font_t font,
const hb_variation_t variations,
unsigned int  variations_length 
)

hb_font_set_variations: @font: hb_font_t to work upon @variations: (array length=variations_length): Array of variation settings to apply @variations_length: Number of variations to apply

Applies a list of font-variation settings to a font.

Since: 1.4.2

Definition at line 2036 of file hb-font.cc.

References _hb_font_adopt_var_coords(), calloc(), free, hb_font_set_var_coords_normalized(), hb_object_is_immutable(), hb_ot_var_find_axis_info(), hb_ot_var_get_axis_count(), i, info, OT::fvar::normalize_axis_value(), unlikely, and v.

◆ hb_font_subtract_glyph_origin_for_direction()

void hb_font_subtract_glyph_origin_for_direction ( hb_font_t font,
hb_codepoint_t  glyph,
hb_direction_t  direction,
hb_position_t x,
hb_position_t y 
)

hb_font_subtract_glyph_origin_for_direction: @font: hb_font_t to work upon @glyph: The glyph ID to query @direction: The direction of the text segment @x: (inout): Input = The original X coordinate Output = The X coordinate minus the X-coordinate of the origin @y: (inout): Input = The original Y coordinate Output = The Y coordinate minus the Y-coordinate of the origin

Subtracts the origin coordinates from an (X,Y) point coordinate, in the specified glyph ID in the specified font.

Calls the appropriate direction-specific variant (horizontal or vertical) depending on the value of @direction.

Since: 0.9.2

Definition at line 1317 of file hb-font.cc.

References direction, cordic::x, and y.