Skip to content

Commit

Permalink
smaller fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
LaurenzV committed Jun 11, 2024
1 parent f22c5de commit 7d555e2
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/render/text.rs
Original file line number Diff line number Diff line change
Expand Up @@ -266,10 +266,9 @@ pub fn render(
continue;
};

let name = font_names.get(&font.reference).unwrap();
let name = font_names.get(&font.reference).ok_or(UnknownError)?;

// TODO: Remove unwraps and switch to error-based handling.
let cid = font.glyph_remapper.get(glyph.id.0).unwrap();
let cid = font.glyph_remapper.get(glyph.id.0).ok_or(UnknownError)?;
let ts = glyph
.outline_transform()
.pre_scale(font.units_per_em as f32, font.units_per_em as f32)
Expand Down

0 comments on commit 7d555e2

Please sign in to comment.