Avoid BOT/EOT setting in HarfBuzz.
Unlike many users of HarfBuzz, the Skia shaper sets HB_BUFFER_FLAG_BOT and HB_BUFFER_FLAG_EOT flags to inform HarfBuzz that the full context contains the beginning and end of the paragraph so that it can treat the beginning and end of the context specially. In reality, the EOT flag currently does nothing and the BOT flag only has the effect of adding a dotted circle (if the font provides it) if the first codepoint in the text and context is a unicode mark. This behavior is generally unwanted, so just remove it with a note to revisit this decision should HarfBuzz ever change the effect of these flags. Bug: skia:9618 Change-Id: I6cdf86ff3499e1321b1212d63192a4a9c5847e39 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/264686 Auto-Submit: Ben Wagner <bungeman@google.com> Reviewed-by: Julia Lavrova <jlavrova@google.com> Reviewed-by: Herb Derby <herb@google.com> Commit-Queue: Ben Wagner <bungeman@google.com>
This commit is contained in:
parent
d5c42c8c03
commit
56a48bb1aa
@ -1295,8 +1295,10 @@ ShapedRun ShaperHarfBuzz::shape(char const * const utf8,
|
||||
hb_buffer_set_content_type(buffer, HB_BUFFER_CONTENT_TYPE_UNICODE);
|
||||
hb_buffer_set_cluster_level(buffer, HB_BUFFER_CLUSTER_LEVEL_MONOTONE_CHARACTERS);
|
||||
|
||||
// See 763e5466c0a03a7c27020e1e2598e488612529a7 for documentation.
|
||||
hb_buffer_set_flags(buffer, HB_BUFFER_FLAG_BOT | HB_BUFFER_FLAG_EOT);
|
||||
// Documentation for HB_BUFFER_FLAG_BOT/EOT at 763e5466c0a03a7c27020e1e2598e488612529a7.
|
||||
// Currently BOT forces a dotted circle when first codepoint is a mark; EOT has no effect.
|
||||
// Avoid adding dotted circle, re-evaluate if BOT/EOT change. See https://skbug.com/9618.
|
||||
// hb_buffer_set_flags(buffer, HB_BUFFER_FLAG_BOT | HB_BUFFER_FLAG_EOT);
|
||||
|
||||
// Add precontext.
|
||||
hb_buffer_add_utf8(buffer, utf8, utf8Start - utf8, utf8Start - utf8, 0);
|
||||
|
Loading…
Reference in New Issue
Block a user