Skip to main content

Module common

Module common 

Source
Expand description

Shared rendering state and constants.

Constants§

BODY_PX

Functions§

is_rtl
lang_is_rtl
Whether a BCP-47 language code (e.g. “ar-SA”, “en-US”) resolves to an RTL script. Complements crate::rendering::text_render::Script::is_rtl, which works on text content; this works on a declared language tag.
set_rtl
slice_as_bytes
Reinterpret a slice of any type as a shared &[u8].
slice_as_bytes_mut
Reinterpret a mutable slice of any type as a &mut [u8].