Pptx: read and write embedded fonts

A deck that embeds a TrueType or OpenType face, including one wrapped as Embedded OpenType, now draws with that face and saves it back. MicroType Express subsets stay in the file and still draw in a stand-in.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Nikita
2026-10-13 18:22:48 +03:00
co-authored by Cursor
parent 457406a7a5
commit 82dcd86c88
12 changed files with 398 additions and 14 deletions
+1
View File
@@ -88,6 +88,7 @@ pub fn open_presentation(name: &str, bytes: &[u8]) -> Result<Presentation> {
pub fn add_opened(s: &mut Session, name: &str, path: Option<String>, p: Presentation) -> usize {
let title = std::path::Path::new(name).file_stem().map(|n| n.to_string_lossy().to_string()).unwrap_or_else(|| name.to_string());
crate::fonts::install_embedded_fonts(&p);
let missing_fonts = crate::fonts::missing_fonts(&p);
let mut st = DocState::new(p, path, title);
st.missing_fonts = missing_fonts;