fix: resolve no_std build issues in ligature handling

This commit is contained in:
Adam Kowalski 2026-01-20 21:00:14 -08:00 committed by Jeremy Soller
parent 723841f934
commit d907e41bf3

View file

@ -8,6 +8,8 @@ use crate::{
LayoutLine, Metrics, Wrap,
};
#[cfg(not(feature = "std"))]
use alloc::format;
#[cfg(not(feature = "std"))]
use alloc::vec::Vec;
use alloc::collections::VecDeque;
@ -871,6 +873,7 @@ impl ShapeSpan {
// 2. If we have the same number of glyphs, they might be contextual alternates (e.g. |> becoming 2 special glyphs).
// Check if the glyphs match the standard "cmap" (character to glyph) mapping.
// If they differ, the shaper substituted them, so we should keep them together.
#[cfg(feature = "swash")]
if glyphs.len() == probe_text.chars().count() {
let charmap = font.as_swash().charmap();
let mut is_modified = false;