I am trying to figure out how to render text like "👨🏿hi" (U+1F468, U+1F3FF, 'h', 'i') correctly. Since this case involves mixing fonts, I need to figure out the advance distance of the emoji.
SkFont::measureText() does not work for multi-codepoint graphemes, because it simply sums up the advance distance of each code point; the skin color emoji modifier has its own advance distance, which should be ignored.
SkTextBlob::bounds() is the conservative bounding box, which is still larger than the actual advance width.
I *think* if using HarfBuzz directly this could be achieved by calling hb_buffer_get_glyph_positions() and summing the advance of each cluster. Wondering if it's possible to obtain the data from skia directly.