Skip to main content

Module script_detect

Module script_detect 

Source
Expand description

Script detection helpers for oxitext-shape.

Provides lightweight Unicode block-range checks to determine whether text contains characters from a given script family, without requiring a full ICU4X or Unicode database lookup. These functions are used internally by crate::SwashShaper::shape_request to apply smart direction defaults and may also be called directly by consumers.

Functionsยง

requires_arabic_shaping
Returns true if text contains Arabic/RTL characters requiring complex GSUB.
requires_indic_shaping
Returns true if text contains Indic characters needing conjunct handling.
requires_mark_positioning
Returns true if text requires mark positioning (Thai, Khmer, Myanmar).