Examples of TTFFontDataFile


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

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

            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
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.