Page MenuHomeWildfire Games

Garbage in menu Language
AbandonedPublic

Authored by nwtour on Feb 19 2021, 11:27 PM.

Details

Reviewers
None
Summary


In menu Language many languages whose names cannot even be seen.
Patch fixes this - people can now see their language and select it

fontbuilder.py test if exist file endonym.txt and if exists import symbols in generate font:
mono-10...

4708 (89 extra symbols)

mono-stroke-10...

4708 (89 extra symbols)

sans-9...

5077 (73 extra symbols)

sans-10...

5077 (73 extra symbols)

sans-12...

5077 (73 extra symbols)

sans-13...

5077 (73 extra symbols)

~ +1-2% percent of data

endonym_generator.pl - Script update endomym.txt (endonys = self-names of states) from Unicode Common Locale Data Repository : https://github.com/unicode-org/cldr

You also need to add font binaries/data/tools/fontbuilder/fonts/unifont-13.0.06.ttf in repository:
https://www.unifoundry.com/unifont/
the fonts are dual-licensed under the SIL Open Font License (OFL) version 1.1 and the GNU GPL 2+ with the GNU font embedding exception
It contains the maximum number of glyphs

After path unknow symbols decreases to a minimum

Test Plan

.

Diff Detail

Lint
Lint Skipped
Unit
Unit Tests Skipped

Event Timeline

nwtour requested review of this revision.Feb 19 2021, 11:27 PM
nwtour created this revision.
nwtour updated this revision to Diff 16024.Feb 20 2021, 1:37 AM

Remove endonym_generator.pl

Inserted lines manually for full l10n of endonym

$ python3 fontbuilder.py
mono-10...
4717 (98 extra symbols)
mono-stroke-10...
4717 (98 extra symbols)
sans-9...
5097 (93 extra symbols)
sans-10...
5097 (93 extra symbols)
sans-12...
5097 (93 extra symbols)
sans-13...
5097 (93 extra symbols)
sans-14...
5097 (93 extra symbols)
sans-16...
5097 (93 extra symbols)
sans-bold-12...
3584 (103 extra symbols)
sans-bold-13...
3584 (103 extra symbols)
sans-bold-14...
3584 (103 extra symbols)
sans-bold-16...
3584 (103 extra symbols)
sans-bold-18...
3584 (103 extra symbols)
sans-bold-20...
3584 (103 extra symbols)
sans-bold-22...
3584 (103 extra symbols)
sans-bold-24...
3584 (103 extra symbols)
sans-stroke-12...
5097 (93 extra symbols)
sans-bold-stroke-12...
3584 (103 extra symbols)
sans-stroke-13...
5097 (93 extra symbols)
sans-bold-stroke-13...
3584 (103 extra symbols)
sans-stroke-14...
5097 (93 extra symbols)
sans-bold-stroke-14...
3584 (103 extra symbols)
sans-stroke-16...
5097 (93 extra symbols)

Stan added a subscriber: Stan.Feb 20 2021, 2:01 AM

The reason we do not add those characters is that it makes the fonts too big. Instead CJK are provided as mods of around 100MB each.

nwtour added a comment.EditedFeb 20 2021, 2:52 AM
In D3582#156547, @Stan wrote:

The reason we do not add those characters is that it makes the fonts too big. Instead CJK are provided as mods of around 100MB each.

Patch add symbols only for names of languages

"5097 (93 extra symbols)" - 5004 symbols (glyphs) before and 5097 after patch. is it big overhead?

Seeing your language on the list is important for people who don't know English (like me, for example)
I do not understand how Arabs/Chinese people can find their language except by brute force

Secondly, the symbols "?" are just ugly.

Stan added a comment.Feb 20 2021, 3:01 AM

Those languages are not present in the release. Check A23b :)

Nescio added a subscriber: Nescio.Feb 20 2021, 11:27 AM

Yes, the current situation is rather ugly. The proper solution would be rendering text directly (e.g. with pango), which would remove the need for having bitmaps and also support decent scaling, different writing directions, and language-specific options.

nwtour updated this revision to Diff 16071.EditedFeb 24 2021, 10:48 PM

I still think that it is not working correct now
IMHO Game cannot add endonyms if you cannot provide the glyphs in which they are printed

Changed the logic - now languages are written in the current locale
If the user could find the "Settings" and "Language" menus in the current locale, he will find the spelling of his language in the current locale

For example, how it looks after the patch in en_US and ru_RU (work correctly)

I'm not sure about replacing, but I think it'd be useful to display two language names: original name and name translated on the current language.

nwtour abandoned this revision.Dec 3 2021, 12:45 PM

Didn't find a nice solution