mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-10-28 11:47:21 -06:00
Part of #637: area type, threaded type and type on a path from the text document
Illustrator EPS and .ai type is made whole from the file's text document, shown or hidden: point type, area type (a story in several frames as threaded type that flows when the file opens) and type on a path, with its fonts, size, leading, tracking, scaling, baseline shift, fill and stroke colours (grey, RGB or CMYK), alignment, indents and paragraph spacing. The page's drawing of that type, often in pieces, is left out; where the text document can't say, type that shows still comes from the page. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
1c19c27fef
commit
3198abe2fd
@@ -228,6 +228,10 @@ pub fn load_with(name: &str, bytes: &[u8], opts: &LoadOptions) -> Result<Loaded>
|
||||
_ if format.raster => (raster_doc(&title, bytes)?, vec![], false),
|
||||
_ => return Err(err(format!("{} files can't be opened yet", format.label))),
|
||||
};
|
||||
// Threaded type read from a file flows through its frames.
|
||||
if !doc.text_threads.is_empty() && !restored {
|
||||
crate::cmd::threads::reflow(&Document::new(1.0, 1.0), &mut doc);
|
||||
}
|
||||
if let Some(mode) = opts.color_mode.filter(|m| *m != doc.color_mode) {
|
||||
super::super::colormgmt::set_color_mode(&mut doc, mode, true, None, opts.grays);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user