mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-06-08 23:18:32 +02:00
[user-font] Reorder methods to the order they should appear in docs
This commit is contained in:
parent
6702c7edc4
commit
adcfe83356
2 changed files with 64 additions and 64 deletions
|
|
@ -533,37 +533,6 @@ cairo_user_font_face_set_render_glyph_func (cairo_font_face_t
|
|||
user_font_face->scaled_font_methods.render_glyph = render_glyph_func;
|
||||
}
|
||||
|
||||
/**
|
||||
* cairo_user_font_face_set_unicode_to_glyph_func:
|
||||
* @font_face: A user font face
|
||||
* @unicode_to_glyph_func: The unicode_to_glyph callback, or %NULL
|
||||
*
|
||||
* Sets the unicode-to-glyph conversion function of a user-font.
|
||||
* See #cairo_user_scaled_font_unicode_to_glyph_func_t for details of how the callback
|
||||
* works.
|
||||
*
|
||||
* The font-face should not be immutable or a %CAIRO_STATUS_USER_FONT_IMMUTABLE
|
||||
* error will occur. A user font-face is immutable as soon as a scaled-font
|
||||
* is created from it.
|
||||
*
|
||||
* Since: 1.8
|
||||
**/
|
||||
void
|
||||
cairo_user_font_face_set_unicode_to_glyph_func (cairo_font_face_t *font_face,
|
||||
cairo_user_scaled_font_unicode_to_glyph_func_t unicode_to_glyph_func)
|
||||
{
|
||||
cairo_user_font_face_t *user_font_face = (cairo_user_font_face_t *) font_face;
|
||||
if (! _cairo_font_face_is_user (font_face)) {
|
||||
if (_cairo_font_face_set_error (font_face, CAIRO_STATUS_FONT_TYPE_MISMATCH))
|
||||
return;
|
||||
}
|
||||
if (user_font_face->immutable) {
|
||||
if (_cairo_font_face_set_error (font_face, CAIRO_STATUS_USER_FONT_IMMUTABLE))
|
||||
return;
|
||||
}
|
||||
user_font_face->scaled_font_methods.unicode_to_glyph = unicode_to_glyph_func;
|
||||
}
|
||||
|
||||
/**
|
||||
* cairo_user_font_face_set_text_to_glyphs_func:
|
||||
* @font_face: A user font face
|
||||
|
|
@ -595,6 +564,37 @@ cairo_user_font_face_set_text_to_glyphs_func (cairo_font_face_t
|
|||
user_font_face->scaled_font_methods.text_to_glyphs = text_to_glyphs_func;
|
||||
}
|
||||
|
||||
/**
|
||||
* cairo_user_font_face_set_unicode_to_glyph_func:
|
||||
* @font_face: A user font face
|
||||
* @unicode_to_glyph_func: The unicode_to_glyph callback, or %NULL
|
||||
*
|
||||
* Sets the unicode-to-glyph conversion function of a user-font.
|
||||
* See #cairo_user_scaled_font_unicode_to_glyph_func_t for details of how the callback
|
||||
* works.
|
||||
*
|
||||
* The font-face should not be immutable or a %CAIRO_STATUS_USER_FONT_IMMUTABLE
|
||||
* error will occur. A user font-face is immutable as soon as a scaled-font
|
||||
* is created from it.
|
||||
*
|
||||
* Since: 1.8
|
||||
**/
|
||||
void
|
||||
cairo_user_font_face_set_unicode_to_glyph_func (cairo_font_face_t *font_face,
|
||||
cairo_user_scaled_font_unicode_to_glyph_func_t unicode_to_glyph_func)
|
||||
{
|
||||
cairo_user_font_face_t *user_font_face = (cairo_user_font_face_t *) font_face;
|
||||
if (! _cairo_font_face_is_user (font_face)) {
|
||||
if (_cairo_font_face_set_error (font_face, CAIRO_STATUS_FONT_TYPE_MISMATCH))
|
||||
return;
|
||||
}
|
||||
if (user_font_face->immutable) {
|
||||
if (_cairo_font_face_set_error (font_face, CAIRO_STATUS_USER_FONT_IMMUTABLE))
|
||||
return;
|
||||
}
|
||||
user_font_face->scaled_font_methods.unicode_to_glyph = unicode_to_glyph_func;
|
||||
}
|
||||
|
||||
/* User-font method getters */
|
||||
|
||||
/**
|
||||
|
|
@ -641,28 +641,6 @@ cairo_user_font_face_get_render_glyph_func (cairo_font_face_t *font_face)
|
|||
return user_font_face->scaled_font_methods.render_glyph;
|
||||
}
|
||||
|
||||
/**
|
||||
* cairo_user_font_face_get_unicode_to_glyph_func:
|
||||
* @font_face: A user font face
|
||||
*
|
||||
* Gets the unicode-to-glyph conversion function of a user-font.
|
||||
*
|
||||
* Return value: The unicode_to_glyph callback of @font_face
|
||||
* or %NULL if none set.
|
||||
*
|
||||
* Since: 1.8
|
||||
**/
|
||||
cairo_user_scaled_font_unicode_to_glyph_func_t
|
||||
cairo_user_font_face_get_unicode_to_glyph_func (cairo_font_face_t *font_face)
|
||||
{
|
||||
cairo_user_font_face_t *user_font_face = (cairo_user_font_face_t *) font_face;
|
||||
if (! _cairo_font_face_is_user (font_face)) {
|
||||
if (_cairo_font_face_set_error (font_face, CAIRO_STATUS_FONT_TYPE_MISMATCH))
|
||||
return NULL;
|
||||
}
|
||||
return user_font_face->scaled_font_methods.unicode_to_glyph;
|
||||
}
|
||||
|
||||
/**
|
||||
* cairo_user_font_face_get_text_to_glyphs_func:
|
||||
* @font_face: A user font face
|
||||
|
|
@ -684,3 +662,25 @@ cairo_user_font_face_get_text_to_glyphs_func (cairo_font_face_t *font_face)
|
|||
}
|
||||
return user_font_face->scaled_font_methods.text_to_glyphs;
|
||||
}
|
||||
|
||||
/**
|
||||
* cairo_user_font_face_get_unicode_to_glyph_func:
|
||||
* @font_face: A user font face
|
||||
*
|
||||
* Gets the unicode-to-glyph conversion function of a user-font.
|
||||
*
|
||||
* Return value: The unicode_to_glyph callback of @font_face
|
||||
* or %NULL if none set.
|
||||
*
|
||||
* Since: 1.8
|
||||
**/
|
||||
cairo_user_scaled_font_unicode_to_glyph_func_t
|
||||
cairo_user_font_face_get_unicode_to_glyph_func (cairo_font_face_t *font_face)
|
||||
{
|
||||
cairo_user_font_face_t *user_font_face = (cairo_user_font_face_t *) font_face;
|
||||
if (! _cairo_font_face_is_user (font_face)) {
|
||||
if (_cairo_font_face_set_error (font_face, CAIRO_STATUS_FONT_TYPE_MISMATCH))
|
||||
return NULL;
|
||||
}
|
||||
return user_font_face->scaled_font_methods.unicode_to_glyph;
|
||||
}
|
||||
|
|
|
|||
22
src/cairo.h
22
src/cairo.h
|
|
@ -1298,15 +1298,15 @@ typedef cairo_status_t (*cairo_user_scaled_font_render_glyph_func_t) (cairo_scal
|
|||
cairo_t *cr,
|
||||
cairo_text_extents_t *extents);
|
||||
|
||||
typedef cairo_status_t (*cairo_user_scaled_font_unicode_to_glyph_func_t) (cairo_scaled_font_t *scaled_font,
|
||||
unsigned long unicode,
|
||||
unsigned long *glyph_index);
|
||||
|
||||
typedef cairo_status_t (*cairo_user_scaled_font_text_to_glyphs_func_t) (cairo_scaled_font_t *scaled_font,
|
||||
const char *utf8,
|
||||
cairo_glyph_t **glyphs,
|
||||
int *num_glyphs);
|
||||
|
||||
typedef cairo_status_t (*cairo_user_scaled_font_unicode_to_glyph_func_t) (cairo_scaled_font_t *scaled_font,
|
||||
unsigned long unicode,
|
||||
unsigned long *glyph_index);
|
||||
|
||||
/* User-font method setters */
|
||||
|
||||
cairo_public void
|
||||
|
|
@ -1317,14 +1317,14 @@ cairo_public void
|
|||
cairo_user_font_face_set_render_glyph_func (cairo_font_face_t *font_face,
|
||||
cairo_user_scaled_font_render_glyph_func_t render_glyph_func);
|
||||
|
||||
cairo_public void
|
||||
cairo_user_font_face_set_unicode_to_glyph_func (cairo_font_face_t *font_face,
|
||||
cairo_user_scaled_font_unicode_to_glyph_func_t unicode_to_glyph_func);
|
||||
|
||||
cairo_public void
|
||||
cairo_user_font_face_set_text_to_glyphs_func (cairo_font_face_t *font_face,
|
||||
cairo_user_scaled_font_text_to_glyphs_func_t text_to_glyphs_func);
|
||||
|
||||
cairo_public void
|
||||
cairo_user_font_face_set_unicode_to_glyph_func (cairo_font_face_t *font_face,
|
||||
cairo_user_scaled_font_unicode_to_glyph_func_t unicode_to_glyph_func);
|
||||
|
||||
/* User-font method getters */
|
||||
|
||||
cairo_public cairo_user_scaled_font_init_func_t
|
||||
|
|
@ -1333,12 +1333,12 @@ cairo_user_font_face_get_init_func (cairo_font_face_t *font_face);
|
|||
cairo_public cairo_user_scaled_font_render_glyph_func_t
|
||||
cairo_user_font_face_get_render_glyph_func (cairo_font_face_t *font_face);
|
||||
|
||||
cairo_public cairo_user_scaled_font_unicode_to_glyph_func_t
|
||||
cairo_user_font_face_get_unicode_to_glyph_func (cairo_font_face_t *font_face);
|
||||
|
||||
cairo_public cairo_user_scaled_font_text_to_glyphs_func_t
|
||||
cairo_user_font_face_get_text_to_glyphs_func (cairo_font_face_t *font_face);
|
||||
|
||||
cairo_public cairo_user_scaled_font_unicode_to_glyph_func_t
|
||||
cairo_user_font_face_get_unicode_to_glyph_func (cairo_font_face_t *font_face);
|
||||
|
||||
|
||||
/* Query functions */
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue