mirror of
https://github.com/curioustorvald/Terrarum-sans-bitmap.git
synced 2026-06-11 00:14:05 +09:00
new tagging system (see #5) WIP
- diacritics stacking does not work - centre align with align-to-this-x-pos is untested
This commit is contained in:
28
src/net/torvald/terrarumsansbitmap/GlyphProps.kt
Normal file
28
src/net/torvald/terrarumsansbitmap/GlyphProps.kt
Normal file
@@ -0,0 +1,28 @@
|
||||
package net.torvald.terrarumsansbitmap
|
||||
|
||||
/**
|
||||
* Created by minjaesong on 2018-08-07.
|
||||
*/
|
||||
data class GlyphProps(
|
||||
val width: Int,
|
||||
val writeOnTop: Boolean,
|
||||
val alignWhere: Int,
|
||||
val alignXPos: Int,
|
||||
val rtl: Boolean = false,
|
||||
val diacriticsStackDown: Boolean = false
|
||||
) {
|
||||
companion object {
|
||||
const val LEFT = 0
|
||||
const val RIGHT = 1
|
||||
const val CENTRE = 2
|
||||
}
|
||||
|
||||
constructor(width: Int, tags: Int) : this(
|
||||
width,
|
||||
tags.ushr(7).and(1) == 1,
|
||||
tags.ushr(5).and(3),
|
||||
tags.ushr(1).and(15),
|
||||
tags.and(1) == 1,
|
||||
tags.ushr(8).and(1) == 1
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user