// This file was generated by gir (https://github.com/gtk-rs/gir)
// from
// from gir-files (https://github.com/gtk-rs/gir-files)
// DO NOT EDIT

use crate::ffi;
use glib::translate::*;

glib::wrapper! {
    #[derive(Debug, PartialEq, Eq, PartialOrd, Ord, Hash)]
    pub struct FontDescription(Boxed<ffi::PopplerFontDescription>);

    match fn {
        copy => |ptr| ffi::poppler_font_description_copy(mut_override(ptr)),
        free => |ptr| ffi::poppler_font_description_free(ptr),
        type_ => || ffi::poppler_font_description_get_type(),
    }
}

impl FontDescription {
    #[doc(alias = "poppler_font_description_new")]
    pub fn new(font_name: &str) -> FontDescription {
        unsafe {
            from_glib_full(ffi::poppler_font_description_new(
                font_name.to_glib_none().0,
            ))
        }
    }
}
