Unicode mixd fonts Windows

Devin Asay devin_asay at byu.edu
Wed May 11 10:30:26 EDT 2005


On May 10, 2005, at 5:08 PM, pkc wrote:

> Many thanks, Devin, for the suggestion. I was very attracted to it 
> because the client I have built displays its English text entirely in 
> HTML.  I also thought that displaying Chinse characters in such a 
> field should work across platforms.  In practice, the problmes I had 
> were that setting text properties for the field tended to reset font 
> properties, and vice versa.  I did not finish experimenting with the 
> order of these commands, so I cannot be sure that there was no way to 
> get them to work.
>
> So far following the suggestions you made regarding the use of 
> htmlText has not produced accurate results for me on Macintosh 
> (though, ironies being what they are, if I were working in Windows 
> maybe it would look very successful to me).  there are a few things I 
> think I still don't undrstand about this:
>
> 1) are you referring to fields showing mixed fonts? Some in English 
> and some in Chinese or other Asian scripts?  On reading the account it 
> seems to me it might refer to whole fields in a single Unicode font.

I've used the techniques with both mixed and straight Chinese. It is 
true that font information can become lost or scrambled in the process, 
so instead of worrying about the textFont of the field, I used the 
embedded font tags (HTML purists, avert your eyes) to supply the name 
of the best font for the platform. I simply checked the platform() 
function and replaced the font name in the font tags of the htmlText 
with the name of the font I found to display best on Windows or Mac 
respectively.
>
> 2) In our case, the files are already created, as it happened in 
> Windows, but with Unifont code for the Chinese characters.  They files 
> go between a server and a client, so they go in ascii format (as I 
> say, in OS X this works perfectly). The characters and English text 
> have to be recreated at the user end.  It seems to me that this 
> shhould make no difference, if the files are put into htmlText before 
> being sent and then put back into htmlText once they are received from 
> the client, does that seem right?

Yes, that's been my experience.

I should also note that one of my students successfully used UTF-8 
encoded documents to accurately display Arabic in Rev fields. (Dar also 
mentioned the UTF-8 route in another post.) But as this was a Mac OS 
X-based project, I don't know if it would make the transition to 
Windows--I have no reason to think it wouldn't. I just don't have as 
much experience with this technique.

I hope I've understood your problem correctly and responded in a 
helpful way.

Devin

Devin Asay
Humanities Technology and Research Support Center
Brigham Young University



More information about the use-livecode mailing list