Skip to content

PPGe: Use TextDrawer for save UI if available#12702

Merged
hrydgard merged 10 commits intohrydgard:masterfrom
unknownbrackets:ppge-text
Mar 11, 2020
Merged

PPGe: Use TextDrawer for save UI if available#12702
hrydgard merged 10 commits intohrydgard:masterfrom
unknownbrackets:ppge-text

Conversation

@unknownbrackets
Copy link
Copy Markdown
Collaborator

@unknownbrackets unknownbrackets commented Mar 11, 2020

On Android, Windows, and Qt, this renders text for PPGe (in game save dialogs, message dialogs, etc.) with system fonts.

The benefit of this is that it should handle various languages, combining characters, etc. better. And just like with the UI, it won't have problems with missing characters either.

This also updates Qt's TextDrawer to cache the proper way, but I haven't tested Qt.

Fixes #10621, fixes #1904, fixes #1650, fixes #2127, and fixes #10879 (I think, the spacing looks better anyway.) It doesn't fix these on SDL, but we have #6681 for that already.

Also slipped in a small fix for decimating PPGe images.

-[Unknown]

@unknownbrackets unknownbrackets added this to the v1.10.0 milestone Mar 11, 2020
@unknownbrackets unknownbrackets force-pushed the ppge-text branch 3 times, most recently from d179989 to af59473 Compare March 11, 2020 03:42
We don't want to use just adler to cache strings.  Also, port over the DPI
handling to be consistent.  Not tested.
We don't use these externally and probably won't.
This should result in better spacing for non-Latin characters, and less
missing letters.  Basically the same benefits as for the UI.
To match PPGE_LINE_USE_ELLIPSIS when using TextDrawer.
We need it to init on the correct thread.
@hrydgard
Copy link
Copy Markdown
Owner

Whoa, awesome work!

There are some faint typical filtering-off-the-edge glitches as 2x+ resolution, but that should be pretty easy to fix by padding out by a pixel:

texture_lines

@unknownbrackets
Copy link
Copy Markdown
Collaborator Author

Good catch, the RAM was clear in most of the games I tried so didn't catch that.

Did also catch an issue where \r was being doubled up (if passed already by the game.)

-[Unknown]

@hrydgard hrydgard merged commit d0e2aa3 into hrydgard:master Mar 11, 2020
@unknownbrackets unknownbrackets deleted the ppge-text branch March 11, 2020 16:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

3 participants