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

Definition of lineSpacing in bitmaptext game object #6932

Open
rexrainbow opened this issue Oct 26, 2024 · 0 comments
Open

Definition of lineSpacing in bitmaptext game object #6932

rexrainbow opened this issue Oct 26, 2024 · 0 comments

Comments

@rexrainbow
Copy link
Contributor

rexrainbow commented Oct 26, 2024

I try to figure out the line height of each line in BitmapText game object.
Test code, which

  • set font size to 30
  • has lineSpacing 20

What is the definition of lineSpacing?
I assume that It is the extra space between each line, no matter the font size is.

But, from the source code

  1. summation lineHeigit and lineSpacing
  2. multiple the scale, the scale is calculated by font size

Therefore, the extra line spacing is lineSpacing value multiple the scale. i.e. not a constant value for all font sizes.

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

No branches or pull requests

2 participants