Hi,
Thanks for the helpful reply.
After more investigation, it turns out that it does work with Core
Text - I'd managed to get the font system confused by attempting to
use the Apple font tools to create 'morx' tables for the fonts (with
no success). Converting our app to use Core Text probably won't be
trivial: we're getting the glyph outlines directly to do our own
font rendering. I think I can maybe do it by leaving all the rest of
our ATSUI code in place, and then creating a CTFont from the
ATSFontRef we have.
A better solution in the short term would be for us to be able to
convert the problematic fonts: there are only a few of them, and
converting them would keep our customers quiet until we can spend
the time to do the Core Text conversion. I've tried using
ftxanalyzer and ftxenhancer to create a morx table for the fonts,
adding the "magic universal MIF" and the MIF from a working TrueType
Arabic font, but to no effect. I've tried removing the GSUB/GPOS/
GDEF tables from the font in case they are taking precedence, but
that doesn't work either. Am I barking up the wrong tree with this,
or could this actually work?
Jerry
On 1 Nov 2007, at 15:49, Daniel Fenwick wrote:
Well, first off, ATSUI, and MLTE which uses ATSUI, does not support
the OpenType Arabic shaping engine (it would have been great to get
into ATSUI for Leopard but... as I explained at the last WWDC,
ATSUI is actually a very old technology that is getting very
difficult to shim new technology into so we are strongly advocating
developers use Cocoa and/or CoreText moving forward). The TextEdit
app as you noted does do OpenType Arabic shaping which is done
solely through CoreText. So really CoreText is the ticket here and
can be used in a Carbon or Cocoa app (it has toll free bridgeable
objects with NS). It also will retrieve the glyph outlines which
was a developer request at WWDC '07 that allowed more apps to
switch from ATSUI.
So I surprised your layout is not working with CoreText. Could you
please send me some example code and the font that you are relying
upon? It should definitely work if it works in TextEdit and I've
tested very complicated Arabic OpenType fonts using CoreText with
positive results.
Dan Fenwick
On Nov 1, 2007, at 5:58 AM, Jerry wrote:
We have customers who are using OpenType Arabic fonts, but find
that the contextual form substitution does not happen on the Mac.
This is because OS X didn't support the OpenType tables which do
the substitution. When I asked about this on this lists
previously, I was told that full support would be in Leopard.
Well, Leopard has arrived, and the customers are complaining
already. It seems that these fonts now work correctly in TextEdit,
but nowhere else. I've tried using them in MLTE, ATSUI code and
Core Text code and have been unable to get contextual forms to
work. I've also tried using ftxanalyzer/ftxenhancer to create
'morx' tables for the fonts with no success. I've tried turning on
every typographical feature I can think of in ATSUI to no effect.
Does anyone have any ideas on this? Since the fonts now work
correctly in Leopard's TextEdit, OS X can do it, but how do I draw
Arabic text in my Carbon application with contextual form
substitution? (Creating an offscreen NSTextView is not an option
as we need to do our own font rendering using glyph outlines,
currently obtained from ATSUI).
Jerry