You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-dev@xmlgraphics.apache.org by "Alex V. Alishevskikh" <al...@vismech.ru> on 2001/04/16 07:34:25 UTC

Problems with i18n and fonts at FOP 0.18.1

Hi there

When I used FOP 0.17, I could work with the cyrillic texts, setting
mapping (in charlist.xml) from input fo-files encoding in my font
encoding. It perfectly worked both for embedded TrueType, and for Type1.
Having appropriately adjusted mapping, I could use any encoding of the
input text (including Unicode) and any fonts encoding.

When I try to use the FOP 0.18.1 with cyrillic fo-files (UTF-8 or
cp1251) and fonts, I get these troubles:

1) For embedding cyrillic Type1 I see whitespaces instead of cyrillic
characters in output PDF. (without my mapping adjustment (i.e. just to
use the native charlist.xml), I see the hashes "#").

2) In the case of embedding TrueType (single-byte cyrillic fonts or MS
Unicode fonts) all things are more strange. I dont see any characters
(not cyrillic nor anything). When I open the font list in AcroRead
(Document Info>Fonts), I see what my font name is distorted (exmpl,
"1E915Arial" instead of "Arial") and I see a garbage instead of font
encoding name. Also, in some cases I feel what Reader page redrawing is
more slower. 

These things repeats for every cyrillic fonts, which Im used. All these
fonts works correctly at 0.17 version (except MS Unicode TTF's).
For some TTF's I get "ArrayIndexOutOfBoundsException" in TTFReader, how
earlier described here. I just dont use these fonts. 
Also, I had "ClassCastException" in PFMReader, but patched it as
described here by Jeremias Maerki 28/03. That's all.
Except this, I dont get any error messages at any cases. My local
version of charlist.xml works correctly at FOP0.17 and checked for many
fonts with MM Fontographer.

Are anybody to had the same troubles and how to could to resolve its?
IMHO, this problems maybe arises for many non-WinAnsi encodings and
fonts.
And what about this Tore, Kelly &Co thinks?

Thanks and good work.
-- 
Alex "Achtung" Alishevskikh
[mailto:alex@vismech.ru]

Visual Mechanics Lab
http://www.vismech.ru

---------------------------------------------------------------------
To unsubscribe, e-mail: fop-dev-unsubscribe@xml.apache.org
For additional commands, email: fop-dev-help@xml.apache.org


Re: Problems with i18n and fonts at FOP 0.18.1

Posted by Tore Engvig <te...@infostream.no>.

On Mon, 16 Apr 2001, Alex V. Alishevskikh wrote:

> 1) For embedding cyrillic Type1 I see whitespaces instead of cyrillic
> characters in output PDF. (without my mapping adjustment (i.e. just to
> use the native charlist.xml), I see the hashes "#").

I think it's possible to this but it would require some (a lot of) manual
work. I'm a little unsure about how to do it, but will look at it.

> 2) In the case of embedding TrueType (single-byte cyrillic fonts or MS
> Unicode fonts) all things are more strange. I dont see any characters
> (not cyrillic nor anything). When I open the font list in AcroRead
> (Document Info>Fonts), I see what my font name is distorted (exmpl,
> "1E915Arial" instead of "Arial") and I see a garbage instead of font
> encoding name. Also, in some cases I feel what Reader page redrawing is
> more slower. 

The distorted fontnames are intended. When truetype fonts are embedded,
only a subset is embedded, and the subset differs a lot from the original
font. In the pdf document CIDs are used (Character IDs) that means that
'A' might be 0x0003 (if 'A' is glyph no. 3 in the embedded font) in the
pdf document instead of 0x41. 

Acrobat reader first checks if the font exists in your system (ie. if you
use windows you most probably have the Arial font istalled) and use this
font instead of the embedded font. With cids this would render as crap.
This might also be a problem without cids because the installed font with
the same name most probably is another version than the author of the pdf
document used (ie missing glyphs, different metrics, etc). This cid thing
also causes problems with cut'n'paste and searching in the pdf document.
This will be improved when unicode encoding is implemented (working on
it).

Garbage in fontencoding depends on the version of Acrobat reader you use.
The problem with characters not showing might be related to your Acrobat
version or with the bug fixed by Rafal's patch. Acrobat < 4.05 have
problems with customized cmaps. The current cvs version doesn't use a
customized cmap, but uses the Identity-H encoding which should work on all
Acrobat version >= 4.0.

Maybe you should upgrade to the current cvs version of fop? 
Note also that Truetype fonts must have a unicode encoding for the
ttfreader to understand them, but that doesn't seem to be your problem.


Tore


 > 
> These things repeats for every cyrillic fonts, which Im used. All these
> fonts works correctly at 0.17 version (except MS Unicode TTF's).
> For some TTF's I get "ArrayIndexOutOfBoundsException" in TTFReader, how
> earlier described here. I just dont use these fonts. 
> Also, I had "ClassCastException" in PFMReader, but patched it as
> described here by Jeremias Maerki 28/03. That's all.
> Except this, I dont get any error messages at any cases. My local
> version of charlist.xml works correctly at FOP0.17 and checked for many
> fonts with MM Fontographer.
> 
> Are anybody to had the same troubles and how to could to resolve its?
> IMHO, this problems maybe arises for many non-WinAnsi encodings and
> fonts.
> And what about this Tore, Kelly &Co thinks?
> 
> Thanks and good work.
> -- 
> Alex "Achtung" Alishevskikh
> [mailto:alex@vismech.ru]
> 
> Visual Mechanics Lab
> http://www.vismech.ru
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-dev-unsubscribe@xml.apache.org
> For additional commands, email: fop-dev-help@xml.apache.org
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-dev-unsubscribe@xml.apache.org
For additional commands, email: fop-dev-help@xml.apache.org