diff options
Diffstat (limited to 'font/src/ft/fc/config.rs')
-rw-r--r-- | font/src/ft/fc/config.rs | 29 |
1 files changed, 0 insertions, 29 deletions
diff --git a/font/src/ft/fc/config.rs b/font/src/ft/fc/config.rs deleted file mode 100644 index ac87a284..00000000 --- a/font/src/ft/fc/config.rs +++ /dev/null @@ -1,29 +0,0 @@ -use foreign_types::{foreign_type, ForeignTypeRef}; - -use super::ffi::{FcConfig, FcConfigDestroy, FcConfigGetCurrent, FcConfigGetFonts}; -use super::{FontSetRef, SetName}; - -foreign_type! { - pub unsafe type Config { - type CType = FcConfig; - fn drop = FcConfigDestroy; - } -} - -impl Config { - /// Get the current configuration. - pub fn get_current() -> &'static ConfigRef { - unsafe { ConfigRef::from_ptr(FcConfigGetCurrent()) } - } -} - -impl ConfigRef { - /// Returns one of the two sets of fonts from the configuration as - /// specified by `set`. - pub fn get_fonts(&self, set: SetName) -> &FontSetRef { - unsafe { - let ptr = FcConfigGetFonts(self.as_ptr(), set as u32); - FontSetRef::from_ptr(ptr) - } - } -} |