Examples of FontMetric


Examples of org.apache.fontbox.afm.FontMetric

     * @throws IOException if we cannot find the width.
     */
    protected float getFontWidthFromAFMFile( int code ) throws IOException
    {
        float retval = 0;
        FontMetric metric = getAFM();
        if( metric != null )
        {
            Encoding encoding = getFontEncoding();
            String characterName = encoding.getName( code );
            retval = metric.getCharacterWidth( characterName );
        }
        return retval;
    }
View Full Code Here

Examples of org.apache.fontbox.afm.FontMetric

     * @throws IOException if we cannot find the width.
     */
    protected float getAverageFontWidthFromAFMFile() throws IOException
    {
        float retval = 0;
        FontMetric metric = getAFM();
        if( metric != null )
        {
            retval = metric.getAverageCharacterWidth();
        }
        return retval;
    }
View Full Code Here

Examples of org.apache.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 = getFontEncoding();
            String characterName = encoding.getName( code );
            retval = metric.getCharacterHeight( characterName );
        }
        else
        {
            PDFontDescriptor desc = getFontDescriptor();
            if( desc != null )
View Full Code Here

Examples of org.apache.fontbox.afm.FontMetric

            int supplement = cidsysteminfo.getInt(COSName.SUPPLEMENT);
            cmapName = registry + "-" + ordering+ "-" + supplement;
            cmapName = CMapSubstitution.substituteCMap( cmapName );
            cmap = cmapObjects.get( cmapName );
        }
        FontMetric metric = getAFM();
        if( metric != null )
        {
            fontEncoding = new AFMEncoding( metric );
        }
       
View Full Code Here

Examples of org.apache.fontbox.afm.FontMetric

     * @throws IOException if we cannot find the width.
     */
    protected float getFontWidthFromAFMFile( int code ) throws IOException
    {
        float retval = 0;
        FontMetric metric = getAFM();
        if( metric != null )
        {
            Encoding encoding = getEncoding();
            String characterName = encoding.getName( code );
            retval = metric.getCharacterWidth( characterName );
        }
        return retval;
    }
View Full Code Here

Examples of org.apache.fontbox.afm.FontMetric

     * @throws IOException if we cannot find the width.
     */
    protected float getAverageFontWidthFromAFMFile() throws IOException
    {
        float retval = 0;
        FontMetric metric = getAFM();
        if( metric != null )
        {
            retval = metric.getAverageCharacterWidth();
        }
        return retval;
    }
View Full Code Here

Examples of org.apache.fontbox.afm.FontMetric

    {
        super.determineEncoding();
        Encoding fontEncoding = getFontEncoding();
        if(fontEncoding == null)
        {
            FontMetric metric = getAFM();
            if (metric != null)
            {
                fontEncoding = new AFMEncoding( metric );
            }
            setFontEncoding(fontEncoding);
View Full Code Here

Examples of org.apache.fontbox.afm.FontMetric

    {
        super.determineEncoding();
        Encoding fontEncoding = getFontEncoding();
        if(fontEncoding == null)
        {
            FontMetric metric = getAFM();
            if (metric != null)
            {
                fontEncoding = new AFMEncoding( metric );
            }
            setFontEncoding(fontEncoding);
View Full Code Here

Examples of org.apache.fontbox.afm.FontMetric

        if (avgFontHeight > 0)
        {
            return avgFontHeight;
        }
        float retval = 0;
        FontMetric metric = getAFM();
        if( metric != null )
        {
            int code = getCodeFromArray( c, offset, length );
            Encoding encoding = getFontEncoding();
            String characterName = encoding.getName( code );
            retval = metric.getCharacterHeight( characterName );
        }
        else
        {
            PDFontDescriptor desc = getFontDescriptor();
            if( desc != null )
View Full Code Here

Examples of org.apache.fontbox.afm.FontMetric

     * @throws IOException if we cannot find the width.
     */
    protected float getFontWidthFromAFMFile( int code ) throws IOException
    {
        float retval = 0;
        FontMetric metric = getAFM();
        if( metric != null )
        {
            String characterName = fontEncoding.getName( code );
            retval = metric.getCharacterWidth( characterName );
        }
        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.