From 529927e0b8b712a4c6fede76dd91c68b8de8d3b4 Mon Sep 17 00:00:00 2001 From: Manolo Gouy Date: Sat, 29 Aug 2015 07:04:08 +0000 Subject: [PATCH] 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 --- src/gl_draw.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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));