Unicode display on Linux has been a BIG headache for me for about 3 years with no solution in sight.

The answer, perhaps inevitably, turns out to be very simple indeed.

-----------------------------------------------------------------------

The Problem.

I have a textField called "OOTPUT" and add incremental unicode characters to it like this:

set the useUnicode to true
set the unicodeText of fld "OOTPUT" to the unicodeText of fld "OOTPUT" & numToChar(XXXXX)

where 'XXXXX' is a unicode address.

On Macintosh and Windows XP [ see rampant road rage about what happens on Windows Vista, 7 and 8 elsewhere ] that works just as it should, and as each char is appended to the textfield end-users can see that.

On ALL the Linux systems I have tried that yields an - apparently - empty textField.

-----------------------------------------------------------------------

The Solution.

The textField isn't empty, just setting the chars to transparent, or the same as the backgroundColor of the textField.

So, one has to do this:

set the useUnicode to true
set the unicodeText of fld "OOTPUT" to the unicodeText of fld "OOTPUT" & numToChar(XXXXX)
set the textColor of fld "OOTPUT" to "black"

and this has to be done EVERY TIME a new char is appended.

Don't ask me why, because I don't know.

-------------------------------------------------------------------------

Of course this would not have caused me 3 years of teeth-gnashing had it either been documented in the Documentation, or, had one of the supposedly "great" Unicode experts who strut their funky stuff on the Use-List and the Forums been able
to point this out.

------------------------------------------------------------------------
------------------------------------------------------------------------

While I'm "on a roll" I feel like sounding off again about the Windows fiasco: it is a fiasco in several respects;

1. It really mucks up Unicode display,

and

2. Nobody on either the Use-List or the Forums seems to give a damn about it except myself.

---------------------------------------------------------------------

The Problem.

Windows Vista, 7 and 8 substitute Windows system fonts in Unicode textFields.

While this makes an aesthetic pig's breakfast out of things that is NOT the most besetting problem.

The main problem comes about when a Livecode standalone leverages a specialist font containing non-standard Unicode characters
stored in the Public Use Area:

Windows merrily substitutes all the Unicode chars it can substitute and leaves any non-standard chars displayed
in the specialist font, resulting in a foul aesthetic mismatch.

Windows also imposes its own font kerning rules, over-riding any kerning rules et up within an LC standalone ruining
font display.

--------------------------------------------------------------------

The Solution.

Dunno. Boycott Microsoft. Send Steve Ballmer a yellow rubber duck with "forever yours" written on its bottom.

--------------------------------------------------------------------

Richmond.

_______________________________________________
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Reply via email to