hrydgard/ppsspp-lang

Please help me with fix my lang

weerawat8597 opened this issue · 10 comments

Please help me with a modified form of the language. The Format It is incorrect Examples such as the correct is Confirm Overwrite = ต้องการให้เขียนทับข้อมูลเดิมหรือไม่?
but Language displayed on andriod format is not correct my language.
screenshot_2014-12-29-22-39-39

Sorry but i don´t got your point.
First of all, about what language are you talking about? Is it th_TH?
What is exactly wrong with your language? Is it the missing "right to left"-option or just some missing translation strings?

I also don't really understand the issue :-/
@weerawat8597 What do you mean by "The Format It is incorrect" ?
Which format are you talking about ?

In my Android. When switched to the language Thailand Displayed characters The character does not match the pattern in my language. But in the older version My characters display correctly.
..I'm sorry I speak English not well..

Well if i guess right it´s a font problem. Try using another font by changing Font = Roboto in your language file (its better if you try that on a windows machine, as you have access to your language files more easily).

Some Thai characters are probably missing from the font atlas, which is used outside of Windows and Qt.

-[Unknown]

@unknownbrackets Just curious, why do we need a font atlas and how does it work ?

The font atlas is a big image that has all the letters (and also some symbols and other things) on it. Like this:

ABCDEFGHI....
123567890....
!_+{}[]()...

It has characters not just from Latin, but from other languages as well. If it doesn't have a Thai character, then we can't draw that character - we can only draw the characters it has. But, including ALL Chinese, Japanese, Korean, Thai, etc. characters is A LOT of characters. Our current approach simply won't work for that, many phones don't support image/textures that large.

Anyway, when drawing text on screen, we use these characters. In other words, it's basically a font. The reasons for this are:

  1. We render everything in OpenGL. Ultimately, we need everything in an image to draw it to a screen (we're not using OS widgets anywhere.)
  2. It avoids us having to deal with font library issues on various platforms.
  3. It's easier - we had it from the beginning, and the font rendering APIs on various platforms are more work.

On Windows, we ask the operating system to render to small images (sentences) and then use those images. This was added at some point. Windows is the only platform that respects the "Font" setting. Android and others ignore it.

Qt does also draw "sentences." AFAIK they are always drawn in the system default font, e.g. Arial, and the "Font" setting is always ignored.

On Android, Linux, and maybe other platforms, we could implement freetype2 and maybe do what we do on Windows. On Linux especially, we might hit various "fontconfig" issues, but Android would definitely benefit form the effort. It just hasn't been done by anyone yet.

By the way, this is also how games often draw text. Usually they simply use a texture that has all the characters they expect to ever draw, exactly like we do, and use it exactly the way we do.

-[Unknown]

Freetype2 alone isn't enough to match what Windows does for us, we would also need Harfbuzz for text layout for some scripts (mostly the ones that we can't possibly render correctly using our atlas like Arabic and various Indian scripts).

On Android we are probably better off using the operating system's font rendering from Java, rendering to bitmaps that we would then pass to OpenGL.

Oh, that's a good point.

-[Unknown]

Thanks for your explanation @unknownbrackets, as always :)
I didn't know we treated font as images...