summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorManolo Gouy <Manolo>2015-08-29 07:04:08 +0000
committerManolo Gouy <Manolo>2015-08-29 07:04:08 +0000
commit529927e0b8b712a4c6fede76dd91c68b8de8d3b4 (patch)
tree64ab952b8fcb2699d982e3c559c14773978cfaf0 /src
parent5ea322679cdc60c147b53c66917143b3d5b4a559 (diff)
Fixed bug in Mac OS version of gl_draw() that could produce truncated strings.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10847 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src')
-rw-r--r--src/gl_draw.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gl_draw.cxx b/src/gl_draw.cxx
index e936147f2..40b0aa185 100644
--- a/src/gl_draw.cxx
+++ b/src/gl_draw.cxx
@@ -446,6 +446,7 @@ int gl_texture_fifo::compute_texture(const char* str, int n)
memcpy(fifo[current].utf8, str, n);
fifo[current].utf8[n] = 0;
fifo[current].width = 0, fifo[current].height = 0;
+ fl_graphics_driver->font_descriptor(gl_fontsize);
fl_measure(fifo[current].utf8, fifo[current].width, fifo[current].height, 0);
fifo[current].width *= gl_scale;
fifo[current].height *= gl_scale;
@@ -456,7 +457,6 @@ int gl_texture_fifo::compute_texture(const char* str, int n)
CGContextRef save_gc = fl_gc;
fl_gc = CGBitmapContextCreate(base, fifo[current].width, fifo[current].height, 8, fifo[current].width*4, lut, kCGImageAlphaPremultipliedLast);
CGColorSpaceRelease(lut);
- fl_graphics_driver->font_descriptor(gl_fontsize);
GLfloat colors[4];
glGetFloatv(GL_CURRENT_COLOR, colors);
fl_color((uchar)(colors[0]*255), (uchar)(colors[1]*255), (uchar)(colors[2]*255));