mirror of
https://gitlab.bixilon.de/bixilon/minosoft.git
synced 2025-09-17 19:35:00 -04:00
build font cache on init (not post init)
This should prevent hud from already using it
This commit is contained in:
parent
81ff9c9f7a
commit
53cab94924
@ -26,6 +26,10 @@ class Font(
|
|||||||
) : PostInitFontType {
|
) : PostInitFontType {
|
||||||
private val cache: Array<CodePointRenderer?> = arrayOfNulls(CACHE_SIZE)
|
private val cache: Array<CodePointRenderer?> = arrayOfNulls(CACHE_SIZE)
|
||||||
|
|
||||||
|
init {
|
||||||
|
buildCache()
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
private fun postInitFonts(latch: AbstractLatch) {
|
private fun postInitFonts(latch: AbstractLatch) {
|
||||||
val fontLatch = ParentLatch(1, latch)
|
val fontLatch = ParentLatch(1, latch)
|
||||||
@ -49,7 +53,6 @@ class Font(
|
|||||||
|
|
||||||
override fun postInit(latch: AbstractLatch) {
|
override fun postInit(latch: AbstractLatch) {
|
||||||
postInitFonts(latch)
|
postInitFonts(latch)
|
||||||
buildCache()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fun forceGet(codePoint: Int): CodePointRenderer? {
|
fun forceGet(codePoint: Int): CodePointRenderer? {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user