Skip to content

vertical spacing between lines is not scaled when rendering text with scaling #40

@waterimp

Description

@waterimp

When I render text using FC_DrawColumnEffect(), I like to set effect.scale.x and effect.scale.y. When I make effect.scale.y larger (say 2.0 or 3.0), I notice that the lines between my text get smushed together too closely. When I make effect.scale.y smaller than 1 (say 0.5), the lines are unusually far apart.

I have traced the problem to here in FC_DrawColumnFromBuffer(), which does not take into account scale when determining where next line starts from, but just the unscaled line height:

    y += FC_GetLineHeight(font);

I have a one-line PR coming in a minute that fixes this issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions