From b029a45caa6067c752643e49b30233a74a8be721 Mon Sep 17 00:00:00 2001 From: Khaled Hosny Date: Tue, 22 Dec 2020 23:32:48 +0200 Subject: [PATCH 1/7] [docs] Add new API to harfbuzz-sections.txt --- docs/harfbuzz-docs.xml | 1 + docs/harfbuzz-sections.txt | 3 +++ 2 files changed, 4 insertions(+) diff --git a/docs/harfbuzz-docs.xml b/docs/harfbuzz-docs.xml index ea4c8aeed..99b2d0b76 100644 --- a/docs/harfbuzz-docs.xml +++ b/docs/harfbuzz-docs.xml @@ -133,6 +133,7 @@ API Index Index of deprecated API + Index of new symbols in 2.7.3 Index of new symbols in 2.6.0 Index of new symbols in 2.5.0 Index of new symbols in 2.4.0 diff --git a/docs/harfbuzz-sections.txt b/docs/harfbuzz-sections.txt index ef1b88da1..32f794b29 100644 --- a/docs/harfbuzz-sections.txt +++ b/docs/harfbuzz-sections.txt @@ -89,8 +89,11 @@ hb_buffer_normalize_glyphs hb_buffer_reverse hb_buffer_reverse_range hb_buffer_reverse_clusters +hb_buffer_serialize hb_buffer_serialize_glyphs hb_buffer_deserialize_glyphs +hb_buffer_serialize_unicode +hb_buffer_deserialize_unicode hb_buffer_serialize_format_from_string hb_buffer_serialize_format_to_string hb_buffer_serialize_list_formats From 8c3a530fd7aa832215b84f4f38d58f58ac8a5832 Mon Sep 17 00:00:00 2001 From: Khaled Hosny Date: Tue, 22 Dec 2020 23:52:46 +0200 Subject: [PATCH 2/7] [docs] Some formatting fixes --- src/hb-buffer-serialize.cc | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/hb-buffer-serialize.cc b/src/hb-buffer-serialize.cc index 294b65e42..f65bad45b 100644 --- a/src/hb-buffer-serialize.cc +++ b/src/hb-buffer-serialize.cc @@ -418,6 +418,7 @@ _hb_buffer_serialize_unicode_text (hb_buffer_t *buffer, * ``` * [uni0651=0@518,0+0|uni0628=0+1897] * ``` + * * - The serialized glyphs are delimited with `[` and `]`. * - Glyphs are separated with `|` * - Each glyph starts with glyph name, or glyph index if @@ -426,9 +427,7 @@ _hb_buffer_serialize_unicode_text (hb_buffer_t *buffer, * - If #HB_BUFFER_SERIALIZE_FLAG_NO_POSITIONS is not set, the #hb_glyph_position_t in the format: * - If both #hb_glyph_position_t.x_offset and #hb_glyph_position_t.y_offset are not 0, `@x_offset,y_offset`. Then, * - `+x_advance`, then `,y_advance` if #hb_glyph_position_t.y_advance is not 0. Then, - * - If #HB_BUFFER_SERIALIZE_FLAG_GLYPH_EXTENTS is set, the - * #hb_glyph_extents_t in the format - * `<x_bearing,y_bearing,width,height>` + * - If #HB_BUFFER_SERIALIZE_FLAG_GLYPH_EXTENTS is set, the #hb_glyph_extents_t in the format `` * * ## json * A machine-readable, structured format. @@ -438,6 +437,7 @@ _hb_buffer_serialize_unicode_text (hb_buffer_t *buffer, * [{"g":"uni0651","cl":0,"dx":518,"dy":0,"ax":0,"ay":0}, * {"g":"uni0628","cl":0,"dx":0,"dy":0,"ax":1897,"ay":0}] * ``` + * * Each glyph is a JSON object, with the following properties: * - `g`: the glyph name or glyph index if * #HB_BUFFER_SERIALIZE_FLAG_NO_GLYPH_NAMES flag is set. @@ -527,8 +527,9 @@ hb_buffer_serialize_glyphs (hb_buffer_t *buffer, * The serialized codepoints will look something like: * * ``` - * + *   * ``` + * * - Glyphs are separated with `|` * - Unicode codepoints are expressed as zero-padded four (or more) * digit hexadecimal numbers preceded by `U+` @@ -544,6 +545,7 @@ hb_buffer_serialize_glyphs (hb_buffer_t *buffer, * #HB_BUFFER_SERIALIZE_FLAG_NO_CLUSTERS is not set. * * For example: + * * ``` * [{u:1617,cl:0},{u:1576,cl:1}] * ``` From b8b13018edc4115e9857d7871d254c5737f90046 Mon Sep 17 00:00:00 2001 From: Khaled Hosny Date: Wed, 23 Dec 2020 00:22:56 +0200 Subject: [PATCH 3/7] =?UTF-8?q?[docs]=20Make=20gtk-doc=20find=20these=20ty?= =?UTF-8?q?pedef=E2=80=99s?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/hb-aat-layout.h | 3 +-- src/hb-buffer.h | 3 +-- src/hb-font.h | 6 ++---- src/hb-ot-color.h | 3 +-- src/hb-ot-deprecated.h | 3 +-- src/hb-ot-name.h | 3 +-- src/hb-ot-var.h | 3 +-- 7 files changed, 8 insertions(+), 16 deletions(-) diff --git a/src/hb-aat-layout.h b/src/hb-aat-layout.h index 89acb3544..dc1bf9657 100644 --- a/src/hb-aat-layout.h +++ b/src/hb-aat-layout.h @@ -732,8 +732,7 @@ HB_EXTERN hb_ot_name_id_t hb_aat_layout_feature_type_get_name_id (hb_face_t *face, hb_aat_layout_feature_type_t feature_type); -typedef struct hb_aat_layout_feature_selector_info_t -{ +typedef struct hb_aat_layout_feature_selector_info_t { hb_ot_name_id_t name_id; hb_aat_layout_feature_selector_t enable; hb_aat_layout_feature_selector_t disable; diff --git a/src/hb-buffer.h b/src/hb-buffer.h index 19a89bb61..932531a8c 100644 --- a/src/hb-buffer.h +++ b/src/hb-buffer.h @@ -59,8 +59,7 @@ HB_BEGIN_DECLS * The #hb_glyph_info_t is the structure that holds information about the * glyphs and their relation to input text. */ -typedef struct hb_glyph_info_t -{ +typedef struct hb_glyph_info_t { hb_codepoint_t codepoint; /*< private >*/ hb_mask_t mask; diff --git a/src/hb-font.h b/src/hb-font.h index e1a5719f1..5c6d56897 100644 --- a/src/hb-font.h +++ b/src/hb-font.h @@ -82,8 +82,7 @@ hb_font_funcs_is_immutable (hb_font_funcs_t *ffuncs); /* font and glyph extents */ /* Note that typically ascender is positive and descender negative in coordinate systems that grow up. */ -typedef struct hb_font_extents_t -{ +typedef struct hb_font_extents_t { hb_position_t ascender; /* typographic ascender. */ hb_position_t descender; /* typographic descender. */ hb_position_t line_gap; /* suggested line spacing gap. */ @@ -100,8 +99,7 @@ typedef struct hb_font_extents_t } hb_font_extents_t; /* Note that height is negative in coordinate systems that grow up. */ -typedef struct hb_glyph_extents_t -{ +typedef struct hb_glyph_extents_t { hb_position_t x_bearing; /* left side of glyph from origin. */ hb_position_t y_bearing; /* top side of glyph from origin. */ hb_position_t width; /* distance from left to right side. */ diff --git a/src/hb-ot-color.h b/src/hb-ot-color.h index 63ef20a1a..4f37a4386 100644 --- a/src/hb-ot-color.h +++ b/src/hb-ot-color.h @@ -100,8 +100,7 @@ hb_ot_color_has_layers (hb_face_t *face); * * Since: 2.1.0 **/ -typedef struct hb_ot_color_layer_t -{ +typedef struct hb_ot_color_layer_t { hb_codepoint_t glyph; unsigned int color_index; } hb_ot_color_layer_t; diff --git a/src/hb-ot-deprecated.h b/src/hb-ot-deprecated.h index bc72f8a70..2e75deef2 100644 --- a/src/hb-ot-deprecated.h +++ b/src/hb-ot-deprecated.h @@ -82,8 +82,7 @@ hb_ot_tag_from_language (hb_language_t language); * Since: 1.4.2 * Deprecated: 2.2.0 */ -typedef struct hb_ot_var_axis_t -{ +typedef struct hb_ot_var_axis_t { hb_tag_t tag; hb_ot_name_id_t name_id; float min_value; diff --git a/src/hb-ot-name.h b/src/hb-ot-name.h index 3b4ad581c..6f3fcd242 100644 --- a/src/hb-ot-name.h +++ b/src/hb-ot-name.h @@ -88,8 +88,7 @@ typedef unsigned int hb_ot_name_id_t; * * Since: 2.1.0 **/ -typedef struct hb_ot_name_entry_t -{ +typedef struct hb_ot_name_entry_t { hb_ot_name_id_t name_id; /*< private >*/ hb_var_int_t var; diff --git a/src/hb-ot-var.h b/src/hb-ot-var.h index fc5a9f3ca..ef2ca0a71 100644 --- a/src/hb-ot-var.h +++ b/src/hb-ot-var.h @@ -115,8 +115,7 @@ typedef enum { /*< flags >*/ * * Since: 2.2.0 */ -typedef struct hb_ot_var_axis_info_t -{ +typedef struct hb_ot_var_axis_info_t { unsigned int axis_index; hb_tag_t tag; hb_ot_name_id_t name_id; From 0826940821e9b8068b0341dae4d3ea237df86aa2 Mon Sep 17 00:00:00 2001 From: Khaled Hosny Date: Wed, 23 Dec 2020 00:45:39 +0200 Subject: [PATCH 4/7] [docs] Add messing sections Docs for these sections were not generated at all. --- docs/harfbuzz-docs.xml | 4 ++++ src/hb-directwrite.cc | 9 +++++++++ src/hb-gdi.cc | 10 ++++++++++ src/hb-ot-metrics.cc | 9 +++++++++ 4 files changed, 32 insertions(+) diff --git a/docs/harfbuzz-docs.xml b/docs/harfbuzz-docs.xml index 99b2d0b76..c584151da 100644 --- a/docs/harfbuzz-docs.xml +++ b/docs/harfbuzz-docs.xml @@ -104,6 +104,8 @@ + + @@ -123,6 +125,8 @@ + +