mirror of
https://github.com/swaywm/sway.git
synced 2026-02-22 01:40:39 -05:00
Reuse parsed PangoFontDescription
Avoids parsing the configured font each time text is rendered.
This commit is contained in:
parent
75605491a5
commit
80e386fd97
11 changed files with 52 additions and 49 deletions
|
|
@ -13,12 +13,12 @@
|
|||
* escaped string to dest if provided.
|
||||
*/
|
||||
size_t escape_markup_text(const char *src, char *dest);
|
||||
PangoLayout *get_pango_layout(cairo_t *cairo, const char *font,
|
||||
PangoLayout *get_pango_layout(cairo_t *cairo, const PangoFontDescription *desc,
|
||||
const char *text, double scale, bool markup);
|
||||
void get_text_size(cairo_t *cairo, const char *font, int *width, int *height,
|
||||
void get_text_size(cairo_t *cairo, const PangoFontDescription *desc, int *width, int *height,
|
||||
int *baseline, double scale, bool markup, const char *fmt, ...);
|
||||
void get_text_metrics(const PangoFontDescription *font, int *height, int *baseline);
|
||||
void render_text(cairo_t *cairo, const char *font,
|
||||
void get_text_metrics(const PangoFontDescription *desc, int *height, int *baseline);
|
||||
void render_text(cairo_t *cairo, PangoFontDescription *desc,
|
||||
double scale, bool markup, const char *fmt, ...);
|
||||
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue