Package org.jnode.awt.font.truetype

Examples of org.jnode.awt.font.truetype.TTFFontDataFile


            // final URL url = ClassLoader.getSystemResource(name);
            final ClassLoader cl = Thread.currentThread()
                .getContextClassLoader();
            final URL url = cl.getResource(resName);
            if (url != null) {
                return new TTFFontDataFile(url);
            } else {
                throw new Error("Cannot find font resource " + resName);
            }
        } catch (IOException ex) {
            throw new Error("Cannot find font " + resName + ": " + ex.getMessage());
View Full Code Here


            text = args[0];
        } else {
            text = "a";
        }

        ttf = new TTFFontDataFile(TTFFileTest.class.getResource("/" + fontName));
        //ttf.show();

        System.out.println("Font " + ttf.getNameTable().getFontFamilyName());
        // bbox chars: 188, 375, 198, 353
        //Rectangle maxCharBounds  = ((TTFHeadTable)ttf.getTable(TTFFont.FontHeaderTable)).getMaxCharBounds();
View Full Code Here

TOP

Related Classes of org.jnode.awt.font.truetype.TTFFontDataFile

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.