Added code to clear the current font cache when the font face is changed. Now for OS X and X11 as well.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@5421 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
parent
caa6fd1ff2
commit
8c94b01142
@ -264,6 +264,11 @@ int fl_font_ = 0;
|
|||||||
int fl_size_ = 0;
|
int fl_size_ = 0;
|
||||||
|
|
||||||
void fl_font(int fnum, int size) {
|
void fl_font(int fnum, int size) {
|
||||||
|
if (fnum==-1) {
|
||||||
|
fl_font_ = 0;
|
||||||
|
fl_size_ = 0;
|
||||||
|
return;
|
||||||
|
}
|
||||||
fl_font_ = fnum;
|
fl_font_ = fnum;
|
||||||
fl_size_ = size;
|
fl_size_ = size;
|
||||||
fl_font(find(fnum, size));
|
fl_font(find(fnum, size));
|
||||||
|
@ -200,6 +200,10 @@ void *fl_xftfont = 0;
|
|||||||
static GC font_gc;
|
static GC font_gc;
|
||||||
|
|
||||||
void fl_font(int fnum, int size) {
|
void fl_font(int fnum, int size) {
|
||||||
|
if (fnum==-1) {
|
||||||
|
fl_font_ = 0; fl_size_ = 0;
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (fnum == fl_font_ && size == fl_size_) return;
|
if (fnum == fl_font_ && size == fl_size_) return;
|
||||||
fl_font_ = fnum; fl_size_ = size;
|
fl_font_ = fnum; fl_size_ = size;
|
||||||
Fl_FontSize* f = find(fnum, size);
|
Fl_FontSize* f = find(fnum, size);
|
||||||
|
Loading…
Reference in New Issue
Block a user