diff --git a/font/src/ft/list_fonts.rs b/font/src/ft/list_fonts.rs index fdadea8..5fa40ac 100644 --- a/font/src/ft/list_fonts.rs +++ b/font/src/ft/list_fonts.rs @@ -380,7 +380,7 @@ pub mod fc { /// FcValueSave so that no references to application provided memory are /// retained. That is, the CharSet can be safely dropped immediately /// after being added to the pattern. - pub unsafe fn add_charset(&self, charset: &CharSetRef) -> bool { + pub fn add_charset(&self, charset: &CharSetRef) -> bool { unsafe { FcPatternAddCharSet( self.as_ptr(), diff --git a/font/src/ft/mod.rs b/font/src/ft/mod.rs index d658526..b751cdc 100644 --- a/font/src/ft/mod.rs +++ b/font/src/ft/mod.rs @@ -229,9 +229,7 @@ impl FreeTypeRasterizer { let mut charset = fc::CharSet::new(); charset.add(glyph); let mut pattern = fc::Pattern::new(); - unsafe { - pattern.add_charset(&charset); - } + pattern.add_charset(&charset); let config = fc::Config::get_current(); match fc::font_match(config, &mut pattern) {