will use config string this time

This commit is contained in:
minjaesong
2021-11-04 22:44:40 +09:00
parent 45e5c39739
commit 554d9a5d0b

View File

@@ -1,12 +1,26 @@
package net.torvald.terrarumtypewriterbitmap.gdx package net.torvald.terrarumtypewriterbitmap.gdx
import com.badlogic.gdx.graphics.g2d.BitmapFont import com.badlogic.gdx.graphics.g2d.BitmapFont
import java.io.File
import java.io.Reader
/** /**
* Config File Syntax:
*
* ```
* identifier,image file name,relative codepoint
* # working example:
* intl_qwerty_typewriter,typewriter_intl_qwerty.tga,0
* ko_kr_3set-390_typewriter,typewriter_ko_3set-390.tga,16
* ```
*
* // the Relative Codepoint of 16 should point to U+F3000
*
* Created by minjaesong on 2021-11-04. * Created by minjaesong on 2021-11-04.
*/ */
class TerrarumTypewriterBitmap( class TerrarumTypewriterBitmap(
fontDir: String, fontDir: String,
configFile: Reader,
val flipY: Boolean = false, val flipY: Boolean = false,
var errorOnUnknownChar: Boolean = false, var errorOnUnknownChar: Boolean = false,
val textCacheSize: Int = 256, val textCacheSize: Int = 256,