thpatch / thpatch/thcrap

thcrap: Support right-to-left scripts

Open
#27 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
C++
Stars
766
Forks
51
Avg merge
16d 14h
Merged PRs (30d)
1

Description

Right-to-left text

Description

It was only a matter of time until people asked for this.

Prerequisites
  • #17 (text layout engine)
  • #16 (Win32 dialog patching)
Implementation
  • If possible, this should not require a special "rtl": true flag in the run configuration. Directionality should be automatically determined by the characters in a string. Otherwise, patch stacks that have a RTL language on top of an LTR one couldn't easily switch between both.
  • Neither should it require all texts to simply be wrapped in a <r$text$> command. Once tabs come into play, we need to mirror those too.
  • Add a breakpoint to read the current width of the rendering bitmap.
  • According to this page, Win32 dialogs can be easily mirrored. Find the best way to do this.
  • ... and then there's texture positioning. We probably could start by searching for a general "set X position" point and mirroring that value. Anything more will be part of a separate issue, though.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading prerequisites #17 on the text layout engine and #16 on Win32 dialog patching. Investigate automatic direction detection, bitmap width, dialog mirroring, tab placement, and texture positioning; done means RTL and LTR text can switch without a run flag or wrapping every string in a special command.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
computer-graphics, desktop, internationalization
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.