Type: ruby (ふりがな) for live text

Squashed from #3448 onto main.
This commit is contained in:
bflatastic
2026-10-22 00:10:56 +07:00
parent 2cd7f156fb
commit 14f804cdee
39 changed files with 977 additions and 15 deletions
+2
View File
@@ -567,6 +567,8 @@ pub fn load_file(bytes: &[u8]) -> Result<NativeFile, FormatError> {
// Untrusted: the type's sizes, leading, baseline shifts and scales, its indents and paragraph
// spacing, and its tab stops, each within its range (after the depth limit: the walk recurses).
doc.keep_type_values_in_range();
// Untrusted: ruby ranges over the type's text, clamped to it (after the depth limit too).
doc.fix_ruby();
// Untrusted: the raster effects resolution, within 1 to 2400 ppi (72 when it isn't finite).
doc.raster_effects_ppi = Some(doc.raster_effects_ppi).filter(|v| v.is_finite()).unwrap_or(72.0).clamp(1.0, 2400.0);
// Untrusted: the superscript, subscript and small caps proportions of the type, the graph