コード例 #1
0
ファイル: cairo-font-face-twin.c プロジェクト: igagis/cairo
cairo_status_t
_cairo_font_face_twin_create_for_toy (cairo_toy_font_face_t   *toy_face,
				      cairo_font_face_t      **font_face)
{
    cairo_status_t status;
    cairo_font_face_t *twin_font_face;

    twin_font_face = _cairo_font_face_twin_create_internal ();
    status = twin_font_face_set_properties_from_toy (twin_font_face, toy_face);
    if (status) {
	cairo_font_face_destroy (twin_font_face);
	return status;
    }

    *font_face = twin_font_face;

    return CAIRO_STATUS_SUCCESS;
}
コード例 #2
0
cairo_status_t
_cairo_font_face_twin_create_for_toy (cairo_toy_font_face_t   *toy_face,
				      cairo_font_face_t      **font_face)
{
    cairo_status_t status;
    cairo_font_face_t *twin_font_face;

    twin_font_face = cairo_user_font_face_create ();
    cairo_user_font_face_set_init_func             (twin_font_face, twin_scaled_font_init);
    cairo_user_font_face_set_render_glyph_func     (twin_font_face, twin_scaled_font_render_glyph);
    cairo_user_font_face_set_unicode_to_glyph_func (twin_font_face, twin_scaled_font_unicode_to_glyph);
    status = twin_font_face_set_properties_from_toy (twin_font_face, toy_face);
    if (status) {
	cairo_font_face_destroy (twin_font_face);
	return status;
    }

    *font_face = twin_font_face;

    return CAIRO_STATUS_SUCCESS;
}