V1.40.2 Changing locale causes missing characters warning

Hi guys,

There’s something broken in the last build (v.1.40.2) regarding localization functionality.

P{re-conditions to reproduce:

  1. Use different fonts for different languages
  2. Change locale/language
  3. If the next font doesn’t include the characters from the previous font (what should be fine) it displays warnings in console “Character is missing…”

For example, there are two fonts in the project: Russian (contains letters “Ф”, “Ы” and “Д”) and English (contains 26 Latin letters).

Switching from Russian to English font causes following errors:
playcanvas-stable.dbg.js:51179 Character 'Ф' is missing from the font English
playcanvas-stable.dbg.js:51179 Character 'Ы' is missing from the font English
playcanvas-stable.dbg.js:51179 Character 'Д' is missing from the font English

But these three should not be present in the English font as they are Cyrillic letters.

Here’s an example project (warnings present): PlayCanvas | HTML5 Game Engine
Here’s the same example project running on v1.39.4 (no warnings): PlayCanvas | HTML5 Game Engine

The warning/error is new to help with localisation bugs. Looks like there is an issue when switch between languages.

I’ve created a bug report here: https://github.com/playcanvas/engine/issues/3043

Side note: Those warnings are not shown on published builds

2 Likes

Thanks, @yaustar