Skip to content

Hat vertical alignment varies with font size #2015

Open
@pokey

Description

@pokey

I haven't personally observed this, but from @AndreasArvidsson:

I think I found a bug with our hats vertical alignment code. We calculate the vertical alignment based on the default font size.

(DEFAULT_VERTICAL_OFFSET_EM + hatVerticalOffsetEm) * fontSize -

This means that if you increase the size of the hats the vertical alignment becomes different. I've done a few experiments and the alignment of curve changes depending on the size of the hats

Original size
image (7)

"cursorless.hatSizeAdjustment": 5,
image (8)

Because our alignment is based on EM/% but we do not actually calculate it on the size of the actual hat. If you make the hat larger, but still have the same offset in pixels it's center is of course going to move

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions