Package org.foray.font.format

Examples of org.foray.font.format.Panose


    /**
     * {@inheritDoc}
     */
    public FontUse selectFontPanose(final byte[] panose, final int codePoint)
            throws FontException {
        final Panose desiredPanose = Panose.makeInstance(panose);
        RegisteredFontDesc bestFit = null;
        long bestDifference = Long.MAX_VALUE;
        for (RegisteredFontFamily rff : this.server.registeredFontFamilies()) {
            for (int i = 0; i < rff.getFontDescriptions().size(); i++) {
                final RegisteredFontDesc rfd = rff.getFontDescriptions().get(i);
                final Panose panoseInstance = rfd.getRegisteredFont()
                        .getPanose();
                final long difference = panoseInstance.difference(desiredPanose, null);
                if (difference < bestDifference) {
                    bestDifference = difference;
                    bestFit = rfd;
                }
            }
View Full Code Here

TOP

Related Classes of org.foray.font.format.Panose

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.