Re: text-align = justify not working correctly with - (minus) characters

2001-10-23 Thread Corinna Hischke

Hi all

I'd like to come back to this problem:

- Original Message -
From: Rainer Garus [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Sunday, September 30, 2001 7:12 PM
Subject: text-align = justify not working correctly with - (minus)
characters


 Lines containing - (minus) characters are not justified correctly in fop
0.20.1. The line in the pdf file is longer then specified (see attached
files).

 The area tree is correct. It seems that the width of the - character
used by the layouter is different from the width of the - character in the
pdf file.

 Another Problem: the width of the - character in the ps output file is
different from the width of the - character in the pdf output file of fop.

 What are the reasons?

 Rainer Garus

I discovered that the width of the characters minus and hyphen in the
font files is different. For example, in Helvetica.xml, hyphen has a width
of 333 and minus of 324. Why?

Could it be, that somewhere in FOP minus and hyphen are used as names
for the same characters?

I also recall that there was a bug report concerning minus and text
alignment. But it has not yet been resolved. Any ideas out there, where I
would have to look for the base of this problem?

Thanks,

Corinna



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




Re: text-align = justify not working correctly with - (minus) characters

2001-10-23 Thread Rainer Garus

Hallo Corinna,

I have studied the problem in the last week with the following result:

There is an error in the font metrik files in org/apache/fop/render/pdf/fonts. In the 
WinAnsiEncoding the hyphen has the code point 0x002D. In the font metrik files for 
Helvetica, Times and Courier there are two entries for this index. For example in 
Helvetica.java there is width[0x002D] = 333 and width[0x2D] = 324.

But the font metrik files are generated. So the generation is not correct. For 
generating Helvetica.java the files Helvetica.xml, charlist.xml und font-file.xsl from 
the directory src/codegen are used. In charlist.xml you find two entries with 
win-ansi=0x002D: one for adobe-name hyphen in the win-ansi section with unicode 
0x002D and another for adobe-name minus in the symbol section with unicode 0x2212. 
Only the entry of the win-ansi section should be used.

I think the best way is to split charlist.xml in three files: one for win-ansi 
encoding, one for zapfdingbats encoding and one for symbol encoding. For generating 
the metrik files for the fonts with win-ansi encoding charlist-win-ansi.xml is used, 
for the zapfdingbats metrik file charlist-zapfdingbats.xml is used and for the symbol 
metrik file charlist-symbol.xml is used.

So there is for each font a file with a mapping (adobe-name - width) and for each 
encoding a file with a mapping (adobe-name - code point). Then it is possible to 
generate the font metrik file with mapping (code point - width). Now we need only a 
file with a mapping (unicode - adobe-name) to build for each encoding the mapping 
(unicode - code point).

Another way is to use *.pfm files of the standard fonts Helvetica ,... to build the 
font metrik files.

The ps renderer don't use the WinAnsiEncoding but IsoLatin1Encoding. But I have not 
found a Unicode to IsoLatin1 mapping. I think it is an encoding problem. In Isolatin1 
the hyphen has the code point 0xAD. So the character with value 0x2D must be mapped on 
0xAD.

Another point: In the files Helvetica.xml, ... (the files with the mapping adobe-name 
- width) there are no entries for the euro, see bug 2105.

Rainer Garus

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




text-align = justify not working correctly with - (minus) characters

2001-09-30 Thread Rainer Garus

Lines containing - (minus) characters are not justified correctly in fop 0.20.1. The 
line in the pdf file is longer then specified (see attached files).

The area tree is correct. It seems that the width of the - character used by the 
layouter is different from the width of the - character in the pdf file. 

Another Problem: the width of the - character in the ps output file is different 
from the width of the - character in the pdf output file of fop.

What are the reasons?

Rainer Garus

?xml version=1.0 encoding=utf-8?

fo:root xmlns:fo=http://www.w3.org/1999/XSL/Format;

  fo:layout-master-set
fo:simple-page-master master-name=simple
  page-height=29.7cm
  page-width=21cm
  margin-top=2cm
  margin-bottom=2cm
  margin-left=4cm
  margin-right=4cm
  fo:region-body/
/fo:simple-page-master
  /fo:layout-master-set


  fo:page-sequence master-name=simple
fo:flow flow-name=xsl-region-body

fo:block font-size=12pt font-family=Helvetica text-align=justify
-- -- -- -- -- -- -- 
-- 
-- -- -- -- -- -- -- 
-- 
0123456789 0123456789 0123456789 0123456789 0123456789 0123456789 0123456789 
0123456789 
0123456789 0123456789 0123456789 0123456789 0123456789 0123456789 0123456789 
0123456789 
/fo:block

/fo:flow !-- closes the flow element--
  /fo:page-sequence !-- closes the page-sequence --
/fo:root

 simple.pdf
 simple.ps

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]