You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-users@xmlgraphics.apache.org by Ken Beesley <ke...@xrce.xerox.com> on 2006/04/26 14:50:52 UTC
Multiple combining-diacritic-mark rendering problem
Multiple combining-diacritic-mark rendering problem in FOP PDF output
I recently installed fop 0.20.5 (on Linux) and used it successfully with
the built-in fonts. My next step was to try to add and use the Charis SIL
font family,
http://scripts.sil.org/cms/scripts/page.php?site_id=nrsi&id=CharisSILfont
This is a Unicode-encoded TTF font which contains Graphite, OpenType
and AAT information for proper placement of combining diacritic marks
on letters, including multiple combining diacritic marks.
So I converted CharisSILR.ttf, CharisSILB.ttf, CharisSILI.ttf,
and CharisSILBI.ttf to make the necessary .xml versions, and modified my
personal 0.20.5 config.xml file to include the following:
<fonts>
<font metrics-file="/home/beesley/.fop/fonts/CharisSILR.xml"
kerning="yes"
embed-file="/home/beesley/.fonts/CharisSILR.ttf">
<font-triplet name="CharisSIL" style="normal" weight="normal"/>
</font>
<font metrics-file="/home/beesley/.fop/fonts/CharisSILB.xml"
kerning="yes"
embed-file="/home/beesley/.fonts/CharisSILB.ttf">
<font-triplet name="CharisSIL" style="normal" weight="bold"/>
</font>
<font metrics-file="/home/beesley/.fop/fonts/CharisSILI.xml"
kerning="yes"
embed-file="/home/beesley/.fonts/CharisSILI.ttf">
<font-triplet name="CharisSIL" style="italic" weight="normal"/>
</font>
<font metrics-file="/home/beesley/.fop/fonts/CharisSILBI.xml"
kerning="yes"
embed-file="/home/beesley/.fonts/CharisSILBI.ttf">
<font-triplet name="CharisSIL" style="italic" weight="bold"/>
</font>
With this config file, in 0.20.5, the Charis SIL font is found and
used. In my FO source file,
I can specify the use of the Charis SIL font as in these four blocks:
<fo:block font-family="CharisSIL" font-size="18pt"
line-height="24pt" space-after.optimum="15pt" text-align="center"
padding-top="3pt">Precomposed accented glyphs: Hopìikwa Lavàytutuveni ì
í à á ö ö </fo:block>
<fo:block font-family="CharisSIL" font-size="18pt" line-height="24pt"
space-after.optimum="15pt" text-align="center"
padding-top="3pt">Accented glyphs based on plain 'o' followed by a
combining accent (grave, acute, circum, diaeresis): ò ó
ô ö</fo:block>
<fo:block font-family="CharisSIL" font-size="18pt"
line-height="24pt" space-after.optimum="15pt" text-align="center"
padding-top="3pt">Accented glyphs based on precomposed ö (0x00F6)
followed by a combining accent (grave, acute, circum): ö̀
ö́ ö̂ </fo:block>
<fo:block font-family="CharisSIL" font-size="18pt"
line-height="24pt" space-after.optimum="15pt" text-align="center"
padding-top="3pt">Accented glyphs based on plain 'o' followed by a
combining diaeresis (0x0308) and another combining accent (grave, acute,
circum): ö̀ ö́ ö̂</fo:block>
These new fonts are found and used.
**** But there are Rendering Problems in the FOP PDF output:
1. The last three fo:block examples use Unicode Combining Diacritical
Marks, in particular ̀ (combining grave accent), ́
(combining acute accent), ̂ (combining circumflex accent)
and ̈ (combining diaeresis).
From the second block, the FOP PDF output shows good placement
of single combining diacritic marks over 'o'. So far so good.
But in the final two blocks, the PDF output is bad. E.g. a sequence
like ö́ should be
rendered as an 'o', with a diaeresis above it, with an acute accent
above the diaeresis.
In fact, with FOP the acute accent is overlaid/overprinted incorrectly
on the
diaeresis in the PDF output. The acute accent should be rendered
higher up so that it doesn't clash with the diaeresis; there should be
some "air" between the diaeresis and the acute accent.
The Charis SIL font has Graphite, OpenType and AAT information necessary
to place multiple accents correctly, but it looks like FOP doesn't
use that information when producing PDF output. I have used Charis SIL
with XeTeX and OS X TextEdit, which do render such combining-diacritic-mark
sequences correctly.
2. I then tried FOP 0.91beta (using the same .xml fonts and source
file, but with
a beta-style fop.xconf configuration file) and got the same unacceptable
results.
**************** Why
Why this is a problem: I need to be able to produce o-with-diaeresis,
with a
second accent (grave, acute, circumflex) above it, for texts written in
the de facto
standard orthography of the Hopi language (spoken in Arizona, USA).
A number of orthographies for American Indian languages (and other languages
around the world) have similar unusual accented letters, and the Charis
SIL font
was created to allow them to be typeset.
If FOP can't handle combining diacritics marks, then I'll have to
abandon it for
my current project and use XeTeX (or maybe XEP?).
************** Questions:
Am I perhaps doing something wrong?
(I'll gladly send the source, config, .xml font files, Makefile, and pdf
output to anyone who is
interested in recreating the problem.)
If this is a known problem in FOP, when is it scheduled to be fixed?
Would I get better results with XEP or some other FO implementation?
Thanks,
Ken
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
Re: Multiple combining-diacritic-mark rendering problem
Posted by Chris Bowditch <bo...@hotmail.com>.
Ken Beesley wrote:
<snip/>
> Why this is a problem: I need to be able to produce o-with-diaeresis,
> with a
> second accent (grave, acute, circumflex) above it, for texts written in
> the de facto
> standard orthography of the Hopi language (spoken in Arizona, USA). A
> number of orthographies for American Indian languages (and other languages
> around the world) have similar unusual accented letters, and the Charis
> SIL font
> was created to allow them to be typeset.
As Jeremias already said, the demand for diacritics support is very low.
If you are not the first then one of a very small number of people to
ask for this feature on this mailing list.
>
> If FOP can't handle combining diacritics marks, then I'll have to
> abandon it for
> my current project and use XeTeX (or maybe XEP?).
I've seen a couple of people asking for diacritics support on the XEP
mailing list. IIUC, then XEP has some limited support for it, but I
think it was mainly geared for Arabic languages. I could be wrong
though. Antenna House is another alternative, which has a reputation for
being very good at supporting Asian and Arabic languages. I haven't
used it much, but might be worth a try.
Or if you do have time to spare, then help on improving FOP is most
welcome :)
<snip/>
Chris
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
Re: Multiple combining-diacritic-mark rendering problem
Posted by Jeremias Maerki <de...@jeremias-maerki.ch>.
On 26.04.2006 14:50:52 Ken Beesley wrote:
<snip/>
> ************** Questions:
>
> Am I perhaps doing something wrong?
I don't think so.
> (I'll gladly send the source, config, .xml font files, Makefile, and pdf
> output to anyone who is
> interested in recreating the problem.)
>
> If this is a known problem in FOP, when is it scheduled to be fixed?
So far, there was no high demand for this. I don't think it's on
anyone's radar. This advanced character handling is simply not
implemented, yet.
> Would I get better results with XEP or some other FO implementation?
Maybe. :-)
A very good alternative to just going to another implementation is to
help us implement the missing functionality. Patches are always welcome.
Jeremias Maerki
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org