Package org.axsl.font

Examples of org.axsl.font.FontUse


     * @param lineText The object providing font and font size information.
     * @param word The word whose size is needed.
     * @return The width, in millipoints, of {@code word}.
     */
    public int getWordWidth(final LineText lineText, final CharSequence word) {
        final FontUse fontUse = lineText.inlinePrimaryFont();
        final Font font = fontUse.getFont();
        fontUse.registerCharsUsed(word);
        return font.width(word,
                lineText.inlineFontSize(),
                lineText.inlineLetterSpacingOptimum(), 0, true);
    }
View Full Code Here


     * Computes the width of a word, in millipoints.
     * @param word The word whose width should be computed.
     * @return The width of the word, in millipoints.
     */
    public int getWordWidth(final CharSequence word) {
        final FontUse fontUse = getPrimaryFont();
        final Font font = fontUse.getFont();
        fontUse.registerCharsUsed(word);
        return font.width(word, traitFontSize(),
                traitGeneratedBy().traitLetterSpacingOpt(this),
                traitGeneratedBy().traitWordSpacingOpt(this), true);
    }
View Full Code Here

TOP

Related Classes of org.axsl.font.FontUse

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.