Tavmjong Bah
2006-04-23 21:51:56 UTC
Hi George,
I have used the Build-Accented-Glyphs command to build characters in
the Latin Extended and other blocks. This works quite well in most cases
using anchors. However, the recent change in Pango to using anchors to
align adjacent glyphs has exposed what I have long believed to be a
problem with how FontForge builds accented characters. FontForge (for
"postscript" reasons according to a comment in the code) chooses to
build preferentially with accents in the Spacing Modifier Letters (SML)
range. I thus added anchor points to these accents. Pango now uses these
anchors to align the accent above a previous letter rather than leaving
it to the right of the letter as should happen for SML characters. One
could argue that this is a flaw in Pango but I believe that the SML
characters should just not have anchors.
There are a few other problems with the use of accents in the SML
range, primarily with using the same accents for both above and below
diacritical marks:
1. FontForge replaces accents for capital characters even for accents
that go below a base glyph. This means that the below accents for lower
case and upper case characters are different.
2. Using the same accents for below and above a base glyph requires two
anchor points, creating a problem in choosing the right one to use.
3. Using the same accents for both above and below a base glyph removes
the possibility of customizing the below accents to take up less space
(much like the use of special capital letter accent like breve ->
Breve). May be not a real problem.
It seems to me that unless there is a real compelling reason to use
accents in the SML region that it would be better to prefer those in the
Combining Diacritical Marks block.
I've attached a diff file for a version of fvcomposit.c that I've used
for the past 6 months that works around some of the problems I had. It
forces FontForge to use a combining mark for below accents thus
alleviating the need for multiple anchor points in spacing marks. (It
does not change the preference for spacing vs. combining marks.) The
changes also handle double accents. It is an ugly hack but worked for
me. I hesitate to provide a better "patch" without knowing what would be
excepted as the existing code is quite complicated and it would take
some time to understand it fully.
Tav
I have used the Build-Accented-Glyphs command to build characters in
the Latin Extended and other blocks. This works quite well in most cases
using anchors. However, the recent change in Pango to using anchors to
align adjacent glyphs has exposed what I have long believed to be a
problem with how FontForge builds accented characters. FontForge (for
"postscript" reasons according to a comment in the code) chooses to
build preferentially with accents in the Spacing Modifier Letters (SML)
range. I thus added anchor points to these accents. Pango now uses these
anchors to align the accent above a previous letter rather than leaving
it to the right of the letter as should happen for SML characters. One
could argue that this is a flaw in Pango but I believe that the SML
characters should just not have anchors.
There are a few other problems with the use of accents in the SML
range, primarily with using the same accents for both above and below
diacritical marks:
1. FontForge replaces accents for capital characters even for accents
that go below a base glyph. This means that the below accents for lower
case and upper case characters are different.
2. Using the same accents for below and above a base glyph requires two
anchor points, creating a problem in choosing the right one to use.
3. Using the same accents for both above and below a base glyph removes
the possibility of customizing the below accents to take up less space
(much like the use of special capital letter accent like breve ->
Breve). May be not a real problem.
It seems to me that unless there is a real compelling reason to use
accents in the SML region that it would be better to prefer those in the
Combining Diacritical Marks block.
I've attached a diff file for a version of fvcomposit.c that I've used
for the past 6 months that works around some of the problems I had. It
forces FontForge to use a combining mark for below accents thus
alleviating the need for multiple anchor points in spacing marks. (It
does not change the preference for spacing vs. combining marks.) The
changes also handle double accents. It is an ugly hack but worked for
me. I hesitate to provide a better "patch" without knowing what would be
excepted as the existing code is quite complicated and it would take
some time to understand it fully.
Tav