Additional check in Fl_Xlib_Graphics_Driver::font_unscaled(Fl_Font, Fl_Fontsize) to recognize if current font is unchanged.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12246 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
Manolo Gouy 2017-06-01 15:23:26 +00:00
parent 90efebb97e
commit 0960d07315

View File

@ -1190,7 +1190,7 @@ void Fl_Xlib_Graphics_Driver::font_unscaled(Fl_Font fnum, Fl_Fontsize size) {
Fl_Graphics_Driver::font(0, 0); Fl_Graphics_Driver::font(0, 0);
return; return;
} }
if (this->Fl_Graphics_Driver::font() == fnum && this->size_unscaled() == size) return; if (this->Fl_Graphics_Driver::font() == fnum && this->size_unscaled() == size && this->font_descriptor()) return;
fl_xft_font(this, fnum, size, 0); fl_xft_font(this, fnum, size, 0);
init_built_in_fonts(); init_built_in_fonts();
if (pfd_) pango_font_description_free(pfd_); if (pfd_) pango_font_description_free(pfd_);