Skip to content
is_formatting_control

is_formatting_control

Mojo function 🡭

is_formatting_control

fn def is_formatting_control(cp: Int) -> Bool

Whether the codepoint is one of the structural directional formatting characters – the embeddings, the overrides, PDF, the isolates and PDI.

These carry no glyph, so a renderer drops them rather than shaping them into .notdef boxes. LRM/RLM/ALM are deliberately excluded: they are strong characters that happen to be invisible, and their direction has already been used by the time this is asked.

Args:

  • cp (Int): The codepoint to test.

Returns:

Bool: True if the codepoint is a directional formatting control.