NEWS | 15 +++
configure.ac |2 -
docs/harfbuzz-sections.txt |1
src/hb-font-private.hh | 20 +++
src/hb-font.cc | 57 +
src/hb-font.h | 27 +++--
src/hb-version.h |4 +--
7 files changed, 116 insertions(+), 10 deletions(-)
New commits:
commit e49a38b20e82e50bca96751470e945cbe0524880
Author: Behdad Esfahbod
Date: Tue Aug 7 09:55:42 2018 -0700
1.8.6
diff --git a/NEWS b/NEWS
index 13aa6629..e97a501d 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,18 @@
+Overview of changes leading to 1.8.6
+Tuesday, August 7, 2018
+
+- Internal code shuffling.
+- New API to speed up getting advance widths for implementations
+ that have heavy overhead in get_h_advance callback:
++hb_font_funcs_set_glyph_h_advances_func
++hb_font_funcs_set_glyph_v_advances_func
++hb_font_get_glyph_advances_for_direction
++hb_font_get_glyph_h_advances
++hb_font_get_glyph_h_advances_func_t
++hb_font_get_glyph_v_advances
++hb_font_get_glyph_v_advances_func_t
+
+
Overview of changes leading to 1.8.5
Wednesday, August 1, 2018
diff --git a/configure.ac b/configure.ac
index c439f54d..c03d79dc 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,6 +1,6 @@
AC_PREREQ([2.64])
AC_INIT([HarfBuzz],
-[1.8.5],
+[1.8.6],
[https://github.com/harfbuzz/harfbuzz/issues/new],
[harfbuzz],
[http://harfbuzz.org/])
diff --git a/src/hb-font.cc b/src/hb-font.cc
index 77c0617a..80768d6d 100644
--- a/src/hb-font.cc
+++ b/src/hb-font.cc
@@ -789,7 +789,7 @@ hb_font_get_glyph_v_advance (hb_font_t *font,
*
*
*
- * Since: REPLACEME
+ * Since: 1.8.6
**/
void
hb_font_get_glyph_h_advances (hb_font_t* font,
@@ -807,7 +807,7 @@ hb_font_get_glyph_h_advances (hb_font_t* font,
*
*
*
- * Since: REPLACEME
+ * Since: 1.8.6
**/
void
hb_font_get_glyph_v_advances (hb_font_t* font,
@@ -1031,7 +1031,7 @@ hb_font_get_glyph_advance_for_direction (hb_font_t *font,
*
*
*
- * Since: REPLACEME
+ * Since: 1.8.6
**/
HB_EXTERN void
hb_font_get_glyph_advances_for_direction (hb_font_t* font,
diff --git a/src/hb-font.h b/src/hb-font.h
index cd211533..6cd48697 100644
--- a/src/hb-font.h
+++ b/src/hb-font.h
@@ -283,7 +283,7 @@ hb_font_funcs_set_glyph_v_advance_func (hb_font_funcs_t
*ffuncs,
*
*
*
- * Since: REPLACEME
+ * Since: 1.8.6
**/
HB_EXTERN void
hb_font_funcs_set_glyph_h_advances_func (hb_font_funcs_t *ffuncs,
@@ -299,7 +299,7 @@ hb_font_funcs_set_glyph_h_advances_func (hb_font_funcs_t
*ffuncs,
*
*
*
- * Since: REPLACEME
+ * Since: 1.8.6
**/
HB_EXTERN void
hb_font_funcs_set_glyph_v_advances_func (hb_font_funcs_t *ffuncs,
diff --git a/src/hb-version.h b/src/hb-version.h
index c5092c78..7406ea8c 100644
--- a/src/hb-version.h
+++ b/src/hb-version.h
@@ -38,9 +38,9 @@ HB_BEGIN_DECLS
#define HB_VERSION_MAJOR 1
#define HB_VERSION_MINOR 8
-#define HB_VERSION_MICRO 5
+#define HB_VERSION_MICRO 6
-#define HB_VERSION_STRING "1.8.5"
+#define HB_VERSION_STRING "1.8.6"
#define HB_VERSION_ATLEAST(major,minor,micro) \
((major)*1+(minor)*100+(micro) <= \
commit b0ff79acd804e47a2a3db73746cf9c6dc986950a
Author: Behdad Esfahbod
Date: Tue Aug 7 09:52:06 2018 -0700
Add +hb_font_get_glyph_advances_for_direction
New API:
+hb_font_get_glyph_advances_for_direction
diff --git a/docs/harfbuzz-sections.txt b/docs/harfbuzz-sections.txt
index f012fbdb..16b66277 100644
--- a/docs/harfbuzz-sections.txt
+++ b/docs/harfbuzz-sections.txt
@@ -225,6 +225,7 @@ hb_font_get_face
hb_font_get_glyph
hb_font_get_glyph_advance_for_direction
hb_font_get_glyph_advance_func_t
+hb_font_get_glyph_advances_for_direction
hb_font_get_glyph_contour_point
hb_font_get_glyph_contour_point_for_origin
hb_font_get_glyph_contour_point_func_t
diff --git a/src/hb-font-private.hh b/src/hb-font-private.hh
index c1981dda..d3a41380 100644
--- a/src/hb-font-private.hh
+++ b/src/hb-font-private.hh
@@ -376,6 +376,18 @@ struct hb_font_t
else
*y = get_glyph_v_advance (glyph);
}
+ inline void get_glyph_advances_for_direction (hb_direction_t direction,
+ unsigned count,
+ hb_codepoint_t *first_glyph,
+ unsigned glyph_stride,
+ hb_position_t *first_advance,
+ unsigned advance_stride)
+ {
+if (likely (HB_DIRECTION_IS_HORIZONTAL (direction)))
+ get_glyph_h_advances (count, first_glyph, glyph_stride, first_advance,
advance_stride);
+else
+ get_glyph_v_advances (count, first_glyph, glyph_stride, first_advance,
advance_stride);
+ }
inline void guess_v_origin_minus_h_origin (hb_codepoint_t glyph,