mirror of
https://github.com/swaywm/sway.git
synced 2026-02-28 01:41:02 -05:00
Reject font values that are invalid for pango
Use pango to parse font configuration early, and reject the command as invalid if the value is invalid for pango. Since we're already parsing the font into a `PangoFontDescription`, keep that instance around and avoid re-parsing the font each time we render text. Fixes: https://github.com/swaywm/sway/issues/6805
This commit is contained in:
parent
9e8866ae20
commit
75605491a5
5 changed files with 30 additions and 6 deletions
|
|
@ -17,7 +17,7 @@ PangoLayout *get_pango_layout(cairo_t *cairo, const char *font,
|
|||
const char *text, double scale, bool markup);
|
||||
void get_text_size(cairo_t *cairo, const char *font, int *width, int *height,
|
||||
int *baseline, double scale, bool markup, const char *fmt, ...);
|
||||
void get_text_metrics(const char *font, int *height, int *baseline);
|
||||
void get_text_metrics(const PangoFontDescription *font, int *height, int *baseline);
|
||||
void render_text(cairo_t *cairo, const char *font,
|
||||
double scale, bool markup, const char *fmt, ...);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue