diff options
| author | ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> | 2019-05-30 15:28:08 +0200 |
|---|---|---|
| committer | ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> | 2019-05-30 15:28:08 +0200 |
| commit | e6bccc081f651a87bba58235e8c28c3fdfae5607 (patch) | |
| tree | 17457740d8b4c53959565f9f2a011fab89dc2388 /src/drivers/Xlib/Fl_Xlib_Graphics_Driver.H | |
| parent | 7c4239915f818ff26309ed6a638871ea284a82e9 (diff) | |
X11+Pango: call pango_font_description_from_string() less often
Previously, each time fl_font(fnum, fsize) was called, functions
pango_font_description_free() and pango_font_description_from_string()
would be called.
Now, pango_font_description_from_string() is called only once, the first time
an Fl_Font is used.
Diffstat (limited to 'src/drivers/Xlib/Fl_Xlib_Graphics_Driver.H')
| -rw-r--r-- | src/drivers/Xlib/Fl_Xlib_Graphics_Driver.H | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/drivers/Xlib/Fl_Xlib_Graphics_Driver.H b/src/drivers/Xlib/Fl_Xlib_Graphics_Driver.H index 66b47edb0..784bc8d02 100644 --- a/src/drivers/Xlib/Fl_Xlib_Graphics_Driver.H +++ b/src/drivers/Xlib/Fl_Xlib_Graphics_Driver.H @@ -84,7 +84,8 @@ protected: static PangoContext *pctxt_; static PangoFontMap *pfmap_; static PangoLayout *playout_; - PangoFontDescription *pfd_; + static PangoFontDescription **pfd_array; // one array element for each Fl_Font + static int pfd_array_length; void do_draw(int from_right, const char *str, int n, int x, int y); static PangoContext *context(); static void init_built_in_fonts(); |
