[docs] Improve UNSAFE_TO_BREAK docs

This commit is contained in:
Behdad Esfahbod 2018-02-09 15:43:20 -06:00
parent 671f0a7733
commit 3b7aa651b4
1 changed files with 15 additions and 2 deletions

View File

@ -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,