mirror of
https://github.com/fltk/fltk.git
synced 2026-06-05 08:06:35 +08:00
Replicate in branch-1.3-porting a recent change of branch-1.3
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11001 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
@@ -383,6 +383,8 @@ exit_error:
|
|||||||
|
|
||||||
void Fl_GDI_Graphics_Driver::draw(const char* str, int n, int x, int y) {
|
void Fl_GDI_Graphics_Driver::draw(const char* str, int n, int x, int y) {
|
||||||
COLORREF oldColor = SetTextColor(fl_gc, fl_RGB());
|
COLORREF oldColor = SetTextColor(fl_gc, fl_RGB());
|
||||||
|
// avoid crash if no font has been set yet
|
||||||
|
if (!font_descriptor()) this->font(FL_HELVETICA, FL_NORMAL_SIZE);
|
||||||
SelectObject(fl_gc, font_descriptor()->fid);
|
SelectObject(fl_gc, font_descriptor()->fid);
|
||||||
int wn = fl_utf8toUtf16(str, n, wstr, wstr_len);
|
int wn = fl_utf8toUtf16(str, n, wstr, wstr_len);
|
||||||
if(wn >= wstr_len) {
|
if(wn >= wstr_len) {
|
||||||
|
|||||||
Reference in New Issue
Block a user