diff --git a/app/src/main/java/at/dasher/android/DasherEngine.kt b/app/src/main/java/at/dasher/android/DasherEngine.kt index cc083ff..96bde8c 100644 --- a/app/src/main/java/at/dasher/android/DasherEngine.kt +++ b/app/src/main/java/at/dasher/android/DasherEngine.kt @@ -662,7 +662,16 @@ class DasherEngine( Log.e(TAG, "nativeCreate returned 0 — dataDir=$dataDir") return null } - return DasherEngine(handle, userDir, frameConsumer) + val eng = DasherEngine(handle, userDir, frameConsumer) + // Realize the engine immediately with a provisional screen size. + // Realize() builds the alphabet name index (474 entries) and loads + // the selected alphabet — without this, queries made before the + // canvas lays out (getAlphabetNames, locale-follow, etc.) see an + // unrealized engine with an empty index: the alphabet picker + // showed one entry and locale-follow had nothing to match against. + // The canvas corrects the size when it actually lays out. + NativeBridge.nativeSetScreenSize(handle, 800, 600) + return eng } } } diff --git a/third_party/DasherCore b/third_party/DasherCore index 901e4d8..ba7a634 160000 --- a/third_party/DasherCore +++ b/third_party/DasherCore @@ -1 +1 @@ -Subproject commit 901e4d815171665f04c4fd6c60192ce299f0f54f +Subproject commit ba7a634a8d054ba933238faaa0146554b1fd7e0b