ecode: The custom fallback font reused the "fallback-font" resource key, replacing the built-in CJK fallback in FontService.

Fix:

  - User fallback now uses "user-fallback-font".
  - Built-in CJK and custom fallback fonts remain registered together.
  - Added and passed a regression test verifying both fallback resources remain in the chain.

Fixes in premake5.lua:

  - Removed obsolete PRECISE_F32=1; Wasm already provides precise float behavior.
  - Moved ENVIRONMENT=worker,web to final application link options.

Fixed MarkdownView not getting the correct CSS style from the base theme.
This commit is contained in:
Martín Lucas Golini
2026-07-25 01:36:00 -03:00
parent 9894231d04
commit b940407102
10 changed files with 107 additions and 13 deletions
+4 -1
View File
@@ -4537,7 +4537,10 @@ void App::init( InitParameters& params ) {
defaultResourceScope().getFontService().addFallbackFont( mFallbackFont );
if ( mConfig.ui.fallbackFont != "fonts/DroidSansFallbackFull.ttf" ) {
mUserFallbackFont = loadFont( "fallback-font", mConfig.ui.fallbackFont );
// Keep the user fallback under a distinct resource key. Publishing it as
// "fallback-font" would replace the built-in CJK font in the default scope and remove
// that font from FontService's fallback chain.
mUserFallbackFont = loadFont( "user-fallback-font", mConfig.ui.fallbackFont );
if ( mUserFallbackFont )
defaultResourceScope().getFontService().addFallbackFont( mUserFallbackFont );
}