Skip to content

使用 bidi-js 处理双向文本。

下面的例子来自 What HarfBuzz doesn't doImproving 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',
});

Released under the MIT License.