BitmapFont default pixel height bug fixed.
This commit is contained in:
parent
4a836cef75
commit
2a007cfb70
@ -62,7 +62,6 @@ namespace SlatedGameToolkit.Framework.Graphics.Text
|
||||
for (int i = 0; i < this.textures.Length; i++) {
|
||||
this.textures[i] = new FontTexture(info, context, glyphIndices, textureSizes);
|
||||
}
|
||||
PixelHeight = 64;
|
||||
int spaceAdvance, leftSideBearing;
|
||||
StbTrueType.stbtt_GetCodepointHMetrics(info, ' ', &spaceAdvance, &leftSideBearing);
|
||||
this.spaceAdvance = spaceAdvance;
|
||||
@ -76,6 +75,7 @@ namespace SlatedGameToolkit.Framework.Graphics.Text
|
||||
context.GetViewport(out vX, out vY, out vWidth, out vHeight);
|
||||
this.PixelsPerUnitWidth = vWidth;
|
||||
this.PixelsPerUnitHeight = vHeight;
|
||||
PixelHeight = 64;
|
||||
}
|
||||
|
||||
public BitmapFont(string path, GLContext glContext = null, int cacheSize = 1024, int textures = 2, uint textureSizes = 512) : this(File.ReadAllBytes(path), glContext, cacheSize, textures, textureSizes) {
|
||||
|
Loading…
Reference in New Issue
Block a user