Skip to content
This repository has been archived by the owner on Jun 8, 2021. It is now read-only.

Commit

Permalink
Merge pull request #133 from EPashkin/disco
Browse files Browse the repository at this point in the history
WIP: Regen
  • Loading branch information
GuillaumeGomez authored Feb 2, 2019
2 parents 8441d72 + 9154d8a commit 5fa869e
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/auto/flags.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ bitflags! {
const STRETCH = 16;
const SIZE = 32;
const GRAVITY = 64;
const VARIATIONS = 128;
}
}

Expand Down
21 changes: 21 additions & 0 deletions src/auto/font_description.rs
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,13 @@ impl FontDescription {
}
}

#[cfg(any(feature = "v1_42", feature = "dox"))]
pub fn get_variations(&self) -> Option<GString> {
unsafe {
from_glib_none(ffi::pango_font_description_get_variations(self.to_glib_none().0))
}
}

pub fn get_weight(&self) -> Weight {
unsafe {
from_glib(ffi::pango_font_description_get_weight(self.to_glib_none().0))
Expand Down Expand Up @@ -154,6 +161,20 @@ impl FontDescription {
}
}

#[cfg(any(feature = "v1_42", feature = "dox"))]
pub fn set_variations(&mut self, settings: &str) {
unsafe {
ffi::pango_font_description_set_variations(self.to_glib_none_mut().0, settings.to_glib_none().0);
}
}

#[cfg(any(feature = "v1_42", feature = "dox"))]
pub fn set_variations_static(&mut self, settings: &str) {
unsafe {
ffi::pango_font_description_set_variations_static(self.to_glib_none_mut().0, settings.to_glib_none().0);
}
}

pub fn set_weight(&mut self, weight: Weight) {
unsafe {
ffi::pango_font_description_set_weight(self.to_glib_none_mut().0, weight.to_glib());
Expand Down

0 comments on commit 5fa869e

Please sign in to comment.