Definition of lineSpacing in bitmaptext game object
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 40.3k
- Forks
- 7.2k
- PR merge metrics
- No merged PRs in 30d
Description
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
Therefore, the extra line spacing is lineSpacing value multiple the scale. i.e. not a constant value for all font sizes.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the linked CodePen reproduction and the referenced calculations in src/gameobjects/bitmaptext/GetBitmapTextSize.js at lines 90, 295, and 376. Compare lineSpacing, lineHeight, and font-size scaling to determine the intended definition, then document the confirmed behavior in the appropriate API documentation. Done means the relationship is stated unambiguously for different font sizes.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- game-dev
- Issue type
- Documentation
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100