
I've put a diff that fixes this bug at
http://www.tww.cx/downloads/fontcase.diff
I'd love to say that there must be an easier way but instead I'd like to say that the person that defined the C++ string class without case-changing functions should themselves be strung up!
The method used needs to be checked by someone who actually knows C++ to see if it will handle non-ASCII font names. I don't have any such fonts to test it with and I'm not sure enough about how C++'s toupper function works on unicode to even guess whether it will work or not.
The diff file also adds some comments to toolbox.cpp. Thanks to Gail for pointing me in the direction of that file, BTW, it would have taken me even longer to come up with a fix without her quick reply to my query.
Finally, the diff file has some changes to a pair of makefiles which are a mystery to me; I never touched them, Gov'nor!
Thomas

Thanks Thomas!
All: Before I look at the patch, I notice libgdl/makefile and pedro/makefile in it, and I also always see them changed in my own diffs whenever I run configure. Could someone please fix this? It's very annoying. Also, another thing long overdue to fix is the double inclusion of libgeom which make complains about on each run. Anyone?
On Nov 9, 2007 12:09 PM, Thomas Worthington <tww@...1737...> wrote:
I've put a diff that fixes this bug at
http://www.tww.cx/downloads/fontcase.diff
I'd love to say that there must be an easier way but instead I'd like to say that the person that defined the C++ string class without case-changing functions should themselves be strung up!
The method used needs to be checked by someone who actually knows C++ to see if it will handle non-ASCII font names. I don't have any such fonts to test it with and I'm not sure enough about how C++'s toupper function works on unicode to even guess whether it will work or not.
The diff file also adds some comments to toolbox.cpp. Thanks to Gail for pointing me in the direction of that file, BTW, it would have taken me even longer to come up with a fix without her quick reply to my query.
Finally, the diff file has some changes to a pair of makefiles which are a mystery to me; I never touched them, Gov'nor!
Thomas

On Nov 9, 2007, at 8:09 AM, Thomas Worthington wrote:
I'd love to say that there must be an easier way but instead I'd like to say that the person that defined the C++ string class without case-changing functions should themselves be strung up!
Oh, well that point is very simple. There is no way for a string in and of itself to change its case.
Instead you need some language aware locale-sensitive thing to do that. In some cases even the number of characters will change as you convert.

On Fri, 9 Nov 2007 09:26:11 -0800, "Jon A. Cruz" <jon@...18...> wrote:
Instead you need some language aware locale-sensitive thing to do that.
Along those lines, it's important to note that even the notion of which characters are upper/lower-case versions of each other can vary with locale. Case-insensitivity is a tough nut to entirely crack.
-mental

By the way, that code which looks for the font name is called A LOT. While drawing rectangles, selecting menus. Bascially all the time. Is that supposed to happen? It seems excessive but I got a bit lost in the complexity of where the calls were coming from.
TWW
participants (5)
-
bulia byak
-
Gail Carmichael
-
Jon A. Cruz
-
MenTaLguY
-
Thomas Worthington