FontLab Forum
2012-02-07, 00:23:40 *
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: re-ordering glyphs?  (Read 3104 times)
madskinner
Jr. Member
**

Karma: +0/-0
Posts: 1


« on: 2009-10-12, 05:53:02 »

Hi, I working on an arabic font and want my below marks to appear below the base char rather below shadda when they occur together, so that U+0628 U+0651 U+0650 will render with U+0650 below U+0628 and U+0651 above.

So far I've managed this by attaching the below mark to shadda and using a 'Pair Ajustment' lookup to offset the below mark below the base character specified in the context. While this has worked well, it requires a separate lookup for each form of the base character. I keep hitting an apparent maximum 254 lookups (i.e. add any lookup and compile fails, delete it and compile passes). Is this a real limitation or am I tripping over something else.

I suppose I could compose shadda + below mark to a ligature and decompose it to below mark + shadda. Then write a script to create empty ligature glyphs for every combination of base character glyph and all possble below marks. Then use compose and decompose to move the below mark infront of the base character. Attaching shadda to the preceeding base character after first attaching the base character to the preceeding below mark.

But I was hoping for something more elegant, such as a way to attach a mark to the preceeding base character while ignoring any intervening marks (except perhaps in the context). What is the best way (as in least work) to acheive this effect in the font.

Thanks.
Logged
vanisaac
Sr. Member
****

Karma: +0/-0
United States United States

Posts: 16



Email
« Reply #1 on: 2009-10-12, 17:23:36 »

I think all you need to do is create a new and independent <mark> positioning lookup for that mark. You can define the context in that lookup so it will only act when you want it to. By placing it before the standard mark-to-mark <mkmk> lookup, it will attach to the base character in [context] and attach relative to other marks (defined in <mkmk>) in any other context.
Logged
bayaryn
Full Member
***

Karma: +0/-0
Belarus Belarus

Posts: 2


Email
« Reply #2 on: 2009-10-17, 10:25:31 »

I cannot understand exacly what is the problem - I work with Devanagari and don't know Arabic script, but reordering glyphs is possible in OT (in some strange way), it takes 2 gsub lookups. For example if we need to reorder 2 glyphs (sign1 sign2 -> sign2 sign1) one have to create 2 context dependent lookups (sign1 sign2 -> sign2 sign1 sign2 -> sign2 sign1)

sign1 -> sign2 sign1 (before sign2)
sign1 sign2 -> sign1 (after sign2)

this also works with glyph classes with some limitation (class1 sign2 -> sign2 class1)

class1 -> sign2 class1 (before sign2)
class1 sign2 -> class1 (after sign2)

substitution (sign1 sign2 -> sign1 sign2 sign1 -> sign2 sign1) is also possible and in this case only the second position can a glyph class.

sign2 -> sign2 sign1 (after sign1)
sign1 sign2 -> sign2 (before sign1)
or
class2 -> class2 sign1 (after sign1)
sign1 class2 -> class2 (before sign1)

It is not possible to reorder in this way 2 glyph groups.

Maybe this can help in your case.

corrected - 28.10.09
« Last Edit: 2009-10-28, 15:54:29 by bayaryn » Logged
Tags: arabic  marks  lookups 
Pages: [1]
  Print  
 
Jump to:  

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