My idea is to redefine the \strut to be as short as possible.
It means the length of strut is the sum of the tallest letter length and the deepest letter length.
|
My idea is to redefine the It means the length of strut is the sum of the tallest letter length and the deepest letter length. |
||||
| show 3 more comments |
|
One problem is that the font metrics do not include appropriate dimensions for this. The code below provides a short macro for displaying the font dimensions.
One solution is to use a
|
|||||||||
|
|
the strutbox is defined to exactly the height of
|
|||||||||||
|
|
The Luatex manual, section 4.4.5.1.2, Glyph items, documents the glyph array that exists for each font, which provides information on the bounding element of each rendered character:
This sounds like it is as good an approximation to what you want as you will get. Iterating over the glyphs in a font and computing the maximum altitude and depth of each should be fairly easy if you know Lua. |
|||||||||
|
Agshould usually be enough, perhaps with some safety margin. – Philipp Dec 22 '10 at 14:03{like in maths you should look-upmathstrut. – Yiannis Lazarides Dec 22 '10 at 16:37