Re: [Fwd: Rendering Unicode on the Mac]

From: Yung-Fong Tang (
Date: Mon Mar 19 2001 - 16:47:03 EST

Bob Jung wrote:

> My recollection is that Frank's implementation only uses ATSUI as a
> last resort.
> Katsuhiko Momoi wrote:
>> An Opera developer seems to be facing the same problem as Mozilla
>> did. Frank?
>> - Kat
>> ------------------------------------------------------------------------
>> Subject: Rendering Unicode on the Mac
>> Date: Fri, 16 Mar 2001 06:32:26 -0800 (GMT-0800)
>> From: Lars Marius Garshol <>
>> To: "Unicode List" <>
>> I'm trying to help a developer who is trying to render Unicode text on
>> the Mac, using ATSUI. His problem is that the rendering should happen
>> progressively as parts of the document become available, but ATSUI
>> seems to assume that the entire document should be available before
>> rendering starts.
>> His solution has been to make a 'Unicode session' for every little
>> piece of text that is to be rendered, but that solution has led to
>> unacceptable performance, since opening and closing 'Unicode sessions'
>> is not a light-weight operation.
>> Is there anyone here who has run into this problem before and can
>> suggest possible ways to approach it? We could accumulate more text
>> before rendering, but that would hurt progressive display, and doesn't
>> sound like a very good solution.
I did. I hit that two years ago and find out it is very difficult to
port "traditional" application to use ATSUI apis due to the mismatch in
the api model. I decide to give up that due to the following additional
1. ATSUI (in that time, I am not sure the most update version) draw text
in normal size (10-12 pt) differently than QuickDraw and it is very
difficult to read.
2. If I turn on the font fallkback, there are no way I can control the
fallback sequence (in that time, maybe Apple improve it now.) and
therefore the performance is VERY VERY VERY bad in the worst case. For
example, If I try to draw a string of unicode which are all undefined
Unicode (or any string which contains characters that no font in the
system can draw), then ATSUI will try to iterate all fonts in the system
to draw it and it will almost freeze the computer.
3. Worst of all is our code is cross-platform. In order to use ATSUI,
either I change the whole application framework, which is definitely a
NO in our project, or I can do what you did, and the performance is bad.

What I did now is to use TEC and QuickDraw and use ATSUI as the fallback
strategy in a very limited way (only used to draw several characters
that I am sure MacOS have the glyph in the Western fonts)

>> --Lars M.

Frank Yung-Fong Tang
Sr. Technical Manager
Netscape Communications

Tel:650-937-2913 Fax:650-937-5413 AIM:yungfongta

This archive was generated by hypermail 2.1.2 : Tue Jul 10 2001 - 17:21:20 EDT