Package org.apache.fontbox.type1

Examples of org.apache.fontbox.type1.DamagedFontException


    public PDType1Font(COSDictionary fontDictionary) throws IOException
    {
        super(fontDictionary);

        PDFontDescriptor fd = getFontDescriptor();
        Type1Font t1 = null;
        boolean fontIsDamaged = false;
        if (fd != null)
        {
            // a Type1 font may contain a Type1C font
            PDStream fontFile3 = fd.getFontFile3();
View Full Code Here


     * @param postScriptName PostScript font name
     */
    public static Type1Font getType1Font(String postScriptName)
    {
        // first ask the font provider for the font
        Type1Font t1 = getProvider().getType1Font(postScriptName);
        if (t1 == null)
        {
            // then try substitutes
            for (String substituteName : getSubstitutes(postScriptName))
            {
View Full Code Here

     *
     * @param postScriptName PostScript font name
     */
    public static Type1Equivalent getType1EquivalentFont(String postScriptName)
    {
        Type1Font t1 = getType1Font(postScriptName);
        if (t1 != null)
        {
            return t1;
        }

View Full Code Here

    private void addType1Font(File pfbFile) throws IOException
    {
        InputStream input = new FileInputStream(pfbFile);
        try
        {
            Type1Font type1 = Type1Font.createWithPFB(input);

            String psName = type1.getFontName();
            type1FontFiles.put(psName, pfbFile);

            if (LOG.isTraceEnabled())
            {
                LOG.trace("PFB: '" + psName + "' / '" + type1.getFamilyName() + "' / '" +
                        type1.getWeight() + "'");
            }
        }
        finally
        {
            input.close();
View Full Code Here

    }

    @Override
    public synchronized Type1Font getType1Font(String postScriptName)
    {
        Type1Font type1 = type1Fonts.get(postScriptName);
        if (type1 != null)
        {
            return type1;
        }
View Full Code Here

TOP

Related Classes of org.apache.fontbox.type1.DamagedFontException

Copyright © 2018 www.massapicom. 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.