Repository navigation
UI text: Arabic and Hebrew with RTL paragraphs - #1007
Merged
Merged
Conversation
plx_ass_text_* shapes one directional run with the bundled HarfBuzz, rasterizes it with the bundled FreeType, and runs FriBidi over a line. gfx::rtl binds it; native tests run against the host bundle. Signed-off-by: Goo6i <[email protected]>
…heck-ass runs the UI text tests Signed-off-by: Goo6i <[email protected]>
…mpositor Lines with right-to-left text are cut into runs by FriBidi's visual order; Arabic/Hebrew runs are shaped by the facade, the rest stay on SDL2_ttf. The facade's box is the ink; shaped ink above the line box rises over it. fontcov gates the four faces; RTL text is drawn untracked. Signed-off-by: Goo6i <[email protected]>
An Arabic or Hebrew paragraph (its first strong character, UAX plxnative#9 P2/P3) is drawn right-aligned in a left-aligned TextView; a wrapped line that opens with a Latin word keeps the paragraph's direction with an RLM. A truncated block dissolves at its left end into a MORE on the left, and the About card's MORE follows. Marquees glide mirrored: a right-to-left run rests on its first words at the window's right edge and moves right; the paused player title reveals its end to the left. Signed-off-by: Goo6i <[email protected]>
… libass cache keys Signed-off-by: Goo6i <[email protected]>
…tion Each line takes its direction from its first strong character, like the synopsis under it: an Arabic or Hebrew title or genres line stands flush right in the card. The hero title stands in for the logo and keeps the layout's side. Signed-off-by: Goo6i <[email protected]>
It is the renderer's (ci/build-libass.py compiles it with FreeType's headers); the application's SRCS compiled it a second time, without them, and the ARM cross-build stopped at ft2build.h. ci/test_renderer_sources.py holds the SRCS filter-out to the recipe's list. Signed-off-by: Goo6i <[email protected]>
The .ipk, the package gate, the macOS and WSL simulator staging, the GPL source bundle and the stills' inputs each list fonts by name and lacked the four new faces: the package built and passed its gate without them. ci/test_shipped_faces.py holds every list to the faces text.rs opens. THIRD-PARTY-NOTICES attributes Noto Kufi Arabic and Noto Sans Hebrew and names src/ass_text.c among the facade sources; text.rs's header and docs/localization.md describe right-to-left text as it now is. Signed-off-by: Goo6i <[email protected]>
Signed-off-by: Goo6i <[email protected]>
An overflowing Arabic or Hebrew tile name rests flush right on its first words, but block_text gave it the Latin bands: a static dissolve at the right edge (over those first words) and a growing one at the left. Mirror them for a right-to-left run: crisp head at rest, a right band that grows with the travel (head_band_right), and the static dissolve at the left where the run is cut. Signed-off-by: Goo6i <[email protected]>
Facade ABI 4 and its two callers (ass-subtitles.md, agent-reference.md, module-layers.md), the UI text pipeline and its faces, the dynlib caller count, the mirrored MORE and fades in text_view and its callers, bold on the shaped links, the gfx member list, the which-tier and ui-sim routing for shaped runs, and the localization note's own sentence. Signed-off-by: Goo6i <[email protected]>
The PR's `a_paused_right_to_left_title_reveals_its_end_to_the_left` named `ControlSlot::Discs` as a unit variant; main made it `Discs(Controls)`, so the combined tree's appkit lib tests did not compile. Name `Controls::NONE`, as the neighbouring title tests do. Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…or Hebrew keeps its direction Each drawn line is its own FriBidi paragraph, so a line of an English summary that wrapped to "باب الحارة, follows the lives of" read right to left, its Latin moved left of the Arabic. Mirror the right-to-left block's RLM: prefix U+200E when the block is left to right and the line's first strong letter is not. LRM is a bidi control, so it draws and measures nothing. Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…tart", and the About card uses it `card_line` decided in the screen that an RTL line stands flush right while `TextView::drawn_align` held the same rule privately. Add `HAlign::Start`, settled by `HAlign::resolve` through `is_rtl_paragraph` (Left for Latin, Right for Arabic or Hebrew) and placed by `HAlign::anchor`. `Label` resolves it against its text, `TextView::drawn_align` and `HeroLogo` use the same resolver, and the About card asks it instead of re-deriving the rule. Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…asterize `plx_ass_text_measure` rasterizes every glyph (the box is the ink's extent) and only skips compositing the coverage buffer; the doc claimed it measured without rasterizing. Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…ot rasterization-free The SDL_ttf runs are pure metrics, but a shaped run is measured by `Face::measure`, which runs the same layout pass as the draw and rasterizes each glyph. Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Collaborator
|
Merged, thank you! On top: main merged in (a HUD test needed |
GLinnik21
added a commit
that referenced
this pull request
Oct 29, 2026
Merge: main's #1007 (Arabic and Hebrew titles) edited appkit/src/player_hud.rs, which this PR deletes. The file stays deleted; its change is ported into player_hud/classic.rs (the paused title's right-to-left reveal) and its test, a_paused_right_to_left_title_reveals_its_end_to_the_left, into player_hud/tests.rs. Review fixes: - the clock prewarm reads the page's own scrub, not the app's snapshot from the previous frame, so a fast scrub warms the clocks the draw will show (test red first) - a test pins that pin_headless_hud's ring write is paired with an engine re-seat (red with the re-seat removed) - the HudModel sampling test now sets loading and the three caption picks to values of their own - classic::scrub_frac_x (dead, duplicated HudGeometry::scrub_frac) is removed; scrub_hit_rect and ctrl_row_hit_rect are module-private - comments that named the deleted key_updown follow the code Co-Authored-By: Claude Opus 5.5 <[email protected]>
GLinnik21
added a commit
that referenced
this pull request
Oct 29, 2026
…ne groups (#1140) The player HUD is split into state, model, motion and geometry, and its travel moves onto FocusEngine groups. This is the contract the plugin renderer will draw through: `HudModel` in, `HudGeometry` out (docs/hud-plugins.md, PR2). `appkit/src/player_hud.rs` becomes `player_hud/`: - `state.rs`: the app-owned logic (`slot_for`, `busy`, the scrub ladder). - `model.rs`: `HudModel`, a per-frame read-only snapshot of every value the draw used to read from process globals. It holds `Copy` fields and borrowed strings, so building it allocates nothing. - `motion.rs`: `HudMotion`, the springs, `CtlPop` and the reveals. - `geometry.rs`: `HudGeometry`, what the layout reports back, and the focus `GroupId`s. - `classic.rs`: the classic constants and arrangement. Each frame, `run.rs` fills the model and pushes it into the player screen. The player's `Focusable`, the pointer stops, `overscan_rects`, the Up Next and Skip stand-ins and the two player menus' anchors read `HudGeometry` instead of classic constants. #1007's right-to-left title reveal is carried into `classic.rs`. `nav.focus` is a FocusEngine `GroupId`. The hand-walked Up/Down ring is gone: Up from the top group hides the HUD as the screen's answer to `Step::Edge`. After each of the app's own writes to `nav` (a fresh segment offer, the headless pin, the auto-hide park, `FocusTabs`), the app re-seats the engine. OK still goes through the hand-routed row press, and moving it onto the engine's press is PR3. One deliberate behaviour change. A stand-in leaving the row (a pressed Skip pill, a seek out of the marker, the marker's end) sends the ring back to the scrubber, for the engine as well as `nav`, so the next OK toggles play. That is `standin_left_the_ring`'s documented intent. On `main`, a movie's Skip press left the engine on the stale item, and its reconcile moved focus to Subtitles, so OK opened the Subtitles menu. Tests pin the movie and episode departures through the real dispatcher. Before the split, `screens/src/player/hud_pins_tests.rs` pinned classic's keys from every HUD focus, the hit census and the reported rects, and the file is unchanged since. Simulator before/after pairs against `main` show the player, Up Next and failure captures byte-identical, Up off the top hiding the HUD while the film plays, and the Skip pill pressing on OK. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #760
Summary
Arabic and Hebrew in titles, summaries, cast names and menus drew as boxes. They now draw shaped and in reading order, through the HarfBuzz, FriBidi and FreeType that libass-plx already bundles, as the issue suggests. No crate is added and the screen layout stays left-to-right.
src/ass_text.cadds fiveplx_ass_text_*calls: bidi levels and order, shaping, raster.NATIVE_ABIis 4 inplayer/ass.rsand in the newgfx/src/rtl.rs. Without the library, Arabic and Hebrew draw as boxes as they do today.tools/fetch-noto-rtl.py.ci/test_shipped_faces.pyholds those lists to the filestext.rsopens (the package gate passed without them).Latin, CJK and emoji text draw as before. Subtitles and Arabic/Hebrew UI text now share
libass-plx.so.0, so a library at the wrong ABI turns both off.Tests
49 new tests. The UI, marquee, About card, HUD and packaging tests failed before their code. I checked the facade and bidi layout tests by mutation instead, and they caught every mutant.
the_written_analyses_are_what_fribidi_returnschecks each hand-worked bidi fixture against FriBidi.Verification
On a8c9c93. CI and the benchmark ran on 358fe08, the same tree before I added the sign-off
plx_uiok. 1395 passed,plx_screensok. 1690 passed,plx_gfxok. 171 passed; 14 ignored; the 14 run undermake check-ass(ok. 14 passed, subtitlesok. 58 passed). The armv7 binary grows 16,440 bytes, within budget. The firmware load matrix is OK on 4.4.2 to 11.2.0 forplxnativeandlibass-plx.so.0.make check(check-cargo,check-python), pluscheck-nodefandcheck-ass. Three failures also fail on 5959398 on my machine and pass on CI: twocurlio::keymode_tests(host libcurl 8.23.0) andci/test_host_threads.py(local nightly).fw-compat-reviewer: no new link dependency or glibc requirement; the new surface is a gateddynlib!table. Nothing blocking.doc-claim-auditor: fixed ten stale claims it found (facade ABI, font chain, MORE side and others). It also found a marquee fade bug, which I fixed with tests in c4deb11.I am a native Arabic speaker and reviewed the Arabic myself. No Hebrew reader has reviewed the Hebrew.
With the TV in Arabic, ICU formats counts in Arabic-Indic digits beside English words ("١٩ seasons"). They render now; whether the format locale should follow the UI language is a separate question.
make build-bench5959398 against 358fe08, same machine and sitting, 3 runs each. Every median moves by 2.2 s or less, and most sit inside the other side's min-max spread. Only the
plx_gfxleaf edit's ranges do not overlap (+0.5 s), consistent with the code this adds toplx_gfx.Full table
x86_64, 16 cores, Linux, rustc 1.99.1, serial front end, no load or swap warnings. Both trees fail the same 3 unit tests on my machine (the two above plus
storage::tests::cleanup_removes_only_abandoned_owned_temporaries, which passes inmake checkand on CI). The ARM row is skipped: neither checkout has an ARM archive. I measured the base's two incremental rows straight after the main pair, once--coldhad built itstarget-fast.Screenshots