[xep-support] Trying To Understand Font and Line Metrics

W. Eliot Kimber eliot at isogen.com
Sat Nov 16 17:03:08 PST 2002


I'm working on defining the best way to create a "dropped capital" 
effect using side floats. The key is specifying negative top and bottom 
margins so that the floated area just fits the glyph, so you get this 
type of effect:

*   * This is the first line
***** This is the second line
***** This is the third line
*   * This is the fourth line
This is the fifth line

While you can figure out the margin values by trial and error, I was 
hoping to define a principaled approach that would produce the correct 
result regardless of what the fonts were set to. Unfortunately, I can't 
seem to find one. In addition, XEP and XSL Formatter produce different 
results for the same markup--obviously there is some difference in the 
interpretation of something or an implementation difference allowed by 
the spec, but I don't know enough about the fine points of font metrics 
to know what it might be. I reread the section on inline areas and glyph 
areas but it didn't really help.

The key difference I'm seeing is that XEP uses a different value for 
"middle" and "central" baselines, while XSL Formatter appears to 
conflate them, at least for serif (which near as I can tell is mapped to 
the same font under Windows). The result is that XSL Formatter renders 
the character a bit higher than XEP.

My questions are these:

1. Which implementation is more correct or are both equally appropriate?
2. Is there a constant or otherwise knowable formula for top and bottom 
margin values that will eliminate the correct amount of space before and 
after? I was expecting it to be an integer multiple or even percentage 
of the font size (e.g., either 1em or 0.2em or something like that). The 
values I arrived at by trial and error for XEP are -0.15em for top 
margin, -0.2em for bottom margin, but I have no idea why those 
particular values work.
3. Is there a better or more predictable way to achieve the dropped cap 
effect?

Thanks,

Eliot.
-- 
W. Eliot Kimber, eliot at isogen.com
Consultant, ISOGEN International

1016 La Posada Dr., Suite 240
Austin, TX  78752 Phone: 512.656.4139

-------------------
(*) To unsubscribe, send a message with words 'unsubscribe xep-support'
in the body of the message to majordomo at renderx.com from the address
you are subscribed from.
(*) By using the Service, you expressly agree to these Terms of Service http://www.renderx.com/tos.html



More information about the Xep-support mailing list