FontLab Forum
2012-02-09, 03:57:00 *
Welcome, Guest. Please login or register.

Login with username, password and session length
News: Welcome to the FontLab forum, read how to use it! Update: Archives from old MSN forums are now available on our forum.
 
   Home   Help Search Calendar Downloads Tags Login Register  
Del.icio.us Digg FURL FaceBook Stumble Upon Reddit SlashDot

Pages: [1]
  Print  
Author Topic: Puzzling problem with CALT feature.  (Read 1899 times)
ArchivePoster
Guest
« on: 2008-11-24, 17:17:00 »

Posted by: paddy
         
Hi,
I am currently building an arabic font with a number of contextual alternates lookups.
In some of the lookups, I use groups as substitution targets and/or context.

All my lookups and groups seem to follow the appropriate syntax; the font compiles just fine.
However the "substitution behaviour" of those lookups which use groups (instead of a list of individual substitutions) is completely erratic. Per ex in a lookup where I have:

< Group1a > -> < Group1b > in the context of being followed by < Group99 >

in which the elements of Group1a are: A and B (in that order)
the elements of Group1b are: A.alt  and B.alt (in that order)

We would normally expect A to be replaced with A.alt  and B with B.alt

however it is the opposite which is happening i.e. A is replaced with B.alt and B is replaced with A.alt.
It is not simply an inversion [which itslef would also be puzzling]; with larger groups, elements A, B, C, D are replaced randomly (ex: A by C.alt, B by A.alt, C by D.alt, D by B.alt)

The randomnedd does not come from the glyph order in the classes. The glyphs is each respective class are enumerated to match the position of the substitue glyph in the other class. In the vtl and vtg files:


DEF_GROUP "Group1a"
 ENUM GLYPH "A" GLYPH "B" END_ENUM
END_GROUP
END

--


DEF_GROUP "Group1b"
 ENUM GLYPH "A.alt" GLYPH "B.alt" END_ENUM
END_GROUP
END

--


DEF_LOOKUP "Calt02" PROCESS_BASE SKIP_MARKS DIRECTION RTL  (#this is an arabic script font)
IN_CONTEXT
 RIGHT GROUP "Group99"
END_CONTEXT
AS_SUBSTITUTION
SUB GROUP "Group1a"
WITH GROUP "Group1b"
END_SUB
END_SUBSTITUTION
END

-----

Clearly, I must be doing something wrong, but I've checked again and again by comparing with "Arabtype.volt.ttf", and I can't find where I'm erring

--
An inelegant way around this would be of course to explicitely enumerate each glyph to glyp substitution individually (I tried it, it works) but there are lookups which contain 30+ glyphs to substitute in the context of 6+ glyphs so I would not want to have to enumerate each combination individually.

Any help would be much appreciated! Thanks,
Patrick


Logged
ArchivePoster
Guest
« Reply #1 on: 2008-11-30, 12:40:00 »

Posted by: ArnoS9
         
Patrick,
as far as I know the "ID"# in the font,
not the order in your group list
is relevant.
Logged
Tags:
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!