Examples of FontMetric


Examples of org.fontbox.afm.FontMetric

     */
    public float getFontHeight( byte[] c, int offset, int length ) throws IOException
    {
        float retval = 0;
        int code = getCodeFromArray( c, offset, length );
        FontMetric metric = getAFM();
        if( metric != null )
        {
            Encoding encoding = getEncoding();
            COSName characterName = encoding.getName( code );
            retval = metric.getCharacterHeight( characterName.getName() );
        }
        else
        {
            PDFontDescriptor desc = getFontDescriptor();
            if( desc != null )
View Full Code Here

Examples of org.pdfbox.afmtypes.FontMetric

    {
        float retval = 0;
        COSName baseFont = (COSName)font.getDictionaryObject( COSName.BASE_FONT );
        if( baseFont != null )
        {
            FontMetric metric = getAFM( baseFont );
            if( metric != null )
            {
                Encoding encoding = getEncoding();
                COSName characterName = encoding.getName( code );
                retval = metric.getCharacterWidth( characterName.getName() );
            }
        }
        return retval;
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.