BreakText returns incorrect number of characters if text contains cyrillic characters


Please, see PaintSurface code in attached file.



  • mattleibowmattleibow ZAXamarin Team Xamurai

    Moving this to the GitHub issue as this is a "bug" with both the docs and the managed perception, but still is functioning as designed:

  • ConstantinConstantin RUMember ✭✭

    Matthew, thank you!
    "The return value is actually the NUMBER OF BYTES in the string, that is why you see the larger numbers."
    This code can work and that's Ok:

        textPaint.TextEncoding = SKTextEncoding.Utf16;
        var l = textPaint.BreakText(t, maxw, out mw) >> 1;
Sign In or Register to comment.