From: Dov G. <dov...@gm...> - 2006-09-21 21:18:26
|
In my continued efforts to get Hebrew mark positioning to work for the Culmus fonts I have hit the following problem. I'm trying to combine the three glyphs: Yud (U+05D9) <- The base character Mapiq (U+05BC) <- Middle point Qamats (U+05B8) <- Vowel point below base character. The font defines a ligature of Yud and Mapiq that resides at U+FB39. And a ligature pair is defined for the Yud+Mapiq that refers to the ligature. Now my problem is that when I try to render this triplet in pango the Yud/Mapiq ligature is not applied if the buffer stream is Yud, Qamatz, and Mapiq, but it is applied if the order is Yud, Mapiq, Qamatz. I tried to compare my definititions for Yud and the Yud/Mapiq ligature with corresponding definitions in the font SBL Hebrew, which defines the same ligature, but there the ligature gets applied no matter if the order is Yud, Qamatz, Mapiq or Yud, Mapiq, Qamatz. The only difference that I noticed between my font and the SBL Hebrew font is that the latter defines lots of Font Info/Contextual Chain/Subs. Is that necessary for solving this problem? George, was it these definitions that you refered to when you said that there are no scripting access to them? (I have now switched over to a perl script that generates fontforge scripts and then runs fontforge twice. Once to extract font information, and once to modify the font. It works well as invoking fontforge is basically instantaneous.) Regards, Dov |
From: George W. <gw...@si...> - 2006-09-21 22:45:40
|
On Thu, 2006-09-21 at 14:18, Dov Grobgeld wrote: > In my continued efforts to get Hebrew mark positioning to work for the > Culmus fonts I have hit the following problem. > > I'm trying to combine the three glyphs: > > Yud (U+05D9) <- The base character > Mapiq (U+05BC) <- Middle point > Qamats (U+05B8) <- Vowel point below base character. > > The font defines a ligature of Yud and Mapiq that resides at U+FB39. > And a ligature pair is defined for the Yud+Mapiq that refers to the > ligature. > > Now my problem is that when I try to render this triplet in pango the > Yud/Mapiq ligature is not applied if the buffer stream is Yud, Qamatz, > and Mapiq, but it is applied if the order is Yud, Mapiq, Qamatz. There is a flag in the OpenType spec called "[] Ignore combining marks" which might be useful here. I can't swear that pango supports it (or that uniscribe does for that matter), nor do I know what effect it will have if one of the ligature components is itself a mark. > The only difference that I noticed between my font and the SBL Hebrew > font is that the latter defines lots of Font Info/Contextual > Chain/Subs. Is that necessary for solving this problem? It might be. You might be better off asking these questions on a pango list. I know what the spec says, but it can be ambiguous (or just confusing) and I don't always understand it the way implementors do, and MS seems to have gone off and done things subtly different from the spec in some areas anyway. > George, was it > these definitions that you refered to when you said that there are no > scripting access to them? Yup. It's not easy to design a script interface because there are so many options and each option has a different format. Lots of variable length things. Just building up arrays of arrays of characters to specify the character classes (which are sometimes needed and sometimes not) would be painful. You could always write a perl script to modify the sfd file. |
From: Dov G. <dov...@gm...> - 2006-09-22 05:59:31
|
Hi George and thanks for your answer. I found that I can get around the problem by erasing the Yod/Mapiq ligature and instead creating another anchor for the Mapiq positioning. This leads me to wondering why the ligature was created in the first place? Is it just to support older font types that do not have the OpenType anchor support. Or, in another word, is there any disadvantage associated with the combination of glyphs through anchors vs with the construction of a ligature? Less support in various layout engines, for example? (Of course if the shape of the ligature cannot be composed by the contained glyphs then you don't have a choice. But that is never the case for Hebrew.) Perhaps the ligatures are there simply because Unicode (erronously?) declares positions for them in the range U+FB2A-U+FB4F? Regards, Dov (who is still stumbling around in fontland...) On 21 Sep 2006 15:45:34 -0700, George Williams <gw...@si...> wrote: > On Thu, 2006-09-21 at 14:18, Dov Grobgeld wrote: > > In my continued efforts to get Hebrew mark positioning to work for the > > Culmus fonts I have hit the following problem. > > > > I'm trying to combine the three glyphs: > > > > Yud (U+05D9) <- The base character > > Mapiq (U+05BC) <- Middle point > > Qamats (U+05B8) <- Vowel point below base character. > > > > The font defines a ligature of Yud and Mapiq that resides at U+FB39. > > And a ligature pair is defined for the Yud+Mapiq that refers to the > > ligature. > > > > Now my problem is that when I try to render this triplet in pango the > > Yud/Mapiq ligature is not applied if the buffer stream is Yud, Qamatz, > > and Mapiq, but it is applied if the order is Yud, Mapiq, Qamatz. > There is a flag in the OpenType spec called "[] Ignore combining marks" > which might be useful here. I can't swear that pango supports it (or > that uniscribe does for that matter), nor do I know what effect it will > have if one of the ligature components is itself a mark. > > > The only difference that I noticed between my font and the SBL Hebrew > > font is that the latter defines lots of Font Info/Contextual > > Chain/Subs. Is that necessary for solving this problem? > It might be. You might be better off asking these questions on a pango > list. I know what the spec says, but it can be ambiguous (or just > confusing) and I don't always understand it the way implementors do, and > MS seems to have gone off and done things subtly different from the spec > in some areas anyway. > > George, was it > > these definitions that you refered to when you said that there are no > > scripting access to them? > Yup. > It's not easy to design a script interface because there are so many > options and each option has a different format. Lots of variable length > things. > Just building up arrays of arrays of characters to specify the character > classes (which are sometimes needed and sometimes not) would be painful. > > You could always write a perl script to modify the sfd file. > > |
From: George W. <gw...@si...> - 2006-09-22 12:04:26
|
On Thu, 2006-09-21 at 22:59, Dov Grobgeld wrote: > Hi George and thanks for your answer. > > I found that I can get around the problem by erasing the Yod/Mapiq > ligature and instead creating another anchor for the Mapiq > positioning. This leads me to wondering why the ligature was created > in the first place? The Unicode people generally dislike ligatures and only add code points for them if some earlier encoding had those code points. So that earlier encodings could undergo round-trip conversion to and from unicode. That's my guess. Removing the glyph at that code point might cause problems if input text actually contained the code point. Instead you might want to remove the 'liga' feature which generates the code point and add a 'ccmp' feature to decompose it. > Is it just to support older font types that do not > have the OpenType anchor support. Unicode and OpenType are distinct. The vageries of OpenType are not that important to the Unicode standardizers; they are concerned more with previous encoding standards. |