typesetting: minute visual adjustments

This commit is contained in:
minjaesong
2024-06-01 16:53:31 +09:00
parent 47eae57418
commit fb60edb9a4

View File

@@ -498,9 +498,9 @@ 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, 0x2D, 0x3A, 0x3B, 0x22, 0x27) + (0x2018..0x201f)).toSortedSet() private val hangable = (listOf(0x2E, 0x2C, 0x2D, 0x3A, 0x3B, 0x22, 0x27) + (0x2018..0x201f)).toSortedSet()
private val hangableFW = listOf(0x3001, 0x3002, 0xff0c, 0xff0e).toSortedSet() private val hangableFW = listOf(0x3001, 0x3002, 0xff0c, 0xff0e).toSortedSet()
private const val hangWidth = 6 private const val hangWidth = 6 - 1 // nudge by 1 px to make the right-end look more even
private const val hyphenWidth = 6 private const val hyphenWidth = 6
private const val hangWidthFW = 16 private const val hangWidthFW = 16 - 1 // nudge by 1 px to make the right-end look more even
private fun CodePoint.toHex() = "U+${this.toString(16).padStart(4, '0').toUpperCase()}" private fun CodePoint.toHex() = "U+${this.toString(16).padStart(4, '0').toUpperCase()}"