0

The method IDWriteTextLayout::HitTestTextPosition takes the first parameter as UINT32 textPosition which the docs describe as:

The text position used to get the pixel location.

But I can't fully understand the meaning of text position in this context. Does it mean the utf-16 index so I should use CharNext and CharPrev to advance and decrease the index? Or does it mean the character (aka wchar_t) index which is 2 bytes on Windows? Or does it mean the glyph index which I don't know what is it?

The text position is also in DWRITE_GLYPH_RUN_DESCRIPTION passed to IDWriteTextRenderer::DrawGlyphRun

dev65
  • 1,440
  • 10
  • 25

0 Answers0