Skip to content

TextBox caret has incorrect position at the end of the string #12809

@HermanKirshin

Description

@HermanKirshin

Describe the bug
Caret in the end of the string overlaps letter

To Reproduce
Steps to reproduce the behavior:

  1. Create text box with Inter font and a bit smaller font size (i.e. 11.92)
  2. Write some text and compare caret position relative to letter in the end of the string and in the middle.
    <LayoutTransformControl> <LayoutTransformControl.LayoutTransform> <ScaleTransform ScaleX="5" ScaleY="5" /> </LayoutTransformControl.LayoutTransform> <TextBox FontFamily="avares://Avalonia.Fonts.Inter/Assets#Inter" FontSize="11.92" /> </LayoutTransformControl>

Expected behavior
Caret offset from letter is always the same

Screenshots
I applied x5 scaling to window for better visibility.

here you can see distance between number and caret
image

and here they overlap
image

Desktop (please complete the following information):

  • OS: Any
  • Version 11

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions