|
Picasso API
2.8
|
Data Structures | |
| struct | _ps_font_info |
| A structure that contains font information. More... | |
Typedefs | |
| typedef enum _ps_charset | ps_charset |
| Charset for a font. | |
| typedef enum _ps_font_weight | ps_font_weight |
| Font weight. | |
| typedef struct _ps_font_info | ps_font_info |
| A structure that contains font information. | |
Enumerations | |
| enum | _ps_charset { CHARSET_ANSI, CHARSET_UNICODE } |
| Charset for a font. More... | |
| enum | _ps_font_weight { FONT_WEIGHT_REGULAR = 400, FONT_WEIGHT_MEDIUM = 500, FONT_WEIGHT_BOLD = 700, FONT_WEIGHT_HEAVY = 900 } |
| Font weight. More... | |
Functions | |
| PEXPORT ps_font *PICAPI | ps_font_create (const char *name, ps_charset charset, float size, int32_t weight, ps_bool italic) |
| Create a font object using the given parameters. More... | |
| PEXPORT ps_font *PICAPI | ps_font_create_copy (const ps_font *font) |
| Create a copy from an existing font object. More... | |
| PEXPORT ps_font *PICAPI | ps_font_ref (ps_font *font) |
| Increases the reference count of the font by 1. More... | |
| PEXPORT void PICAPI | ps_font_unref (ps_font *font) |
| Decrements the reference count for the font object. If the reference count on the font falls to 0, the font is freed. More... | |
| PEXPORT void PICAPI | ps_font_set_size (ps_font *font, float size) |
| Set size for a font object. More... | |
| PEXPORT void PICAPI | ps_font_set_weight (ps_font *font, int32_t weight) |
| Set weight for a font object. More... | |
| PEXPORT void PICAPI | ps_font_set_italic (ps_font *font, ps_bool italic) |
| Set italic for a font object. More... | |
| PEXPORT void PICAPI | ps_font_set_charset (ps_font *font, ps_charset charset) |
| Set charset for a font object. More... | |
| PEXPORT void PICAPI | ps_font_set_hint (ps_font *font, ps_bool hint) |
| Set hiting for a font object. More... | |
| PEXPORT void PICAPI | ps_font_set_flip (ps_font *font, ps_bool flip) |
| Set flip for a font object. More... | |
| PEXPORT ps_bool PICAPI | ps_get_font_info (ps_context *ctx, ps_font_info *info) |
| Return the font information from the graphics context. More... | |
| PEXPORT ps_font *PICAPI | ps_set_font (ps_context *ctx, const ps_font *font) |
| Set a new font to graphics context. More... | |
| enum _ps_charset |
| enum _ps_font_weight |
| ps_font * ps_font_create | ( | const char * | name, |
| ps_charset | charset, | ||
| float | size, | ||
| int32_t | weight, | ||
| ps_bool | italic | ||
| ) |
Create a font object using the given parameters.
| name | The font family name. |
| charset | The charset type. |
| size | The font size. |
| weight | The font weight. |
| italic | Whether or not it is italic. |
Create a copy from an existing font object.
| font | Pointer to an existing font object. |
Increases the reference count of the font by 1.
| font | Pointer to an existing font object. |
| void ps_font_set_charset | ( | ps_font * | font, |
| ps_charset | charset | ||
| ) |
Set charset for a font object.
| font | Pointer to an existing font object. |
| charset | Charset for the font. |
Set flip for a font object.
| font | Pointer to an existing font object. |
| flip | Whether or not flip y for the font. (False default) |
Set hiting for a font object.
| font | Pointer to an existing font object. |
| hint | Whether or not auto hiting for the font. (True default) |
Set italic for a font object.
| font | Pointer to an existing font object. |
| italic | Whether or not italic for the font. (False default) |
| void ps_font_set_size | ( | ps_font * | font, |
| float | size | ||
| ) |
Set size for a font object.
| font | Pointer to an existing font object. |
| size | Size for the font. |
| void ps_font_set_weight | ( | ps_font * | font, |
| int32_t | weight | ||
| ) |
Set weight for a font object.
| font | Pointer to an existing font object. |
| weight | Weight for the font. |
| void ps_font_unref | ( | ps_font * | font | ) |
Decrements the reference count for the font object. If the reference count on the font falls to 0, the font is freed.
| font | Pointer to an existing font object. |
| ps_bool ps_get_font_info | ( | ps_context * | ctx, |
| ps_font_info * | info | ||
| ) |
Return the font information from the graphics context.
| ctx | Pointer to an existing context object. |
| info | Pointer to a structure to receiving the font information. |
| ps_font * ps_set_font | ( | ps_context * | ctx, |
| const ps_font * | font | ||
| ) |
Set a new font to graphics context.
| ctx | Pointer to an existing context object. |
| font | The new font to be set. |
1.8.17