<div dir="ltr"><div class="gmail_default" style="font-family:trebuchet ms,sans-serif">Hello,</div><div class="gmail_default" style="font-family:trebuchet ms,sans-serif"><br></div><div class="gmail_default" style="font-family:trebuchet ms,sans-serif">Is there a way to detect the features Harfbuzz has applied to a code point? We are implementing Japanese text features and there are several places where we need that information:</div><div class="gmail_default" style="font-family:trebuchet ms,sans-serif"><br></div><div class="gmail_default" style="font-family:trebuchet ms,sans-serif">According to UTR #50 characters with the Tr property need a vertical variant but, as a fallback, the character can be displayed rotated 90 degrees. How can we detect if a vertical variant was not applied for a glyph so we can rotate it?</div><div class="gmail_default" style="font-family:trebuchet ms,sans-serif"><br></div><div class="gmail_default" style="font-family:trebuchet ms,sans-serif">When implementing something similar to the CSS property <a href="https://www.w3.org/TR/css-writing-modes-3/#propdef-text-combine-upright">text-combine-upright</a>, the client is supposed to try to use the hwid/twid/qwid features -if present- and then resort to things like converting to half-width forms and/or scaling the text to fit the 1em space allocated. Here, again, knowing if the features were applied would help to use the right fallback method (without the time consuming way of shaping with the different fallback methods until one fits).</div><div class="gmail_default" style="font-family:trebuchet ms,sans-serif"><br></div><div class="gmail_default" style="font-family:trebuchet ms,sans-serif">Is that possible without having to enable a feature and comparing the buffers with the feature and without it? Is a reverse lookup, where given a glyph index you get the table it comes from, possible?</div><div class="gmail_default" style="font-family:trebuchet ms,sans-serif"><br></div><div class="gmail_default" style="font-family:trebuchet ms,sans-serif">If not, would it make sense to add an (optional?) member to hb_glyph_info_t (or a different struct?) so for each glyph besides the cluster you can also know the feature(s) that made that glyph index be selected?</div><div class="gmail_default" style="font-family:trebuchet ms,sans-serif"><br></div><div class="gmail_default" style="font-family:trebuchet ms,sans-serif">Thanks a lot!</div><div class="gmail_default" style="font-family:trebuchet ms,sans-serif">Pedro</div></div>