changeset 2123:028042a7e3f8

for small-caps, make use of fltk-1.3's fl_toupper
author corvid <corvid@lavabit.com>
date Mo, 11 Jul 2011 18:17:21 +0000
parents 8d3f28ad46c4
children e3701d456f60
files dw/fltkplatform.cc
diffstat 1 files changed, 4 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/dw/fltkplatform.cc	Mo Jul 11 14:03:47 2011 -0400
+++ b/dw/fltkplatform.cc	Mo Jul 11 18:17:21 2011 +0000
@@ -18,8 +18,6 @@
  */
 
 #include <stdio.h>
-#include <wchar.h>
-#include <wctype.h>
 
 #include "../lout/msg.h"
 #include "fltkcore.hh"
@@ -516,7 +514,7 @@
                              int len)
 {
    char chbuf[4];
-   wchar_t wc, wcu;
+   int c, cu;
    int width = 0;
    FltkFont *ff = (FltkFont*) font;
    int curr = 0, next = 0, nb;
@@ -525,15 +523,15 @@
       int sc_fontsize = lout::misc::roundInt(ff->size * 0.78);
       for (curr = 0; next < len; curr = next) {
          next = nextGlyph(text, curr);
-         wc = fl_utf8decode(text + curr, text + next, &nb);
-         if ((wcu = towupper(wc)) == wc) {
+         c = fl_utf8decode(text + curr, text + next, &nb);
+         if ((cu = fl_toupper(c)) == c) {
             /* already uppercase, just draw the character */
             fl_font(ff->font, ff->size);
             width += font->letterSpacing;
             width += (int)fl_width(text + curr, next - curr);
          } else {
             /* make utf8 string for converted char */
-            nb = fl_utf8encode(wcu, chbuf);
+            nb = fl_utf8encode(cu, chbuf);
             fl_font(ff->font, sc_fontsize);
             width += font->letterSpacing;
             width += (int)fl_width(chbuf, nb);