pango/
attr_font_features.rs

1// Take a look at the license at the top of the repository in the LICENSE file.
2
3use glib::translate::*;
4
5use crate::{ffi, AttrType};
6
7define_attribute_struct!(
8    AttrFontFeatures,
9    ffi::PangoAttrFontFeatures,
10    &[AttrType::FontFeatures]
11);
12
13impl AttrFontFeatures {
14    #[doc(alias = "pango_attr_font_features_new")]
15    pub fn new(features: &str) -> Self {
16        unsafe { from_glib_full(ffi::pango_attr_font_features_new(features.to_glib_none().0)) }
17    }
18
19    pub fn features(&self) -> glib::GString {
20        unsafe { from_glib_none(self.inner.features) }
21    }
22}