Merge pull request #10323

Co-authored-by: autocraft-bot[bot] <354215646+autocraft-bot[bot]@users.noreply.github.com>
This commit is contained in:
FredAppsandautocraft-bot[bot] authored and autocraft-bot[bot] committed 2026-12-06 04:54:50 +00:00
commit ede44acb2e
2 files changed
+9 -5

No files matched your search

+2 -1
View File
@@ -224,7 +224,8 @@ impl<'a> Device<'a> for Builder<'_> {
}
let scale = mean_scale(transform);
let overprint = self.glyph_overprint(stroke.is_some());
if self.type_type3_glyph(t3, transform * glyph_transform, scale, Some(paint), stroke.as_ref(), overprint) {
// Draw the glyph's artwork below when empty ActualText suppresses live text.
if !self.actual.textless() && self.type_type3_glyph(t3, transform * glyph_transform, scale, Some(paint), stroke.as_ref(), overprint) {
return;
}
self.flush_glyphs();
+7 -4
View File
@@ -509,10 +509,13 @@ fn type3_with_actual_text() {
assert_eq!(t.len(), 1, "Type 3 with ActualText should import as live text");
assert_eq!(t[0].plain_text(), "XYZ");
// Empty ActualText suppresses mapped text
let d_empty = open_as(&page("/Span << /ActualText () >> BDC BT /T3U 20 Tf 20 50 Td (ab) Tj ET EMC", ""), TextAs::Text);
let t_empty = texts(&d_empty);
assert!(t_empty.is_empty(), "Empty ActualText should suppress text");
// Empty ActualText suppresses mapped text while keeping both glyphs' artwork.
let empty = page("/Span << /ActualText () >> BDC BT /T3U 20 Tf 20 50 Td (ab) Tj ET EMC", "");
let d_empty = open_as(&empty, TextAs::Text);
assert!(texts(&d_empty).is_empty(), "Empty ActualText should suppress text");
let outline_contours = contours(&open_as(&empty, TextAs::Outlines));
assert_eq!(outline_contours.len(), 2, "The fixture draws two glyph boxes");
assert_eq!(contours(&d_empty), outline_contours, "Empty ActualText should keep both glyph drawings");
}
/// A font that isn't embedded or installed is set in a stand-in: the line still starts where