upipe-freetype/upipe_freetype.h header reference
freetype2 based text renderer More
Header inclusion [link]
Members [link]
Types [link]
- struct upipe_freetype_bbox
- enum upipe_freetype_command
- struct upipe_freetype_metrics
- enum uprobe_freetype_event
Functions [link]
- int upipe_freetype_get_advance(struct upipe *upipe, const char *str, uint64_t *advance_p, uint64_t *units_per_EM_p)
- int upipe_freetype_get_bbox(struct upipe *upipe, const char *str, struct upipe_freetype_bbox *bbox_p)
- int upipe_freetype_get_metrics(struct upipe *upipe, struct upipe_freetype_metrics *metrics)
- int upipe_freetype_get_text(struct upipe *upipe, const char **text_p)
- struct upipe_mgr * upipe_freetype_mgr_alloc(void )
- int upipe_freetype_set_baseline(struct upipe *upipe, int64_t xoff, int64_t yoff)
- int upipe_freetype_set_pixel_size(struct upipe *upipe, unsigned int pixel_size)
Description [link]
freetype2 based text renderer
Members detail [link]
#define UPIPE_FREETYPE_SIGNATURE [link]
This macro is declared in upipe-freetype/upipe_freetype.h source file, line 40.
#define _UPIPE_FREETYPE_UPIPE_FREETYPE_H_ [link]
This macro is declared in upipe-freetype/upipe_freetype.h source file, line 32.
struct upipe_freetype_bbox [link]
This struct is declared in upipe-freetype/upipe_freetype.h source file, line 72.
This struct describes a string bounding box.
enum upipe_freetype_command [link]
This enum is declared in upipe-freetype/upipe_freetype.h source file, line 53.
This enum enumerates the freetype pipe commands.
| Identifier | Value | Description |
|---|---|---|
| UPIPE_FREETYPE_SENTINEL | 0x8000 | sentinel |
| UPIPE_FREETYPE_GET_BBOX | 1 | get the string bounding box (const char *, struct upipe_freetype_bbox *) |
| UPIPE_FREETYPE_SET_PIXEL_SIZE | 2 | set the freetype pixel size (unsigned) |
| UPIPE_FREETYPE_SET_BASELINE | 3 | set the baseline position in the buffer (int64_t, int64_t) |
| UPIPE_FREETYPE_GET_TEXT | 4 | get the current text (const char **) |
| UPIPE_FREETYPE_GET_METRICS | 5 | get the font global metrics (struct upipe_freetype_metrics *) |
| UPIPE_FREETYPE_GET_ADVANCE | 6 | get a string advance value (const char *, uint64_t *, uint64_t *) |
int upipe_freetype_get_advance(struct upipe *upipe, const char *str, uint64_t *advance_p, uint64_t *units_per_EM_p) [link]
This function is declared in upipe-freetype/upipe_freetype.h source file, line 136.
This function gets the advance value for a string.
Parameter list:
- upipe: description structure of the pipe
- str: string to get the advance value
- advance_p: filled with the compute advance value
- units_per_EM_p: filled with the units per EM of the font
The return value is an error code
int upipe_freetype_get_bbox(struct upipe *upipe, const char *str, struct upipe_freetype_bbox *bbox_p) [link]
This function is declared in upipe-freetype/upipe_freetype.h source file, line 93.
This function gets the bounding box for a string at the current pixel size.
Parameter list:
- upipe: description structure of the pipe
- str: a string
- bbox_p: filled with the x and y min and max of the rendered string
The return value is an error code
int upipe_freetype_get_metrics(struct upipe *upipe, struct upipe_freetype_metrics *metrics) [link]
This function is declared in upipe-freetype/upipe_freetype.h source file, line 120.
This function gets the global font metrics.
Parameter list:
- upipe: description structure of the pipe
- metrics: filled with the string metrics
The return value is an error code
This function is declared in upipe-freetype/upipe_freetype.h source file, line 177.
This function gets the current text.
Parameter list:
- upipe: description structure of the pipe
- text_p: filled with the current text
The return value is an error code
struct upipe_freetype_metrics [link]
This struct is declared in upipe-freetype/upipe_freetype.h source file, line 99.
This struct describes the global font metrics.
| Field | Description |
|---|---|
| int units_per_EM; | |
| struct <anonymous> { | |
| long min; | |
| long max; | |
| } x; | |
| struct <anonymous> { | |
| long min; | |
| long max; | |
| } y; |
This function is declared in upipe-freetype/upipe_freetype.h source file, line 186.
This function returns the freetype pipes manager.
The return value is a pointer to the freetype pipes manager
This function is declared in upipe-freetype/upipe_freetype.h source file, line 164.
This function sets the baseline start position.
Parameter list:
- upipe: description structure of the pipe
- xoff: offset from the left of the buffer
- yoff: offset from the top of the buffer
The return value is an error code
This function is declared in upipe-freetype/upipe_freetype.h source file, line 150.
This function sets the freetype pixel size.
Parameter list:
- upipe: description structure of the pipe
- pixel_size: pixel size to set
The return value is an error code
enum uprobe_freetype_event [link]
This enum is declared in upipe-freetype/upipe_freetype.h source file, line 44.
This enum enumerates the freetype probe events.
| Identifier | Value | Description |
|---|---|---|
| UPROBE_FREETYPE_SENTINEL | 0x8000 | sentinel |
| UPROBE_FREETYPE_NEW_TEXT | 1 | new input text received (const char *) |