cairo_font_face_t * _cairo_font_face_twin_create_fallback (void) { cairo_font_face_t *twin_font_face; twin_font_face = _cairo_font_face_twin_create_internal (); if (! twin_font_face_create_properties (twin_font_face)) { cairo_font_face_destroy (twin_font_face); return (cairo_font_face_t *) &_cairo_font_face_nil; } return twin_font_face; }
cairo_font_face_t * _cairo_font_face_twin_create_fallback (void) { cairo_font_face_t *twin_font_face; cairo_status_t status; twin_font_face = _cairo_font_face_twin_create_internal (); status = twin_font_face_create_properties (twin_font_face, NULL); if (status) { cairo_font_face_destroy (twin_font_face); return (cairo_font_face_t *) &_cairo_font_face_nil; } return twin_font_face; }
static cairo_status_t twin_font_face_set_properties_from_toy (cairo_font_face_t *twin_face, cairo_toy_font_face_t *toy_face) { twin_face_properties_t *props; props = twin_font_face_create_properties (twin_face); if (unlikely (props == NULL)) return _cairo_error (CAIRO_STATUS_NO_MEMORY); props->slant = toy_face->slant; props->weight = toy_face->weight == CAIRO_FONT_WEIGHT_NORMAL ? TWIN_WEIGHT_NORMAL : TWIN_WEIGHT_BOLD; face_props_parse (props, toy_face->family); return CAIRO_STATUS_SUCCESS; }
static cairo_status_t twin_font_face_set_properties_from_toy (cairo_font_face_t *twin_face, cairo_toy_font_face_t *toy_face) { cairo_status_t status; twin_face_properties_t *props; status = twin_font_face_create_properties (twin_face, &props); if (unlikely (status)) return status; props->slant = toy_face->slant; props->weight = toy_face->weight == CAIRO_FONT_WEIGHT_NORMAL ? TWIN_WEIGHT_NORMAL : TWIN_WEIGHT_BOLD; face_props_parse (props, toy_face->family); return CAIRO_STATUS_SUCCESS; }