Opened 11 years ago

Last modified 9 years ago

#2014 new enhancement

Support for non-latin languages

Reported by: Suhail Alkowaileet Owned by:
Priority: Should Have Milestone: Backlog
Component: Internationalization & Localization Keywords:
Cc: Patch:

Description (last modified by Suhail Alkowaileet)

I think is supporting other languages is important.

I've tried to do that and what get when I'm writing in Arabic for example 'سلام' I get '????'. This is because the font doesn't include these charters. I've changed the font builder to add Arabic and it worked for some fonts "sans probably" . so my suggestion while the sans is the default font, we make it for all the sizes 'sans-9, sans-10, sans-12...etc' then when the unifont didn't find the coming character. it tries in the sans version, if it was not found also then we print ?.

Sorry for my English

Change History (13)

comment:1 by Suhail Alkowaileet, 11 years ago

Component: Core engineUI & Simulation

comment:2 by Suhail Alkowaileet, 11 years ago

Description: modified (diff)

comment:3 by Suhail Alkowaileet, 11 years ago

Description: modified (diff)

comment:4 by historic_bruno, 11 years ago

Component: UI & SimulationCore engine

Well Arabic certainly isn't going to work without significant changes to the font system, for now we will most likely be constraining ourselves to Latin script. We have ongoing work on a translation system, see #67 and the discussion here.

Don't get me wrong, I think it would be nice to support Arabic, Hebrew, etc., but they will be only a small percentage of our users, it's hard to justify all of the extra work.

comment:5 by Adrián Chaves, 11 years ago

I think that our fonts should have full Unicode support. Even if Arabic and other right-to-left languages like Hebrew will require additional work to work properly, this is a must-have prerequisite that should not be difficult to provide, other than agreeing on a font that in addition to provide complete Unicode support also satisfies the Art team.

Last edited 11 years ago by Adrián Chaves (previous) (diff)

in reply to:  5 comment:6 by historic_bruno, 11 years ago

Replying to Gallaecio:

I think that our fonts should have full Unicode support. Even if Arabic and other right-to-left languages like Hebrew will require additional work to work properly, this is a must-have prerequisite that should not be difficult to provide, other than agreeing on a font that in addition to provide complete Unicode support also satisfies the Art team.

It's more difficult than choosing a font, those languages require special layout and rendering, basically our font engine (nor RedFox's redesign) cannot render text in those languages. We would have to replace the font engine with something like Pango, Cairo and FreeType. See http://en.wikipedia.org/wiki/Complex_text_layout

comment:7 by Adrián Chaves, 11 years ago

I know it is more difficult that choosing a font. But our current font doesn’t even support all the characters of languages that do work with our current implementation (e.g. Russian, Ancient Greek, etc.). I think we should at least have a font with complete Unicode support until we implement a proper text-rendering feature.

Last edited 11 years ago by Adrián Chaves (previous) (diff)

in reply to:  7 comment:8 by Suhail Alkowaileet, 11 years ago

Replying to Gallaecio:

I know it is more difficult that choosing a font. But our current font doesn’t even support all the characters of languages that do work with our current implementation (e.g. Russian, Ancient Greek, etc.). I think we should at least have a font with complete Unicode support until we implement a proper text-rendering feature.

That was my point. We could choose a font that supports most of the languages. Then we could tell the text render to switch the the font if the current font doesn't support all the given characters

comment:9 by historic_bruno, 11 years ago

That's something you'll want to discuss with the art guys. If someone finds a good replacement font that is completely compatible with our licensing, has a good style, and looks good when rendered in-game, we could certainly switch.

Last edited 11 years ago by historic_bruno (previous) (diff)

comment:10 by historic_bruno, 10 years ago

An update on this: our new fonts will have much better Unicode support for A16, but the Asian font bitmaps won't be bundled with the game due to their size. Actually, I think we need a better way to handle them, rather than having massive (4096x4096) textures.

comment:11 by Adrián Chaves, 10 years ago

It is my understanding that the size is not the only reason (otherwise we would include them), but that Japanese fonts require something (related to graphics technology, shadows or something else) that not all computer have, and that would make the game crash on those computers that do not support it.

comment:12 by Adrián Chaves, 10 years ago

Component: Core engineI18n & L10n

comment:13 by sanderd17, 10 years ago

The Asian fonts mainly require big textures now (which isn't supported by all graphics pipelines).

Also note, wrt RTL languages, we now have (parts of) the ICU library in our source tree, and the ICU library also provides a BiDi algorithm, to transform text from their logical flow into their visual flow. Making it possible for our font renderer to just print the strings in a single order.

Our font system itself is limited to the first plane of unicode signs, which is enough for most current languages, but excludes a big part of historical languages (like hieroglyphs), which we could also use in the game.

Note: See TracTickets for help on using tickets.