mirror of
https://github.com/curioustorvald/Terrarum-sans-bitmap.git
synced 2026-03-07 11:51:50 +09:00
fix: hyphenated slug would not contract
This commit is contained in:
@@ -332,7 +332,7 @@ class FlippingSpriteBatch(size: Int = 1000) : SpriteBatch(size) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
lateinit var appConfig: Lwjgl3ApplicationConfiguration
|
lateinit var appConfig: Lwjgl3ApplicationConfiguration
|
||||||
const val TEXW = 800
|
const val TEXW = 480 + 48
|
||||||
const val TEXH = 24 * 170
|
const val TEXH = 24 * 170
|
||||||
|
|
||||||
const val WIDTH = TEXW
|
const val WIDTH = TEXW
|
||||||
|
|||||||
@@ -199,7 +199,7 @@ class MovableType(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
moveSlugsToFitTheWidth(operation, slug, selectedWidthDelta)
|
moveSlugsToFitTheWidth(operation, slug, selectedWidthDelta.absoluteValue)
|
||||||
|
|
||||||
// put the trailing word back into the upcoming words
|
// put the trailing word back into the upcoming words
|
||||||
if (selectedStrat == "Widen") {
|
if (selectedStrat == "Widen") {
|
||||||
@@ -223,7 +223,7 @@ class MovableType(
|
|||||||
// insert hyphHead into the slug
|
// insert hyphHead into the slug
|
||||||
addToSlug(hyphHead)
|
addToSlug(hyphHead)
|
||||||
|
|
||||||
moveSlugsToFitTheWidth(operation, slug, selectedWidthDelta)
|
moveSlugsToFitTheWidth(operation, slug, selectedWidthDelta.absoluteValue)
|
||||||
|
|
||||||
// put the tail into the upcoming words
|
// put the tail into the upcoming words
|
||||||
addHyphenatedTail(hyphTail)
|
addHyphenatedTail(hyphTail)
|
||||||
@@ -312,7 +312,6 @@ class MovableType(
|
|||||||
private val commas = listOf(0x2C, 0x3B, 0x3001, 0xff0c).toSortedSet()
|
private val commas = listOf(0x2C, 0x3B, 0x3001, 0xff0c).toSortedSet()
|
||||||
private val hangable = listOf(0x2E, 0x2C, 0x3A, 0x3B).toSortedSet()
|
private val hangable = listOf(0x2E, 0x2C, 0x3A, 0x3B).toSortedSet()
|
||||||
private val hangableFW = listOf(0x3001, 0x3002, 0xff0c, 0xff0e).toSortedSet()
|
private val hangableFW = listOf(0x3001, 0x3002, 0xff0c, 0xff0e).toSortedSet()
|
||||||
private const val spaceWidth = 5
|
|
||||||
private const val hangWidth = 6
|
private const val hangWidth = 6
|
||||||
private const val hangWidthFW = 16
|
private const val hangWidthFW = 16
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user