Commit fee8ce7
refactor(text): drop IFont.Shape direction-guessing overload
Shaping should shape a run of known direction; guessing direction from script is a
layout concern, not a font capability, and it forced every IFont backend to
replicate HarfBuzz's GuessSegmentProperties direction inference. The only caller was
the legacy non-bidi Run.Segments/ParsedText path (superseded by UnicodeText); it now
passes the run's own FlowDirection to the explicit Shape(text, direction) overload,
dropping the per-segment shaper guess and the spaces-only RTL hack that compensated
for it. SkiaFont/ManagedFont collapse ShapeCore into the single Shape (GuessSegment-
Properties stays — it also sets script/language — with direction set explicitly).
Validated: text + acrylic runtime tests unchanged (the one Given_TextBlock gripper
failure is pre-existing — fails identically on baseline without this change).
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>1 parent 6d50985 commit fee8ce7
4 files changed
Lines changed: 11 additions & 47 deletions
File tree
- src
- Uno.UI.Composition.Drawing
- Uno.UI.Composition.Skia/Composition/Uno/Drawing
- Uno.UI.Composition/Composition/Uno/Drawing
- Uno.UI/UI/Xaml/Documents
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | 28 | | |
36 | 29 | | |
37 | 30 | | |
| |||
Lines changed: 2 additions & 12 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
65 | 65 | | |
66 | 66 | | |
67 | 67 | | |
68 | | - | |
69 | | - | |
70 | | - | |
71 | | - | |
72 | | - | |
73 | | - | |
74 | 68 | | |
75 | 69 | | |
76 | 70 | | |
77 | | - | |
78 | | - | |
79 | | - | |
80 | | - | |
81 | | - | |
82 | | - | |
| 71 | + | |
| 72 | + | |
83 | 73 | | |
84 | 74 | | |
85 | 75 | | |
| |||
Lines changed: 2 additions & 12 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
149 | 149 | | |
150 | 150 | | |
151 | 151 | | |
152 | | - | |
153 | | - | |
154 | | - | |
155 | | - | |
156 | | - | |
157 | | - | |
158 | 152 | | |
159 | 153 | | |
160 | 154 | | |
161 | | - | |
162 | | - | |
163 | | - | |
164 | | - | |
165 | | - | |
166 | | - | |
| 155 | + | |
| 156 | + | |
167 | 157 | | |
168 | 158 | | |
169 | 159 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
215 | 215 | | |
216 | 216 | | |
217 | 217 | | |
218 | | - | |
219 | | - | |
220 | | - | |
221 | | - | |
222 | | - | |
223 | | - | |
224 | | - | |
225 | | - | |
226 | | - | |
227 | | - | |
228 | | - | |
229 | | - | |
230 | | - | |
231 | | - | |
232 | | - | |
233 | | - | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
234 | 225 | | |
235 | 226 | | |
236 | 227 | | |
| |||
0 commit comments