GithubHelp home page GithubHelp logo

Comments (10)

ufdada avatar ufdada commented on August 23, 2024

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?

from ppsspp-lang.

vnctdj avatar vnctdj commented on August 23, 2024

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 ?

from ppsspp-lang.

weerawat8597 avatar weerawat8597 commented on August 23, 2024

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..

from ppsspp-lang.

ufdada avatar ufdada commented on August 23, 2024

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).

from ppsspp-lang.

unknownbrackets avatar unknownbrackets commented on August 23, 2024

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

-[Unknown]

from ppsspp-lang.

vnctdj avatar vnctdj commented on August 23, 2024

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

from ppsspp-lang.

unknownbrackets avatar unknownbrackets commented on August 23, 2024

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]

from ppsspp-lang.

hrydgard avatar hrydgard commented on August 23, 2024

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.

from ppsspp-lang.

unknownbrackets avatar unknownbrackets commented on August 23, 2024

Oh, that's a good point.

-[Unknown]

from ppsspp-lang.

vnctdj avatar vnctdj commented on August 23, 2024

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

from ppsspp-lang.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.