/** * cairo_toy_font_face_get_weight: * @font_face: A toy font face * * Gets the weight a toy font. * * Return value: The weight value * * Since: 1.8 **/ cairo_font_weight_t cairo_toy_font_face_get_weight (cairo_font_face_t *font_face) { cairo_toy_font_face_t *toy_font_face = (cairo_toy_font_face_t *) font_face; if (! _cairo_font_face_is_toy (font_face)) { if (_cairo_font_face_set_error (font_face, CAIRO_STATUS_FONT_TYPE_MISMATCH)) return CAIRO_FONT_WEIGHT_DEFAULT; } return toy_font_face->weight; }
/** * cairo_toy_font_face_get_family: * @font_face: A toy font face * * Gets the familly name of a toy font. * * Return value: The family name. This string is owned by the font face * and remains valid as long as the font face is alive (referenced). * * Since: 1.8 **/ const char * cairo_toy_font_face_get_family (cairo_font_face_t *font_face) { cairo_toy_font_face_t *toy_font_face = (cairo_toy_font_face_t *) font_face; if (! _cairo_font_face_is_toy (font_face)) { if (_cairo_font_face_set_error (font_face, CAIRO_STATUS_FONT_TYPE_MISMATCH)) return CAIRO_FONT_FAMILY_DEFAULT; } assert (toy_font_face->owns_family); return toy_font_face->family; }
/** * cairo_toy_font_face_get_slant: * @font_face: A toy font face * * Gets the slant a toy font. * * Return value: The slant value * * Since: 1.8 **/ cairo_font_slant_t cairo_toy_font_face_get_slant (cairo_font_face_t *font_face) { cairo_toy_font_face_t *toy_font_face; if (font_face->status) return CAIRO_FONT_SLANT_DEFAULT; toy_font_face = (cairo_toy_font_face_t *) font_face; if (! _cairo_font_face_is_toy (font_face)) { if (_cairo_font_face_set_error (font_face, CAIRO_STATUS_FONT_TYPE_MISMATCH)) return CAIRO_FONT_SLANT_DEFAULT; } return toy_font_face->slant; }
cairo_font_face_t * _cairo_toy_font_face_get_implementation (cairo_font_face_t *font_face) { cairo_toy_font_face_t *toy_font_face; if (font_face->status) return NULL; toy_font_face = (cairo_toy_font_face_t *) font_face; if (! _cairo_font_face_is_toy (font_face)) { if (_cairo_font_face_set_error (font_face, CAIRO_STATUS_FONT_TYPE_MISMATCH)) return NULL; } return toy_font_face->impl_face ? toy_font_face->impl_face : font_face; }