[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: example ligature code.
From: |
David Tooke |
Subject: |
Re: example ligature code. |
Date: |
Fri, 21 Jul 2000 14:22:16 -0500 |
Thanks,
I had previously try ftstrtto. However, after David suggested it again, I
re-tried it and realised that I hadn't specified a script of arab, so all
the arab ligatures were not be applied.
Once I entered the right parameters, then it worked great.
I was still having a problem with my program, though. I was passing the
right parameters but it still wasn't working.
I finally figured out, it was because I applied the Unicode Bidirectional
Algorithm BEFORE calling TT_GSUB_Apply_String. This re-orders the string
into visual order; however the ligatures mappings seem to require the
string to be in logical order.
Thanks again for your prompt replies....no doubt I'll be back in touch when
I am trying to figure out how to use GPOS.
David
address@hidden
----- Original Message -----
From: "Werner LEMBERG" <address@hidden>
To: <address@hidden>
Cc: <address@hidden>; <address@hidden>
Sent: Friday, July 21, 2000 12:16 PM
Subject: Re: example ligature code.
>
> > > Does anyone have any example code demonstrating how to use the
> > > GSUB extensions to handle ligatures? I am rendering some arabic
> > > using the arial font. The text looks like it should have a
> > > ligature substitution; but none is happening even though I am
> > > using the "liga" feature.
> > >
> > > I know I am doing something wrong, but I would grateful for any
> > > assistance.
> > >
> > I believe that you need to use other features like "fina", etc. for
> > arabic. Werner and Antoine would probably be able to answer more
> > precisely on this.
>
> As David wrote, please check ftstrtto. To make ligatures work in
> Arabic it is necessary to activate all tables like this (assuming that
> arab.utf8 contains a small Arabic string in UTF-8 encoding):
>
> ftstrtto -s arab -f init -f medi -f fina -f liga \
> -x -u 20 arial.ttf - < arab.utf8
>
> Reason: `liga' is the last OpenType feature applied (the first is
> `init', then `medi' and `fina') and works only after the three other
> tables have adjusted the glyph indices since ligatures depend on the
> position within the Arabic word (e.g. whether it is final or initial).
>
> ftstrtto uses the file arabic.c which assigns Arabic script properties
> to the input characters, according to the algorithm given in the
> Unicode book.
>
> Attached is a sample input file and an image showing the result using
> arial.ttf (version 2.76).
>
>
> Werner
>