Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

overlays/util: Add support for some extended glyph sets #5631

Merged
merged 2 commits into from Feb 3, 2019

Conversation

Projects
None yet
6 participants
@kd-11
Copy link
Contributor

commented Feb 3, 2019

  • Lower fullwidth glyphs to halfwidth counterparts.
  • Lower CJK punctuation glyphs.
  • Lower general punctuation glyphs.
  • Minor improvement to save dialog entry layout.

Fixes #5629

overlays/util: Add support for glyph set lowering when mapping utf8 t…
…o ascii8

- Lower fullwidth glyphs to halfwidth counterparts
- Lower CJK punctuation glyphs
- Lower general punctuation glyphs

@kd-11 kd-11 force-pushed the kd-11:osk branch from 3716a7c to be8f3c9 Feb 3, 2019

overlays/save_dialog: Layout improvements
- Make detail a separate text entity as it often contains a lot of noise
- Properly pad the entry if needed to avoid text sitting too close to the edge
@danilaml

This comment has been minimized.

Copy link
Contributor

commented Feb 3, 2019

Why not just support unicode properly?

@mavethee

This comment has been minimized.

Copy link

commented Feb 3, 2019

image
image
Half of the special letters now are displayed properly :)

@raveskirza

This comment has been minimized.

Copy link

commented Feb 3, 2019

Why not just support unicode properly?

@danilaml #5611 (comment)

@danilaml

This comment has been minimized.

Copy link
Contributor

commented Feb 3, 2019

@raveskirza Ok. Feels like changing render_text_ex to operate on codepoints would be easier than trying to hack around utf8/16/32 to ascii conversions and replacements though.

@MSuih

This comment has been minimized.

Copy link
Contributor

commented Feb 3, 2019

Save text no longer clips through the border between items

Screenshots

image
image

@Megamouse

This comment has been minimized.

Copy link
Contributor

commented Feb 3, 2019

@danilaml

@raveskirza Ok. Feels like changing render_text_ex to operate on codepoints would be easier than trying to hack around utf8/16/32 to ascii conversions and replacements though.

Obviously the goal here is to support at least utf16.
The reason for the workaround has nothing to do with ascii conversions though, but rather with rendering and VRAM issues that have to be properly handled first.

@danilaml

This comment has been minimized.

Copy link
Contributor

commented Feb 3, 2019

@Megamouse well render_text_ex just iterates over plain chars which obviously breaks when dealing with unicode (past ascii):

if (char c = text[i++]; c && (i <= char_limit))

Wouldn't need s_ascii_lowering_map / lowering, if render_text_ex iterated over char32_t codepoints and get_char did proper lookup for unicode charactes (since it should be supported by stb), though it wouldn't handle emojis and would probably require different font handling. Didn't know about VRAM issues.

@kd-11

This comment has been minimized.

Copy link
Contributor Author

commented Feb 3, 2019

Handling 100k codepoints is a lot more complicated than just resolving glyphs!

@kd-11

This comment has been minimized.

Copy link
Contributor Author

commented Feb 3, 2019

Makes more sense to eventually move to vector rendering for glyphs, but this introduces other issues in places. It will be done eventually just requires some more time and effort.

@kd-11 kd-11 merged commit 4c59395 into RPCS3:master Feb 3, 2019

2 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.