Author: ianmacarthur
Date: 2011-05-10 02:27:18 -0700 (Tue, 10 May 2011)
New Revision: 8643
Log:
Pushing this as a possible fix for STR #2622.
This might not be correct (though I think it is) but should be no worse than
the current mess I made...
Please test with as many different win32/64 compilers as possible and let me
know!
Modified:
branches/branch-1.3/src/fl_font_win32.cxx
Modified: branches/branch-1.3/src/fl_font_win32.cxx
===================================================================
--- branches/branch-1.3/src/fl_font_win32.cxx 2011-05-07 13:45:42 UTC (rev
8642)
+++ branches/branch-1.3/src/fl_font_win32.cxx 2011-05-10 09:27:18 UTC (rev
8643)
@@ -282,7 +282,6 @@
}
static unsigned short *ext_buff = NULL; // UTF-16 converted version of input
UTF-8 string
- static WCHAR *c_buff = NULL; // glyph class array (if needed)
static WORD *w_buff = NULL; // glyph indices array
static unsigned wc_len = 0; // current string buffer dimensions
static const MAT2 matrix = { { 0, 1 }, { 0, 0 }, { 0, 0 }, { 0, 1 } }; //
identity mat for GetGlyphOutlineW
@@ -315,11 +314,9 @@
if(len >= wc_len) {
if(ext_buff) {delete [] ext_buff;}
if(w_buff) {delete [] w_buff;}
- if(c_buff) {delete [] c_buff;}
wc_len = len + 64;
ext_buff = new unsigned short[wc_len];
w_buff = new WORD[wc_len];
- c_buff = new WCHAR[wc_len];
len = fl_utf8toUtf16(c, n, ext_buff, wc_len);
}
SelectObject(gc, fl_fontsize->fid);
@@ -339,10 +336,8 @@
if (has_surrogates) {
// GetGlyphIndices will not work - use GetCharacterPlacementW() instead
GCP_RESULTSW gcp_res;
- memset(c_buff, 0, (sizeof(WCHAR) * wc_len));
memset(w_buff, 0, (sizeof(WORD) * wc_len));
memset(&gcp_res, 0, sizeof(GCP_RESULTSW));
- gcp_res.lpClass = c_buff;
gcp_res.lpGlyphs = (LPWSTR)w_buff;
gcp_res.nGlyphs = wc_len;
gcp_res.lStructSize = sizeof(gcp_res);
_______________________________________________
fltk-commit mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk-commit