// Compute the offsets needed to align the chunk per the text-anchor property (start, middle, end):
// This last term is a hack until librsvg adds support for multiple dx/dy values per text/tspan;
/// Computes the (x, y) offsets to be applied to spans after applying the text-anchor property (start, middle, end).
if let Some(layout) = create_pango_layout(layout_context, &properties, &with_control_chars)
fn from_unicode_bidi_and_direction(unicode_bidi: UnicodeBidi, direction: Direction) -> BidiControl {
/// Returns `None` if the layout would be invalid due to, for example, out-of-bounds font sizes.
let start_index = u32::try_from(start_index).expect("Pango attribute index must fit in u32");