Opened 10 years ago

Last modified 9 years ago

#2843 new enhancement

Split East Asian locale mod for memory saving

Reported by: kanetaka Owned by:
Priority: Should Have Milestone: Backlog
Component: Internationalization & Localization Keywords: font, not enough memory, CJK
Cc: kanetaka Patch:

Description

One Japanese user says that A16 aborts frequently by "not enough memory" error with East Asian locale mod, while it is stable without the mod. So we checked the memory usage of the mod.

The mod uses about 130MB main memory and the same amount of VRAM. The usage seems proportional to the number of characters(or glyphs?). Split by locale saves memory and might help CJK users who are bothered by "not enough memory" error.

Japanese community is ready to build Japanese font files for ease of feedback process, for example we want to select more readable font or something.

Change History (17)

comment:1 by historic_bruno, 10 years ago

This is just a side effect of how those fonts are handled, they are truly massive textures. The bigger ones are 4096x4096 and take up 65MB of VRAM each (I checked this with gDebugger after getting GL "out of memory" errors). Obviously it's not practical to have all those glyphs rendered to a single texture. A proper solution is going to require changes to the font loader and text renderer, as far as I know.

comment:2 by leper, 10 years ago

See http://www.wildfiregames.com/forum/index.php?showtopic=19172&p=299500. It might be nice to exclude unused/unneeded characters for those fonts specifically, but not having all of them in one mod already helps a lot.

Maybe we'll have to add the exclusion of chars that was removed in r14853 back. Or better to specify that a bit nicer so we can exclude some chars that aren't needed but supported in some fonts (make it font specific what to include/exclude).

comment:3 by llen_llen, 10 years ago

Since we have separate supports for respective East Asian locales now (thanks to leper), I propose replacing current Hanazono font pack with the one in the file below from next release for the Japanese MOD. Improvements have been made in reduced glyph set, more esthetic typefaces, and some tuning for readability. https://www.dropbox.com/s/fb7o7gnvhgbregy/japan-locale-0.0.17.zip?dl=0 Again thanks to leper for his help in mod-packaging.

(P.S. This file isn't the same thing what I've uploaded to the thread above, but a slightly updated version of it.)

in reply to:  3 ; comment:4 by leper, 9 years ago

kanetaka, llen_llen: Could you provide font packs again for A18? The final translations will be available on 2015-02-14 24:00 GMT (there should be a related svn commit pulling translations), so if you could test and provide a mod we could provide that next to the release.

in reply to:  4 comment:5 by kanetaka, 9 years ago

Owner: set to kanetaka
Status: newassigned

Replying to leper:

kanetaka, llen_llen: Could you provide font packs again for A18? The final translations will be available on 2015-02-14 24:00 GMT (there should be a related svn commit pulling translations), so if you could test and provide a mod we could provide that next to the release.

Yes, we will do. Although llen_llen is best person for this task, he is likely to be busy. But even if he couldn't I will be able to do.

comment:6 by leper, 9 years ago

Considering that we haven't pulled the final translations yet (and there are still some tickets left you should probably wait a bit with creating it; I'll comment here once we have RCs).

comment:7 by leper, 9 years ago

Milestone: Alpha 18Backlog
Owner: kanetaka removed
Status: assignednew

Translations are now frozen. Packages (RCs) should appear in the next few days.

comment:8 by kanetaka, 9 years ago

I have made the mod for Alpha 18. Chinese mod will be later. jalang-0.0.18.zip

By the way, are we have to do language mods for every Alpha release? I mean, since font files are stable once created and size of translation files are not so huge, is it possible to move Japanese/Chinese translation files to public package?

comment:9 by kanetaka, 9 years ago

Chinese mod is now available. zhlang-0.0.18.zip

comment:10 by kanetaka, 9 years ago

Summary: Split East Asian locale mod for memory saving[need review]Split East Asian locale mod for memory saving

comment:11 by leper, 9 years ago

jalang looks good. zhlang also includes zh even though that is below 90% (not much, but it still is); also what font did you use for that one? I asked some of the translators for suggestions there and they did agree with your suggestion for Source Han Sans TW and suggested the Normal font style.

in reply to:  11 comment:12 by kanetaka, 9 years ago

Replying to leper:

jalang looks good. zhlang also includes zh even though that is below 90% (not much, but it still is); also what font did you use for that one? I asked some of the translators for suggestions there and they did agree with your suggestion for Source Han Sans TW and suggested the Normal font style.

I will remove zh if you mind.

zhlang uses MicroHei , as you stated at forum below: http://wildfiregames.com/forum/index.php?showtopic=19172#entry299500

I applaud their suggestions and am very welcome to make it by themselves.

comment:13 by leper, 9 years ago

It also included zh_CN, which is a lot below 90%. I'v e built a mod using SourceHanSansTW and is only a bit smaller than using MicroHei (94MB), but since it was the suggestion (see http://wildfiregames.com/forum/index.php?showtopic=19667) I guess we'll go with that one.

comment:14 by kanetaka, 9 years ago

I removed the translations and renamed the mod: zh_twlang-MicroHei-0.0.18

comment:15 by leper, 9 years ago

My zhlang and your jalang are already uploaded to http://releases.wildfiregames.com/rc/. Thanks for providing the mods :-).

comment:16 by leper, 9 years ago

Summary: [need review]Split East Asian locale mod for memory savingSplit East Asian locale mod for memory saving

comment:17 by kanetaka, 9 years ago

I noticed the mods aren't available on play0ad.com's download page. Could anyone upload them?

Note: See TracTickets for help on using tickets.