Skip to content

Commit

Permalink
Fix index in subsetter
Browse files Browse the repository at this point in the history
  • Loading branch information
LaurenzV committed Mar 31, 2024
1 parent 8a9d92c commit 654779a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/render/text.rs
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ fn subset_font(font_data: &[u8], index: u32, glyphs: &[u16]) -> Vec<u8> {
let mut data = subsetted.as_deref().unwrap_or(data);

// Extract the standalone CFF font program if applicable.
let face = ttf_parser::RawFace::parse(data, index).unwrap();
let face = ttf_parser::RawFace::parse(data, 0).unwrap();
if let Some(cff) = face.table(CFF) {
data = cff;
}
Expand Down

0 comments on commit 654779a

Please sign in to comment.