Closed bianbiandashen closed 1 week ago
Use allsorts::subset::subset(font, glyphs)
like in this function:
https://github.com/fschutt/printpdf/blob/5109221b158c767e621309d88afe5af56b11b168/src/font.rs#L322
Or wait for the 0.8 release (or use the master branch from GitHub directly).
let font_ref = doc.add_external_font(File::open(&font_path).expect("无法打开字体文件")).unwrap(); is bad