mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-08 11:38:21 +02:00
Don't pass line height in GetLineSpacing
This commit is contained in:
parent
1cb21de201
commit
12a87caa65
4 changed files with 10 additions and 10 deletions
|
@ -894,11 +894,11 @@ namespace Beefy.gfx
|
|||
return (int32)theString.Length;
|
||||
}
|
||||
|
||||
public float GetLineSpacing(float heightMultiplier = 1.0f)
|
||||
public float GetLineSpacing()
|
||||
{
|
||||
if (mFTFont == null)
|
||||
return 0;
|
||||
return mFTFont.mHeight * heightMultiplier;
|
||||
return mFTFont.mHeight;
|
||||
}
|
||||
|
||||
public float GetHeight()
|
||||
|
|
|
@ -105,7 +105,7 @@ namespace Beefy.theme.dark
|
|||
mLineCoords.GrowUninitialized(mData.mLineStarts.Count);
|
||||
mLineCoordJumpTable.Clear();
|
||||
|
||||
float fontHeight = mFont.GetLineSpacing(mLineHeight);
|
||||
float fontHeight = mFont.GetLineSpacing() * mLineHeight;
|
||||
int prevJumpIdx = -1;
|
||||
float jumpCoordSpacing = GetJumpCoordSpacing();
|
||||
|
||||
|
@ -218,7 +218,7 @@ namespace Beefy.theme.dark
|
|||
public float GetTextOffset()
|
||||
{
|
||||
float baseLineSpacing = mFont.GetLineSpacing();
|
||||
float lineSpacing = mFont.GetLineSpacing(mLineHeight);
|
||||
float lineSpacing = mFont.GetLineSpacing() * mLineHeight;
|
||||
return lineSpacing / 2.0f - baseLineSpacing / 2.0f;
|
||||
}
|
||||
|
||||
|
@ -534,7 +534,7 @@ namespace Beefy.theme.dark
|
|||
|
||||
#unwarn
|
||||
int lineCount = GetLineCount();
|
||||
float lineSpacing = mFont.GetLineSpacing(mLineHeight);
|
||||
float lineSpacing = mFont.GetLineSpacing() * mLineHeight;
|
||||
float fontLineSpacing = mFont.GetLineSpacing();
|
||||
float textYOffset = GetTextOffset();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue