diff --git a/.gitattributes b/.gitattributes
index bfc1cfb05..355bf1947 100644
--- a/.gitattributes
+++ b/.gitattributes
@@ -10,7 +10,8 @@
*.icns filter=lfs diff=lfs merge=lfs -text
*.jar filter=lfs diff=lfs merge=lfs -text
*.bin filter=lfs diff=lfs merge=lfs -text
+*.btxbook filter=lfs diff=lfs merge=lfs -text
+*.btxform filter=lfs diff=lfs merge=lfs -text
*.tga binary diff=hex
*.kra binary diff=hex
-*.btexbin binary diff=hex
diff --git a/assets/graphics/fonts/7x13_Tamzen7x14b.tga b/assets/graphics/fonts/7x13_Tamzen7x14b.tga
index e1582e063..bedcc80b0 100644
--- a/assets/graphics/fonts/7x13_Tamzen7x14b.tga
+++ b/assets/graphics/fonts/7x13_Tamzen7x14b.tga
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
-oid sha256:478762a5f7b5b29ff87624ebc1323dba00d0147dc3b9a41b481704f50aad5657
-size 93202
+oid sha256:39a960c1eabbf0386e4a10e5613157e444735f6cbf37b29947c0e541fb433d5a
+size 114706
diff --git a/assets/graphics/fonts/terrarum-sans-bitmap/puae000-e0ff.tga b/assets/graphics/fonts/terrarum-sans-bitmap/puae000-e0ff.tga
index 6ebc0701d..cf6721f10 100755
--- a/assets/graphics/fonts/terrarum-sans-bitmap/puae000-e0ff.tga
+++ b/assets/graphics/fonts/terrarum-sans-bitmap/puae000-e0ff.tga
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
-oid sha256:3a0f8decff30de5e236d2d2f4e40cdbc6753d73cfe1319754985320d5cb0f165
-size 331794
+oid sha256:cd38edb59478380cdacc0b7fdf9ef4c56af3c167c5023fa278d233dcb2278e3a
+size 409618
diff --git a/assets/mods/basegame/books/btex.xml b/assets/mods/basegame/books/btex.xml
index d1a06c4e8..72d5c576e 100644
--- a/assets/mods/basegame/books/btex.xml
+++ b/assets/mods/basegame/books/btex.xml
@@ -109,7 +109,7 @@
emph — is a special case of the span tag. The resulting text will be red
itemname — is a special case of the span tag used to highlight the name of the ingame item. The resulting text will be blue
targetname — is a special case of the span tag used to highlight the name of an arbitrary target or goals. The resulting text will be green
- code — is a special case of the span tag used to highlight the code element in-line. The resulting text will be teal and monospaced
+ code — is a special case of the span tag used to highlight the code element in-line. The resulting text will be maroon and monospaced
br — self-closing tag; inserts an anonymous line break
newpage — self-closing tag; inserts an anonymous page break
anonbreak — self-closing tag; inserts a paragraph break in the text. The break will be in a form of a long straight line on the centre of the text. Useful for typesetting novels
diff --git a/src/net/torvald/btex/BTeXParser.kt b/src/net/torvald/btex/BTeXParser.kt
index bbaa84c19..3cc838f3c 100644
--- a/src/net/torvald/btex/BTeXParser.kt
+++ b/src/net/torvald/btex/BTeXParser.kt
@@ -1614,7 +1614,7 @@ object BTeXParser {
val ccDefault = TerrarumSansBitmap.toColorCode(0,0,0)
val ccBucks = TerrarumSansBitmap.toColorCode(5,0,0)
- val ccCode = TerrarumSansBitmap.toColorCode(0,4,8)
+ val ccCode = TerrarumSansBitmap.toColorCode(8,0,0)
val ccHref = TerrarumSansBitmap.toColorCode(0,3,11)
val ccEmph = TerrarumSansBitmap.toColorCode(0xfc11)
val ccItemName = TerrarumSansBitmap.toColorCode(0xf03b)
diff --git a/src/net/torvald/terrarum/imagefont/TinyAlphNum.kt b/src/net/torvald/terrarum/imagefont/TinyAlphNum.kt
index 36a5724f3..f595b2382 100644
--- a/src/net/torvald/terrarum/imagefont/TinyAlphNum.kt
+++ b/src/net/torvald/terrarum/imagefont/TinyAlphNum.kt
@@ -15,7 +15,7 @@ object TinyAlphNum : BitmapFont() {
internal const val W = 7
internal const val H = 13
- internal val fontSheet = TextureRegionPack("./assets/graphics/fonts/7x13_Tamzen7x14b.tga", W, H)
+ internal val fontSheet = TextureRegionPack("./assets/graphics/fonts/7x13_Tamzen7x14b.tga", W+1, H+1)
init {
@@ -34,12 +34,10 @@ object TinyAlphNum : BitmapFont() {
}
lateinit var colMain: Color
- lateinit var colShadow: Color
override fun draw(batch: Batch, text: CharSequence, x: Float, y: Float): GlyphLayout? {
val originalColour = batch.color.cpy()
colMain = batch.color.cpy()
- colShadow = colMain.cpy().mul(1f, 1f, 1f, 0.5f)
val x = x.roundToFloat()
val y = y.roundToFloat()
@@ -52,15 +50,8 @@ object TinyAlphNum : BitmapFont() {
val colour = getColour(cchigh, cclow)
colMain = colour
- colShadow = colMain.cpy().mul(0.5f, 0.5f, 0.5f, 1f)
}
else if (c in 0.toChar()..255.toChar()) {
- batch.color = colShadow
- batch.draw(fontSheet.get(c.code % 16, c.code / 16), x + charsPrinted * W + 1, y)
- batch.draw(fontSheet.get(c.code % 16, c.code / 16), x + charsPrinted * W, y + 1)
- batch.draw(fontSheet.get(c.code % 16, c.code / 16), x + charsPrinted * W + 1, y + 1)
-
-
batch.color = colMain
batch.draw(fontSheet.get(c.code % 16, c.code / 16), x + charsPrinted * W, y)
diff --git a/src/net/torvald/terrarum/tests/BTeXTest.kt b/src/net/torvald/terrarum/tests/BTeXTest.kt
index 4382a941a..db52ec10b 100644
--- a/src/net/torvald/terrarum/tests/BTeXTest.kt
+++ b/src/net/torvald/terrarum/tests/BTeXTest.kt
@@ -24,11 +24,11 @@ import kotlin.system.measureTimeMillis
*/
class BTeXTest : ApplicationAdapter() {
-// val filePath = "btex.xml"
- val filePath = "test.xml"
-// val filePath = "literature/en/daniel_defoe_robinson_crusoe.xml"
+ val filePath = "btex.xml"
+// val filePath = "test.xml"
+// val filePath = "literature/en/daniel_defoe_robinson_crusoe.btxbook"
// val filePath = "literature/ruRU/anton_chekhov_palata_no_6.xml"
-// val filePath = "literature/koKR/yisang_nalgae.xml"
+// val filePath = "literature/koKR/yisang_nalgae.btxbook"
private lateinit var document: BTeXDocument
@@ -54,7 +54,7 @@ class BTeXTest : ApplicationAdapter() {
bg = TextureRegion(Texture(Gdx.files.internal("test_assets/real_bg_with_guides.png")))
- val isBookFinalised = filePath.endsWith(".btexbin")
+ val isBookFinalised = filePath.endsWith(".btxbook")
if (!isBookFinalised) {
measureTimeMillis {
@@ -65,7 +65,7 @@ class BTeXTest : ApplicationAdapter() {
println("Time spent on typesetting [ms]: $it")
}
- /*measureTimeMillis {
+ measureTimeMillis {
document.finalise()
documentHandler.dispose()
}.also {
@@ -73,10 +73,10 @@ class BTeXTest : ApplicationAdapter() {
}
measureTimeMillis {
- document.serialise(File("./assets/mods/basegame/books/${filePath.replace(".xml", ".btexbin")}"))
+ document.serialise(File("./assets/mods/basegame/books/${filePath.replace(".xml", ".btxbook")}"))
}.also {
println("Time spent on serialisation [ms]: $it")
- }*/
+ }
}
else {
measureTimeMillis {