[HarfBuzz] harfbuzz: Branch 'master' - 2 commits

Behdad Esfahbod behdad at kemper.freedesktop.org
Fri Feb 9 21:43:48 UTC 2018


 src/hb-buffer.h |   19 +++++++++++++++++++
 1 file changed, 19 insertions(+)

New commits:
commit 3b7aa651b4714b996816023a4929c0289065493f
Author: Behdad Esfahbod <behdad at behdad.org>
Date:   Fri Feb 9 15:43:20 2018 -0600

    [docs] Improve UNSAFE_TO_BREAK docs

diff --git a/src/hb-buffer.h b/src/hb-buffer.h
index 9f86b494..cf182db1 100644
--- a/src/hb-buffer.h
+++ b/src/hb-buffer.h
@@ -73,8 +73,21 @@ typedef struct hb_glyph_info_t {
 
 /**
  * hb_glyph_flags_t:
- * @HB_GLYPH_FLAG_UNSAFE_TO_BREAK: If this glyph is split from the previous logical glyph
- *                                 then both sides should be re-shaped.
+ * @HB_GLYPH_FLAG_UNSAFE_TO_BREAK: Indicates that if input text is broken at the
+ * 				   beginning of the cluster this glyph is part of,
+ * 				   then both sides need to be re-shaped, as the
+ * 				   result might be different.  On the flip side,
+ * 				   it means that when this flag is not present,
+ * 				   then it's safe to break the glyph-run at the
+ * 				   beginning of this cluster, and the two sides
+ * 				   represent the exact same result one would get
+ * 				   if breaking input text at the beginning of
+ * 				   this cluster ans shaping the two sides
+ * 				   separately.  This can be used to optimize
+ * 				   paragraph layout, by avoiding re-shaping
+ * 				   of each line after line-breaking, or limiting
+ * 				   the reshaping to a small piece around the
+ * 				   breaking point only.
  */
 typedef enum { /*< flags >*/
   HB_GLYPH_FLAG_UNSAFE_TO_BREAK		= 0x00000001,
commit 671f0a7733a496eb46b08dc88c3c46b804cdd895
Author: bungeman <bungeman at chromium.org>
Date:   Thu Feb 1 13:31:25 2018 -0500

    Documentation for HB_GLYPH_FLAG_UNSAFE_TO_BREAK.
    
    HB_GLYPH_FLAG_UNSAFE_TO_BREAK means that the glyph with this flag is somehow affected by the previous logical glyph (the previous index in the buffer if ltr and the next index if the buffer is rtl). If these two glyphs are separated by a break (line or otherwise) then the underlying text should be re-shaped on both sides up to corresponding position in the text of some glyph not marked with this flag.

diff --git a/src/hb-buffer.h b/src/hb-buffer.h
index b2801ddf..9f86b494 100644
--- a/src/hb-buffer.h
+++ b/src/hb-buffer.h
@@ -71,9 +71,15 @@ typedef struct hb_glyph_info_t {
   hb_var_int_t   var2;
 } hb_glyph_info_t;
 
+/**
+ * hb_glyph_flags_t:
+ * @HB_GLYPH_FLAG_UNSAFE_TO_BREAK: If this glyph is split from the previous logical glyph
+ *                                 then both sides should be re-shaped.
+ */
 typedef enum { /*< flags >*/
   HB_GLYPH_FLAG_UNSAFE_TO_BREAK		= 0x00000001,
 
+  /*< private >*/
   HB_GLYPH_FLAG_DEFINED			= 0x00000001 /* OR of all defined flags */
 } hb_glyph_flags_t;
 


More information about the HarfBuzz mailing list