Example usage for com.itextpdf.text.pdf BaseFont ASCENT

List of usage examples for com.itextpdf.text.pdf BaseFont ASCENT

Introduction

In this page you can find the example usage for com.itextpdf.text.pdf BaseFont ASCENT.

Prototype

int ASCENT

To view the source code for com.itextpdf.text.pdf BaseFont ASCENT.

Click Source Link

Document

The maximum height above the baseline reached by glyphs in this font, excluding the height of glyphs for accented characters.

Usage

From source file:com.chaschev.itext.ColumnTextBuilder.java

License:Apache License

private static float calcApproximateFontHeight(Font font) {
    final BaseFont baseFont = font.getBaseFont();

    return baseFont.getFontDescriptor(BaseFont.ASCENT, font.getSize())
            - baseFont.getFontDescriptor(BaseFont.DESCENT, font.getSize());
}