[HarfBuzz] How to tell if a substitution has been applied?

Pedro Navarro pnavarro at netflix.com
Fri Sep 29 01:46:28 UTC 2017


Hi all,

When rendering vertical text I need to know if a vertical variant has been
selected for a code point and, if not, rotate it manually. According to UTR
#50, U+2026 HORIZONTAL ELLIPSIS is marked as 'R', which means it needs to
be rotated. If the font has a vertical variant for it, like it happens with
Noto, I shouldn't rotate the character or else it will be made horizontal
again.

How can one detect if a substitution has been applied to a code point? I
was hoping it would be in hb_glyph_flags_t but I can see only
HB_GLYPH_UNSAFE_TO_BREAK. Do I need to shape the text in both horizontal
and vertical mode and diff the buffers to see if the glyph indices have
changed?

Thanks!
Pedro
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/harfbuzz/attachments/20170928/ed77a3e6/attachment.html>


More information about the HarfBuzz mailing list