Skip to content
This repository has been archived by the owner on Aug 12, 2022. It is now read-only.

Commit

Permalink
Fix TextField unknown character kerning
Browse files Browse the repository at this point in the history
Closes #64
  • Loading branch information
nbilyk committed Oct 20, 2018
1 parent d9ccde5 commit 69a8538
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
4 changes: 2 additions & 2 deletions AcornUiCore/src/com/acornui/component/text/AngelCodeParser.kt
Original file line number Diff line number Diff line change
Expand Up @@ -145,10 +145,10 @@ object AngelCodeParser : Decorator<String, BitmapFontData> {
}
val nbspChar = ''
if (this[nbspChar] == null) {
this[nbspChar] = GlyphData(char = nbspChar, advanceX = space.advanceX)
this[nbspChar] = space.copy(char = nbspChar)
}
val unknownChar = (-1).toChar()
this[unknownChar] = (this['?'] ?: space).copy(char = unknownChar, advanceX = space.advanceX)
this[unknownChar] = (this['?'] ?: space).copy(char = unknownChar)
}

private fun nextLine(parser: StringParser): Boolean {
Expand Down
1 change: 0 additions & 1 deletion AcornUiCore/src/com/acornui/component/text/BitmapFont.kt
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ import com.acornui.core.graphics.Texture
import com.acornui.core.graphics.TextureAtlasDataSerializer
import com.acornui.core.io.file.Files
import com.acornui.core.isWhitespace2
import com.acornui.core.time.delay
import com.acornui.gl.core.TextureMagFilter
import com.acornui.gl.core.TextureMinFilter
import com.acornui.logging.Log
Expand Down

0 comments on commit 69a8538

Please sign in to comment.