Note that Canvas.drawText internally calls SkCanvas::drawSimpleText.
Note that this does not do any text shaping, so will only work well
with languages that don't require anything more than simple code point
to glyph conversions (for complex shaping you'll need to use something
like CanvasKit.Paragraph).
That being said, Canvas.drawText internally does something like
calling Font.getGlyphIDs and Font.getGlyphWidths, creates the position
of each glyph by accumulating the appropriate widths, then passes this
information to Canvas.drawGlyphs. Then one can use Font.getGlyphBounds
and join the bounds of the glyphs where they are positioned to get a
bounding rectangle. If using CanvasKit.Paragraph then that takes care
of shaping and providing the positioned glyph ids
(Paragraph.getShapedLines), and bounds can then be had through
Font.getGlyphBounds in a similar way.
> --
> You received this message because you are subscribed to the Google Groups "skia-discuss" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to
skia-discuss...@googlegroups.com.
> To view this discussion on the web visit
https://groups.google.com/d/msgid/skia-discuss/bc7fb0a4-f8b1-49aa-9a49-23f677d77a95n%40googlegroups.com.