Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
waterimp opened this issue Feb 2, 2020 · 0 comments · May be fixed by #41
Open

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

waterimp opened this issue Feb 2, 2020 · 0 comments · May be fixed by #41

Comments

@waterimp
Copy link

waterimp commented Feb 2, 2020

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant