mirror of
https://github.com/curioustorvald/Terrarum-sans-bitmap.git
synced 2026-03-07 11:51:50 +09:00
making use of the long-neglected scale variable
This commit is contained in:
@@ -306,12 +306,11 @@ class TerrarumSansBitmap(
|
|||||||
glyphProps[0] = GlyphProps(0)
|
glyphProps[0] = GlyphProps(0)
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun getLineHeight(): Float = H.toFloat()
|
override fun getLineHeight(): Float = H.toFloat() * scale
|
||||||
|
override fun getXHeight() = 8f * scale
|
||||||
override fun getXHeight() = 8f
|
override fun getCapHeight() = 12f * scale
|
||||||
override fun getCapHeight() = 12f
|
override fun getAscent() = 3f * scale
|
||||||
override fun getAscent() = 3f
|
override fun getDescent() = 3f * scale
|
||||||
override fun getDescent() = 3f
|
|
||||||
override fun isFlipped() = flipY
|
override fun isFlipped() = flipY
|
||||||
|
|
||||||
override fun setFixedWidthGlyphs(glyphs: CharSequence) {
|
override fun setFixedWidthGlyphs(glyphs: CharSequence) {
|
||||||
@@ -495,19 +494,12 @@ class TerrarumSansBitmap(
|
|||||||
tempLinotype = cacheObj.glyphLayout!!.linotype
|
tempLinotype = cacheObj.glyphLayout!!.linotype
|
||||||
}
|
}
|
||||||
|
|
||||||
|
batch.draw(tempLinotype,
|
||||||
if (!flipY) {
|
x.toFloat(),
|
||||||
batch.draw(tempLinotype, x.toFloat(), (y - pixmapOffsetY).toFloat())
|
(y - pixmapOffsetY).toFloat() + (if (flipY) (tempLinotype.height) else 0) * scale,
|
||||||
}
|
tempLinotype.width.toFloat() * scale,
|
||||||
else {
|
(tempLinotype.height.toFloat()) * (if (flipY) -1 else 1) * scale
|
||||||
batch.draw(tempLinotype,
|
)
|
||||||
x.toFloat(),
|
|
||||||
(y - pixmapOffsetY + (tempLinotype.height)).toFloat(),
|
|
||||||
(tempLinotype.width.toFloat()),
|
|
||||||
-(tempLinotype.height.toFloat())
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return null
|
return null
|
||||||
|
|||||||
@@ -384,19 +384,12 @@ class TerrarumTypewriterBitmap(
|
|||||||
tempLinotype = cacheObj.glyphLayout!!.linotype
|
tempLinotype = cacheObj.glyphLayout!!.linotype
|
||||||
}
|
}
|
||||||
|
|
||||||
|
batch.draw(tempLinotype,
|
||||||
if (!flipY) {
|
(x - linotypePad).toFloat(),
|
||||||
batch.draw(tempLinotype, (x - linotypePad).toFloat(), (y - pixmapOffsetY).toFloat())
|
(y - pixmapOffsetY).toFloat() + (if (flipY) (tempLinotype.height) else 0),
|
||||||
}
|
(tempLinotype.width.toFloat()),
|
||||||
else {
|
(tempLinotype.height.toFloat()) * (if (flipY) -1 else 1)
|
||||||
batch.draw(tempLinotype,
|
)
|
||||||
(x - linotypePad).toFloat(),
|
|
||||||
(y - pixmapOffsetY + (tempLinotype.height)).toFloat(),
|
|
||||||
(tempLinotype.width.toFloat()),
|
|
||||||
-(tempLinotype.height.toFloat())
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return null
|
return null
|
||||||
|
|||||||
Reference in New Issue
Block a user