| 1 |
|
| 2 |
@c %start of fragment |
| 3 |
|
| 4 |
@deffn Function cairo-user-font-face-create @result{}@tie{} (@var{ret}@tie{}@code{<cairo-font-face-t >}) |
| 5 |
Creates a new user font-face. |
| 6 |
|
| 7 |
Use the setter functions to associate callbacks with the returned user |
| 8 |
font. The only mandatory callback is render_glyph. |
| 9 |
|
| 10 |
After the font-face is created, the user can attach arbitrary data (the |
| 11 |
actual font data) to it using @code{cairo-font-face-set-user-data} and |
| 12 |
access it from the user-font callbacks by using |
| 13 |
@code{cairo-scaled-font-get-font-face} followed by |
| 14 |
@code{cairo-font-face-get-user-data}. |
| 15 |
|
| 16 |
@table @var |
| 17 |
@item ret |
| 18 |
a newly created @code{<cairo-font-face-t>}. Free with |
| 19 |
@code{cairo-font-face-destroy} when you are done using it. |
| 20 |
|
| 21 |
@end table |
| 22 |
|
| 23 |
Since 1.8 |
| 24 |
|
| 25 |
@end deffn |
| 26 |
|
| 27 |
@deffn Function cairo-user-font-face-set-init-func (@var{font-face}@tie{}@code{<cairo-font-face-t>}) (@var{init-func}@tie{}@code{<cairo-user-scaled-font-init-func-t>}) |
| 28 |
Sets the scaled-font initialization function of a user-font. See |
| 29 |
@code{<cairo-user-scaled-font-init-func-t>} for details of how the |
| 30 |
callback works. |
| 31 |
|
| 32 |
The font-face should not be immutable or a |
| 33 |
@samp{CAIRO_STATUS_USER_FONT_IMMUTABLE} error will occur. A user |
| 34 |
font-face is immutable as soon as a scaled-font is created from it. |
| 35 |
|
| 36 |
@table @var |
| 37 |
@item font-face |
| 38 |
A user font face |
| 39 |
|
| 40 |
@item init-func |
| 41 |
The init callback, or @samp{@code{#f}} |
| 42 |
|
| 43 |
@end table |
| 44 |
|
| 45 |
Since 1.8 |
| 46 |
|
| 47 |
@end deffn |
| 48 |
|
| 49 |
|
| 50 |
@c %end of fragment |