internal static float[] GetFontAscenderDescenderNormalized(AbstractRenderer renderer) { PdfFont font = renderer.ResolveFirstPdfFont(); float fontSize = renderer.GetPropertyAsUnitValue(Property.FONT_SIZE).GetValue(); float[] fontAscenderDescenderFromMetrics = TextRenderer.CalculateAscenderDescender(font, RenderingMode.HTML_MODE ); float fontAscender = fontAscenderDescenderFromMetrics[0] / FontProgram.UNITS_NORMALIZATION * fontSize; float fontDescender = fontAscenderDescenderFromMetrics[1] / FontProgram.UNITS_NORMALIZATION * fontSize; return(new float[] { fontAscender, fontDescender }); }