[docs] A few improvements

If we wrote just this much every day...
This commit is contained in:
Behdad Esfahbod 2018-09-24 10:43:06 -04:00
parent 57fa2c23de
commit 55bae6825e
4 changed files with 33 additions and 14 deletions

View File

@ -1887,6 +1887,10 @@ hb_buffer_t::sort (unsigned int start, unsigned int end, int(*compar)(const hb_g
/** /**
* hb_buffer_diff: * hb_buffer_diff:
* @buffer: a buffer.
* @reference: other buffer to compare to.
* @dottedcircle_glyph: glyph id of U+25CC DOTTED CIRCLE, or (hb_codepont_t) -1.
* @position_fuzz: allowed absolute difference in position values.
* *
* If dottedcircle_glyph is (hb_codepoint_t) -1 then %HB_BUFFER_DIFF_FLAG_DOTTED_CIRCLE_PRESENT * If dottedcircle_glyph is (hb_codepoint_t) -1 then %HB_BUFFER_DIFF_FLAG_DOTTED_CIRCLE_PRESENT
* and %HB_BUFFER_DIFF_FLAG_NOTDEF_PRESENT are never returned. This should be used by most * and %HB_BUFFER_DIFF_FLAG_NOTDEF_PRESENT are never returned. This should be used by most

View File

@ -44,7 +44,6 @@ HB_BEGIN_DECLS
* hb_glyph_info_t: * hb_glyph_info_t:
* @codepoint: either a Unicode code point (before shaping) or a glyph index * @codepoint: either a Unicode code point (before shaping) or a glyph index
* (after shaping). * (after shaping).
* @mask:
* @cluster: the index of the character in the original text that corresponds * @cluster: the index of the character in the original text that corresponds
* to this #hb_glyph_info_t, or whatever the client passes to * to this #hb_glyph_info_t, or whatever the client passes to
* hb_buffer_add(). More than one #hb_glyph_info_t can have the same * hb_buffer_add(). More than one #hb_glyph_info_t can have the same
@ -59,11 +58,13 @@ HB_BEGIN_DECLS
* *
* The #hb_glyph_info_t is the structure that holds information about the * The #hb_glyph_info_t is the structure that holds information about the
* glyphs and their relation to input text. * glyphs and their relation to input text.
*
*/ */
typedef struct hb_glyph_info_t { typedef struct hb_glyph_info_t
{
hb_codepoint_t codepoint; hb_codepoint_t codepoint;
hb_mask_t mask; /* Holds hb_glyph_flags_t after hb_shape(), plus other things. */ /*< private >*/
hb_mask_t mask;
/*< public >*/
uint32_t cluster; uint32_t cluster;
/*< private >*/ /*< private >*/
@ -92,6 +93,7 @@ typedef struct hb_glyph_info_t {
typedef enum { /*< flags >*/ typedef enum { /*< flags >*/
HB_GLYPH_FLAG_UNSAFE_TO_BREAK = 0x00000001, HB_GLYPH_FLAG_UNSAFE_TO_BREAK = 0x00000001,
/*< private >*/
HB_GLYPH_FLAG_DEFINED = 0x00000001 /* OR of all defined flags */ HB_GLYPH_FLAG_DEFINED = 0x00000001 /* OR of all defined flags */
} hb_glyph_flags_t; } hb_glyph_flags_t;
@ -298,7 +300,15 @@ hb_buffer_set_flags (hb_buffer_t *buffer,
HB_EXTERN hb_buffer_flags_t HB_EXTERN hb_buffer_flags_t
hb_buffer_get_flags (hb_buffer_t *buffer); hb_buffer_get_flags (hb_buffer_t *buffer);
/* /**
* hb_buffer_cluster_level_t:
* @HB_BUFFER_CLUSTER_LEVEL_MONOTONE_GRAPHEMES: Return cluster values grouped by graphemes into
* monotone order.
* @HB_BUFFER_CLUSTER_LEVEL_MONOTONE_CHARACTERS: Return cluster values grouped into monotone order.
* @HB_BUFFER_CLUSTER_LEVEL_CHARACTERS: Don't group cluster values.
* @HB_BUFFER_CLUSTER_LEVEL_DEFAULT: Default cluster level,
* equal to @HB_BUFFER_CLUSTER_LEVEL_MONOTONE_GRAPHEMES.
*
* Since: 0.9.42 * Since: 0.9.42
*/ */
typedef enum { typedef enum {

View File

@ -36,12 +36,12 @@
/** /**
* hb_face_count: Get number of faces on the blob * hb_face_count:
* @blob: * @blob: a blob.
* *
* Get number of faces in a blob.
* *
* * Return value: Number of faces in @blob
* Return value: Number of faces on the blob
* *
* Since: 1.7.7 * Since: 1.7.7
**/ **/
@ -488,6 +488,9 @@ hb_face_get_glyph_count (const hb_face_t *face)
/** /**
* hb_face_get_table_tags: * hb_face_get_table_tags:
* @face: a face. * @face: a face.
* @start_offset: index of first tag to return.
* @table_count: input length of @table_tags array, output number of items written.
* @table_tags: array to write tags into.
* *
* Retrieves table tags for a face, if possible. * Retrieves table tags for a face, if possible.
* *

View File

@ -1703,9 +1703,11 @@ hb_font_get_ppem (hb_font_t *font,
/** /**
* hb_font_set_ptem: * hb_font_set_ptem:
* @font: a font. * @font: a font.
* @ptem: * @ptem: font size in points.
* *
* Sets "point size" of the font. * Sets "point size" of the font. Set to 0 to unset.
*
* There are 72 points in an inch.
* *
* Since: 1.6.0 * Since: 1.6.0
**/ **/
@ -1931,9 +1933,9 @@ hb_font_get_variation_glyph_trampoline (hb_font_t *font,
/** /**
* hb_font_funcs_set_glyph_func: * hb_font_funcs_set_glyph_func:
* @ffuncs: font functions. * @ffuncs: font functions.
* @func: (closure user_data) (destroy destroy) (scope notified): * @func: (closure user_data) (destroy destroy) (scope notified): callback function.
* @user_data: * @user_data: data to pass to @func.
* @destroy: * @destroy: function to call when @user_data is not needed anymore.
* *
* Deprecated. Use hb_font_funcs_set_nominal_glyph_func() and * Deprecated. Use hb_font_funcs_set_nominal_glyph_func() and
* hb_font_funcs_set_variation_glyph_func() instead. * hb_font_funcs_set_variation_glyph_func() instead.