Bidirectional text layout
Bidi layout is required for Arabic and Hebrew mixed with English. HarfBuzz-level shaping (see related examples) resolves levels; this page shows canvas-level integration.
Test caret movement and selection with mixed-direction paragraphs.
Use bidi-js to handle BiDi.
The following examples are from What HarfBuzz doesn't do and Improving Arabic and Hebrew text in map labels.
ts
const text = new Text({
x: 50,
y: 100,
content: 'ABCג ב אDEF',
fontSize: 30,
fill: '#F67676',
});
const text2 = new Text({
x: 50,
y: 150,
content: 'سلام',
fontSize: 30,
fill: '#F67676',
});