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 Ben Bosman <be...@mire.be> on 2008/02/22 13:50:47 UTC

some diacritical characters not rendered correctly

I use fop to generate pdf's from docbook xml files.
Everything is rendered correctly except for a few rare diacritical
characters.

A name like "Müslümanoğlu" is rendered as "Müslümano#lu"
Another example is "Konstantinović" which is rendered as
"Konstantinovi#"

If I generate an rtf with fop from the same docbook xml file, the
characters are rendered correctly.

I have used fop 0.93 and 0.94 for this.

I think this is a bug in apache fop, but I don't know if this is the
correct place to report a bug.

Kind regards,
Ben

Re: some diacritical characters not rendered correctly

Posted by Ben Bosman <be...@mire.be>.
Yes indeed, this problem is solved in the latest SVN version.
The generated PDF can now be opened with preview and rendered correctly.

It sometimes displays some squares instead of characters for some of the
content, but this is rendered correctly after e.g. resizing the window. I
assume this is more of a Preview bug instead of a fop bug. Especially since
the same file has different incorrectly displayed characters depending on
which mac I'm opening it with.

Kind regards,
Ben

On Tue, Feb 26, 2008 at 8:14 AM, <Ju...@piater.name> wrote:

> "Ben Bosman" <be...@mire.be> wrote on Mon, 25 Feb 2008 11:31:59 +0100:
>
> > I have embedded the FreeFont in the generated PDF's, and this solved the
> > problem.
> > The drawback is that apple's 'Preview' (pdf viewer) can't handle the
> embedded
> > font although Preview claims to be able to handle this.
>
> Ben,
>
> This may be related to a bug that has been fixed in trunk. Can you try
> the lastest fop from SVN?
>
> Justus
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
>
>

Re: some diacritical characters not rendered correctly

Posted by Ju...@Piater.name.
"Ben Bosman" <be...@mire.be> wrote on Mon, 25 Feb 2008 11:31:59 +0100:

> I have embedded the FreeFont in the generated PDF's, and this solved the
> problem.
> The drawback is that apple's 'Preview' (pdf viewer) can't handle the embedded
> font although Preview claims to be able to handle this.

Ben,

This may be related to a bug that has been fixed in trunk. Can you try
the lastest fop from SVN?

Justus

---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Re: some diacritical characters not rendered correctly

Posted by Ben Bosman <be...@mire.be>.
Thank you all for the help offered.
I have embedded the FreeFont in the generated PDF's, and this solved the
problem.
The drawback is that apple's 'Preview' (pdf viewer) can't handle the
embedded font although Preview claims to be able to handle this.

Kind regards,
Ben

On Fri, Feb 22, 2008 at 4:10 PM, Jeremias Maerki <de...@jeremias-maerki.ch>
wrote:

> Both DejaVu and FreeFont work for the characters you mentioned. Please
> note that "serif" is a virtual font which is mapped to a different font
> (Helvetica in the case of PDF). And the Type 1 Helvetica font doesn't
> have these characters.
>
> http://www.gnu.org/software/freefont/
> http://dejavu.sourceforge.net/
>
> On 22.02.2008 15:44:47 Ben Bosman wrote:
> > I have been looking before for a font which is rendered correctly.
> > I currently use 'serif' because it is rendered correctly when generating
> an
> > rtf.
> >
> > I haven't found any fonts which rendered these characters correctly when
> > generating a pdf.
> >
> > Kind regards,
> > Ben
> >
> > On Fri, Feb 22, 2008 at 3:12 PM, Chris Bowditch <
> bowditch_chris@hotmail.com>
> > wrote:
> >
> > > Ben Bosman wrote:
> > >
> > > > I use fop to generate pdf's from docbook xml files.
> > > > Everything is rendered correctly except for a few rare diacritical
> > > > characters.
> > > >
> > > > A name like "Müslümanoğlu" is rendered as "Müslümano#lu"
> > > > Another example is "Konstantinović" which is rendered as
> > > > "Konstantinovi#"
> > > >
> > > > If I generate an rtf with fop from the same docbook xml file, the
> > > > characters are rendered correctly.
> > > >
> > > > I have used fop 0.93 and 0.94 for this.
> > > >
> > > > I think this is a bug in apache fop, but I don't know if this is the
> > > > correct place to report a bug.
> > >
> > > This is not a bug. You need to use a Font which has glyphs for the
> > > diacritic characters. If the Font you specified in the XSL-FO does not
> > > contain glyphs for the characters then # is output instead. Which
> > > font-family have you specified in the XSL-FO?
> > >
> > > Chris
>
>
>
> Jeremias Maerki
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
>
>

Re: some diacritical characters not rendered correctly

Posted by Jeremias Maerki <de...@jeremias-maerki.ch>.
Both DejaVu and FreeFont work for the characters you mentioned. Please
note that "serif" is a virtual font which is mapped to a different font
(Helvetica in the case of PDF). And the Type 1 Helvetica font doesn't
have these characters.

http://www.gnu.org/software/freefont/
http://dejavu.sourceforge.net/

On 22.02.2008 15:44:47 Ben Bosman wrote:
> I have been looking before for a font which is rendered correctly.
> I currently use 'serif' because it is rendered correctly when generating an
> rtf.
> 
> I haven't found any fonts which rendered these characters correctly when
> generating a pdf.
> 
> Kind regards,
> Ben
> 
> On Fri, Feb 22, 2008 at 3:12 PM, Chris Bowditch <bo...@hotmail.com>
> wrote:
> 
> > Ben Bosman wrote:
> >
> > > I use fop to generate pdf's from docbook xml files.
> > > Everything is rendered correctly except for a few rare diacritical
> > > characters.
> > >
> > > A name like "Müslümanoğlu" is rendered as "Müslümano#lu"
> > > Another example is "Konstantinović" which is rendered as
> > > "Konstantinovi#"
> > >
> > > If I generate an rtf with fop from the same docbook xml file, the
> > > characters are rendered correctly.
> > >
> > > I have used fop 0.93 and 0.94 for this.
> > >
> > > I think this is a bug in apache fop, but I don't know if this is the
> > > correct place to report a bug.
> >
> > This is not a bug. You need to use a Font which has glyphs for the
> > diacritic characters. If the Font you specified in the XSL-FO does not
> > contain glyphs for the characters then # is output instead. Which
> > font-family have you specified in the XSL-FO?
> >
> > Chris



Jeremias Maerki


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Re: some diacritical characters not rendered correctly

Posted by Ju...@Piater.name.
Ben,

You might want to try the Stix fonts (http://www.stixfonts.org/),
probably the most complete Unicode font set currently
available. You'll need to convert them from OTF to TTF; I did this
with FontForge using the little script below, and the result works
well with FOP (trunk) for me.

Justus

#!/bin/sh
for otf in ../../STIXBeta/*.otf; do
    fontpath=${otf%.*}
    font=${fontpath##*/}
    ttf=$font.ttf
    fontforge -lang=ff -c 'Open($1); Generate($2)' $otf $ttf
done


"Ben Bosman" <be...@mire.be> wrote on Fri, 22 Feb 2008 15:44:47 +0100:

> I haven't found any fonts which rendered these characters correctly when
> generating a pdf.

---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Re: some diacritical characters not rendered correctly

Posted by Ben Bosman <be...@mire.be>.
I have been looking before for a font which is rendered correctly.
I currently use 'serif' because it is rendered correctly when generating an
rtf.

I haven't found any fonts which rendered these characters correctly when
generating a pdf.

Kind regards,
Ben

On Fri, Feb 22, 2008 at 3:12 PM, Chris Bowditch <bo...@hotmail.com>
wrote:

> Ben Bosman wrote:
>
> > I use fop to generate pdf's from docbook xml files.
> > Everything is rendered correctly except for a few rare diacritical
> > characters.
> >
> > A name like "Müslümanoğlu" is rendered as "Müslümano#lu"
> > Another example is "Konstantinović" which is rendered as
> > "Konstantinovi#"
> >
> > If I generate an rtf with fop from the same docbook xml file, the
> > characters are rendered correctly.
> >
> > I have used fop 0.93 and 0.94 for this.
> >
> > I think this is a bug in apache fop, but I don't know if this is the
> > correct place to report a bug.
>
> This is not a bug. You need to use a Font which has glyphs for the
> diacritic characters. If the Font you specified in the XSL-FO does not
> contain glyphs for the characters then # is output instead. Which
> font-family have you specified in the XSL-FO?
>
> Chris
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
>
>

Re: some diacritical characters not rendered correctly

Posted by Chris Bowditch <bo...@hotmail.com>.
Ben Bosman wrote:

> I use fop to generate pdf's from docbook xml files.
> Everything is rendered correctly except for a few rare diacritical
> characters.
> 
> A name like "Müslümanoğlu" is rendered as "Müslümano#lu"
> Another example is "Konstantinović" which is rendered as
> "Konstantinovi#"
> 
> If I generate an rtf with fop from the same docbook xml file, the
> characters are rendered correctly.
> 
> I have used fop 0.93 and 0.94 for this.
> 
> I think this is a bug in apache fop, but I don't know if this is the
> correct place to report a bug.

This is not a bug. You need to use a Font which has glyphs for the 
diacritic characters. If the Font you specified in the XSL-FO does not 
contain glyphs for the characters then # is output instead. Which 
font-family have you specified in the XSL-FO?

Chris



---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org