I'm having a problem with Text figures (see Wikipedia) in a PDF document created with itextsharp
.
The distances between the baseline and the lowest point of a number (e.g. 9
) is NOT the same as the normal descender height of a font.
With the following code i can calculate the height of the descender of a font:
var fontSize = 60;
var fontPath = @"CorpusGothic-Condensed.otf";
var font = BaseFont.CreateFont(fontPath, BaseFont.CP1252, BaseFont.EMBEDDED);
var descentHeight = font.GetFontDescriptor(BaseFont.DESCENT, fontSize)
My question now:
Is it possible to get the descender- or ascender-heights of the numbers in a font with text-figures as shown on the Wikipedia page?