zarzet and itzSho3aib
33fe55a8c7
fix(lyrics): read each lyric line in its own direction ( #844 )
...
Finish the right-to-left lyrics from PR #844 on the current lyrics code.
A line's direction now follows the Unicode paragraph rule: its first
strong letter decides, so a Latin line with one Arabic word stays left
to right, and digits, punctuation, marks, emoji or a byte order mark
decide nothing. A line without letters (an instrumental "..." or a gap)
takes its neighbour's direction. The scan is a rune loop over sorted
ranges with an ASCII fast path, in lib/utils/text_direction.dart, and
replaces the PR's any-RTL-character regex and its re-export from
player_lyrics.dart.
- The synced view works the directions out once per set of lyrics,
with its line keys, and lays every row out in its line's direction,
so the row cache, reveal, scale, backing vocals and duet alignment
follow it. Mornye's line measurement uses the same directions.
- The word sweep orders a word's runs by the line's direction and
sweeps each run the way it is laid out, so a Latin word inside an
Arabic line fills from its left.
- A translation or pronunciation reads in its own direction and stays
on its line's side, timed or not. Phrase-aligned pronunciation stays
off for right-to-left lines.
- Plain lyrics keep one text when every line shares a direction and get
a text a line when they mix; the directions are cached per lyrics.
- The lyric line under the header reads, and slides, in the line's
direction: a long Arabic line moves right to bring its end in.
- The editor keeps each field's direction in a notifier that changes
only with the first letter's script, instead of rebuilding the field
on every keystroke.
- The share card and mini player use the same rule.
In a right-to-left app a Latin line now reads left to right from the
left edge; the repaint test records that.
Co-authored-by: itzSho3aib <mamomema123@gmail.com >
2026-11-15 23:35:34 +07:00
..
2026-11-15 23:35:34 +07:00
2026-11-15 23:33:29 +07:00
2026-11-15 23:33:29 +07:00
2026-11-15 23:33:29 +07:00
2026-11-15 23:33:29 +07:00
2026-11-15 23:33:29 +07:00
2026-11-15 23:35:34 +07:00
2026-11-04 01:17:58 +07:00
2026-11-15 23:33:29 +07:00
2026-11-15 23:33:29 +07:00
2026-11-15 23:33:29 +07:00
2026-11-15 23:33:29 +07:00
2026-11-15 23:33:29 +07:00
2026-11-15 23:33:29 +07:00
2026-11-15 23:33:29 +07:00
2026-11-15 23:33:29 +07:00
2026-11-15 23:33:29 +07:00
2026-11-15 23:33:29 +07:00
2026-11-15 23:33:29 +07:00
2026-11-15 23:33:29 +07:00
2026-11-15 23:33:29 +07:00
2026-11-15 23:33:29 +07:00
2026-11-15 23:33:29 +07:00
2026-11-15 23:33:29 +07:00
2026-11-15 23:33:29 +07:00
2026-11-15 23:33:29 +07:00
2026-11-15 23:33:29 +07:00
2026-11-15 23:33:29 +07:00
2026-11-15 23:33:29 +07:00
2026-11-15 23:33:29 +07:00
2026-11-15 23:33:29 +07:00
2026-11-15 23:33:29 +07:00
2026-11-15 23:33:29 +07:00
2026-11-11 11:54:00 +07:00
2026-11-11 11:54:00 +07:00
2026-11-15 23:33:29 +07:00
2026-11-11 11:54:00 +07:00
2026-11-15 23:33:29 +07:00
2026-11-15 23:33:29 +07:00
2026-11-15 23:33:29 +07:00
2026-11-15 23:33:29 +07:00
2026-11-15 23:33:29 +07:00
2026-11-15 23:33:29 +07:00
2026-11-15 23:33:29 +07:00
2026-11-15 23:33:29 +07:00
2026-11-15 23:33:29 +07:00
2026-11-15 23:33:29 +07:00
2026-11-15 23:33:29 +07:00
2026-11-15 23:33:29 +07:00
2026-11-15 23:33:29 +07:00
2026-11-15 23:33:29 +07:00
2026-11-15 23:33:29 +07:00
2026-11-15 23:33:42 +07:00
2026-11-15 23:33:29 +07:00
2026-11-15 23:33:29 +07:00
2026-10-23 23:22:02 +07:00
2026-11-15 23:33:29 +07:00
2026-11-15 23:33:29 +07:00
2026-11-15 23:33:29 +07:00
2026-11-15 23:33:29 +07:00
2026-11-15 23:33:29 +07:00
2026-11-15 23:33:29 +07:00
2026-11-15 23:33:29 +07:00
2026-11-15 23:33:29 +07:00
2026-11-15 23:33:29 +07:00
2026-11-15 23:33:29 +07:00
2026-11-15 23:33:29 +07:00
2026-11-15 23:33:29 +07:00
2026-11-15 23:33:29 +07:00
2026-11-15 23:33:29 +07:00
2026-11-15 23:33:29 +07:00
2026-11-15 23:33:29 +07:00
2026-11-15 23:33:29 +07:00
2026-11-15 23:33:29 +07:00
2026-11-15 23:33:29 +07:00
2026-11-01 20:17:07 +07:00
2026-11-15 23:33:29 +07:00
2026-11-15 23:33:29 +07:00
2026-11-15 23:33:29 +07:00
2026-11-15 23:33:29 +07:00
2026-11-15 23:33:29 +07:00
2026-11-15 23:33:29 +07:00
2026-11-15 23:33:29 +07:00
2026-11-15 23:33:29 +07:00
2026-11-15 23:33:29 +07:00
2026-11-15 23:33:29 +07:00
2026-11-15 23:33:29 +07:00
2026-11-15 23:33:29 +07:00
2026-11-15 23:33:29 +07:00
2026-11-15 23:33:29 +07:00
2026-11-15 23:33:29 +07:00
2026-11-15 23:33:29 +07:00
2026-11-15 23:33:29 +07:00
2026-11-07 20:14:26 +07:00
2026-10-30 03:53:32 +07:00
2026-11-01 20:16:44 +07:00
2026-11-15 23:33:29 +07:00
2026-11-08 04:03:46 +07:00
2026-11-15 23:33:29 +07:00
2026-10-21 14:59:26 +07:00
2026-11-15 23:35:34 +07:00
2026-11-05 18:51:24 +07:00
2026-11-15 23:33:29 +07:00
2026-11-15 23:33:29 +07:00
2026-11-15 23:33:29 +07:00
2026-11-15 23:33:29 +07:00
2026-11-15 23:33:29 +07:00
2026-11-15 23:33:42 +07:00
2026-11-15 23:33:29 +07:00
2026-11-15 23:33:29 +07:00
2026-11-15 23:33:29 +07:00
2026-11-15 23:33:29 +07:00
2026-11-15 23:33:29 +07:00
2026-11-15 23:33:29 +07:00
2026-11-15 23:33:29 +07:00
2026-11-15 23:33:29 +07:00
2026-11-15 23:33:29 +07:00
2026-11-15 23:33:29 +07:00
2026-11-15 23:33:29 +07:00
2026-11-15 23:33:29 +07:00
2026-11-15 23:33:29 +07:00
2026-11-15 23:33:29 +07:00
2026-11-15 23:33:29 +07:00
2026-11-15 23:33:29 +07:00
2026-11-15 23:33:29 +07:00
2026-11-15 23:33:29 +07:00
2026-11-15 23:33:29 +07:00
2026-11-15 23:33:29 +07:00
2026-11-15 23:33:29 +07:00
2026-11-15 23:33:29 +07:00
2026-11-15 23:33:42 +07:00
2026-11-15 23:33:29 +07:00
2026-11-15 23:33:29 +07:00
2026-11-15 23:33:29 +07:00
2026-11-15 23:33:29 +07:00
2026-11-15 23:33:29 +07:00
2026-11-15 23:33:29 +07:00
2026-11-15 23:33:29 +07:00
2026-11-15 23:33:29 +07:00
2026-11-15 23:33:29 +07:00
2026-11-15 23:33:29 +07:00
2026-11-15 23:33:29 +07:00
2026-11-15 23:33:29 +07:00
2026-11-15 23:33:29 +07:00
2026-11-15 23:33:29 +07:00
2026-11-15 23:33:29 +07:00
2026-11-15 23:33:29 +07:00
2026-11-15 23:33:29 +07:00
2026-10-20 03:37:21 +07:00
2026-11-15 23:33:29 +07:00
2026-11-15 23:33:29 +07:00
2026-11-15 23:33:29 +07:00
2026-11-15 23:33:29 +07:00
2026-11-15 23:33:29 +07:00
2026-11-15 23:33:29 +07:00
2026-11-15 23:33:29 +07:00
2026-11-15 23:33:29 +07:00
2026-11-15 23:33:29 +07:00
2026-11-15 23:33:29 +07:00
2026-11-15 23:35:34 +07:00
2026-11-15 23:33:29 +07:00
2026-11-15 23:35:34 +07:00
2026-11-15 23:35:34 +07:00
2026-11-15 23:35:34 +07:00
2026-11-15 23:35:34 +07:00
2026-11-15 23:33:29 +07:00
2026-11-15 23:33:29 +07:00
2026-11-15 23:33:29 +07:00
2026-11-15 23:33:29 +07:00
2026-11-15 23:33:29 +07:00
2026-11-15 23:33:29 +07:00
2026-11-15 23:33:29 +07:00
2026-11-15 23:33:29 +07:00
2026-11-15 23:33:42 +07:00
2026-11-15 23:33:29 +07:00
2026-11-15 23:33:29 +07:00
2026-11-15 23:33:29 +07:00
2026-11-15 23:33:29 +07:00
2026-11-15 23:33:29 +07:00
2026-11-15 23:33:29 +07:00
2026-11-15 23:33:42 +07:00
2026-11-15 23:33:29 +07:00
2026-11-15 23:33:29 +07:00
2026-11-15 23:33:29 +07:00
2026-11-15 23:33:29 +07:00
2026-11-15 23:33:29 +07:00
2026-11-15 23:33:29 +07:00
2026-11-01 20:16:44 +07:00
2026-10-21 22:24:11 +07:00
2026-11-15 23:33:29 +07:00
2026-10-23 19:17:00 +07:00
2026-11-15 23:33:29 +07:00
2026-11-07 20:14:26 +07:00
2026-11-15 23:33:29 +07:00
2026-11-08 16:49:40 +07:00
2026-11-15 23:33:29 +07:00
2026-11-15 23:33:29 +07:00
2026-11-15 23:33:29 +07:00
2026-11-15 23:33:29 +07:00
2026-11-15 23:33:29 +07:00
2026-11-15 23:33:29 +07:00
2026-11-15 23:33:29 +07:00
2026-08-28 19:57:40 +07:00
2026-11-15 23:33:29 +07:00
2026-11-15 23:33:29 +07:00