// GENERATED — DO NOT EDIT
///|
/// [Upstream documentation](https://gnome.pages.gitlab.gnome.org/pango/Pango/class.FontFace.html).
pub type FontFace
///|
pub(open) trait IFontFace {
fn as_font_face(Self) -> FontFace
fn describe(Self) -> FontDescription = _
fn get_face_name(Self) -> String = _
fn get_family(Self) -> FontFamily = _
fn is_synthesized(Self) -> Bool = _
fn list_sizes(Self) -> Array[Int] = _
}
///|
pub impl IFontFace for FontFace with fn as_font_face(self) {
self
}
///|
/// [Upstream documentation](https://gnome.pages.gitlab.gnome.org/pango/Pango/method.FontFace.describe.html).
#borrow(self)
pub extern "c" fn FontFace::describe(self : FontFace) -> FontDescription = "moonbit_pango_font_face_describe"
///|
#borrow(self_)
extern "c" fn moonbit_pango_font_face_get_face_name(self_ : FontFace) -> Bytes = "moonbit_pango_font_face_get_face_name"
///|
/// [Upstream documentation](https://gnome.pages.gitlab.gnome.org/pango/Pango/method.FontFace.get_face_name.html).
pub fn FontFace::get_face_name(self : FontFace) -> String {
@encoding/utf8.decode_lossy(moonbit_pango_font_face_get_face_name(self))
}
///|
/// [Upstream documentation](https://gnome.pages.gitlab.gnome.org/pango/Pango/method.FontFace.get_family.html).
#borrow(self)
pub extern "c" fn FontFace::get_family(self : FontFace) -> FontFamily = "moonbit_pango_font_face_get_family"
///|
/// [Upstream documentation](https://gnome.pages.gitlab.gnome.org/pango/Pango/method.FontFace.is_synthesized.html).
#borrow(self)
pub extern "c" fn FontFace::is_synthesized(self : FontFace) -> Bool = "moonbit_pango_font_face_is_synthesized"
///|
#borrow(self_, sizes)
extern "c" fn moonbit_pango_font_face_list_sizes(
self_ : FontFace,
sizes : Ref[FixedArray[Int]],
) = "moonbit_pango_font_face_list_sizes"
///|
/// [Upstream documentation](https://gnome.pages.gitlab.gnome.org/pango/Pango/method.FontFace.list_sizes.html).
pub fn FontFace::list_sizes(self : FontFace) -> Array[Int] {
let sizes : Ref[FixedArray[Int]] = Ref([])
moonbit_pango_font_face_list_sizes(self, sizes)
let result : Array[Int] = Array::new(capacity=sizes.val.length())
for i in 0.. FontDescription {
self.as_font_face().describe()
}
///|
impl IFontFace with fn get_face_name(self) -> String {
self.as_font_face().get_face_name()
}
///|
impl IFontFace with fn get_family(self) -> FontFamily {
self.as_font_face().get_family()
}
///|
impl IFontFace with fn is_synthesized(self) -> Bool {
self.as_font_face().is_synthesized()
}
///|
impl IFontFace with fn list_sizes(self) -> Array[Int] {
self.as_font_face().list_sizes()
}
///|
pub fn FontFace::as_gobject_object(self : FontFace) -> @gobject.Object = "%identity"
///|
pub impl @gobject.IObject for FontFace with fn as_object(self) {
self.as_gobject_object()
}