Re: line-height interpretation

2004-07-08 Thread J.Pietschmann
Adam Augusta wrote:
I think I've figured out the formula FOP uses.  I'm quite sure it's wrong; 
the height of the block should simply be line-height, if specified in 
length, or as a multiplier of the font-size, if specified dimensionless.

It seems to be:
Diff(Ascender,Descender)*font-size/1000 + (line-height - font-size)
FOP adds a half-leading display space above and below the line,
the half-leading is computed as
 (lineHeight - fontState.getFontSize()) / 2
There are numerous inconsistencies in the application though.
J.Pietschmann
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: line-height interpretation

2004-07-06 Thread Clay Leeds
Adam,
On Jul 6, 2004, at 2:18 PM, Adam Augusta wrote:
The 'line-height' property is supposed to specify the height of a text
block as a multiple of the font size.  The spec* says that the user 
agent
may pick a reasonable multiplier, recommended between 1 and 1.2.  I 
said
Forget that!  I want to my spacing to be deterministic, thank you very
much.  What is this, CSS?  So I specified my own spacing.

*http://www.w3.org/TR/xsl/slice7.html#line-height
No matter what line height I pick, the engine seems to add 5pt plus a
little more.  So if I pick 17pt, I get 22pt+, and if I pick 7pt, I get
12pt+.  The compliance page says that the property is fully 
implemented.
So why am I getting this 5pt+ discrepancy?

(Yes, line-height=1 gives the same result for me as 
line-height=14pt
with a 14pt font.  That is, 19pt+.  Setting force/minimum/maximum etc 
has
no effect.)

As you can see, I set the border, padding, and spacing to 0.
snip what=xsl-fo_content/
-Adam
I don't know if it makes a difference, but it may help to know what the 
output target is (PDF? AWT? PS?) as well as the JVM/JDK. I've found 
kerning differences in output between AWT (-awt  -print) vs. PDF, that 
is affected (exacerbated?) by the version of the Java Virtual Machine. 
I realize you are writing about line-height, but perhaps (hopefully?) 
this may contribute to a workaround. In either case, perhaps we need to 
update the /compliance.html...

Web Maestro Clay
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: line-height interpretation

2004-07-06 Thread Adam Augusta
On Tue, 6 Jul 2004, Clay Leeds wrote:

 Adam,
 
 On Jul 6, 2004, at 2:18 PM, Adam Augusta wrote:
  The 'line-height' property is supposed to specify the height of a text
  block as a multiple of the font size.  The spec* says that the user 
  agent
  may pick a reasonable multiplier, recommended between 1 and 1.2.  I 
  said
  Forget that!  I want to my spacing to be deterministic, thank you very
  much.  What is this, CSS?  So I specified my own spacing.
 
snip /
  No matter what line height I pick, the engine seems to add 5pt plus a
  little more.  So if I pick 17pt, I get 22pt+, and if I pick 7pt, I get
  12pt+.  The compliance page says that the property is fully 
  implemented.
  So why am I getting this 5pt+ discrepancy?
snip /
 
 I don't know if it makes a difference, but it may help to know what the 
 output target is (PDF? AWT? PS?) as well as the JVM/JDK. I've found 
 kerning differences in output between AWT (-awt  -print) vs. PDF, that 
 is affected (exacerbated?) by the version of the Java Virtual Machine. 
 I realize you are writing about line-height, but perhaps (hopefully?) 
 this may contribute to a workaround. In either case, perhaps we need to 
 update the /compliance.html...
 
 Web Maestro Clay

PDF output
java version 1.4.2_05
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-b04)

The only workaround I can think of is to make each line a block container 
with an absolute position.  *grimace*

-Adam

PS: Generating an SVG representation of a block container, putting a
rotate transform on the SVG group, and then reembedding that SVG into a
larger XSL:FO document seems to work well!  I can even rotate to non-90
degree orientations, but then of course I have to do some trig with widths
and reference points.  (Of course, with the problem above, I'm going to 
have to come up with new reference points for every line. *shudder*)



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