Skip to content
pixi-silk
GitHub repository
Function

paragraphLevel

import { paragraphLevel } from 'pixi-silk/text/bidi';
function paragraphLevel(types: readonly BidiClass[], direction?: TextDirection): 0 | 1;

Paragraph level from the first strong type (P2, P3): 1 for R or AL, 0 for L or none. Text inside isolates is skipped.

Parameters#

ParameterTypeDefault value
typesreadonly BidiClass[]undefined
directionTextDirection'auto'

Returns#

0 | 1