Package org.axsl.hyphen

Examples of org.axsl.hyphen.HyphenationServer


        final FontServer fontServer = FOraySpecific.makeFontServer(logger,
                sessionConfig);
        final GraphicServer graphicServer = FOraySpecific.makeGraphicServer(
                logger);
        final HyphenationServer hyphenServer =
            FOraySpecific.makeHyphenationServer(logger, sessionConfig);
        final TextServer textServer = FOraySpecific.makeTextServer(logger,
                hyphenServer);
        final URL[] graphicSearchPath = new URL[1];
        final URL testDirUrl = this.testDirectory.toURI().toURL();
View Full Code Here


         * TODO: This is not quite right yet. If the current word starts at
         * the beginning of the text being considered, we need to look
         * backward at any text in the same LineText item, and then to prior
         * LineText items to find the beginning of the word.
         */
        final HyphenationServer server =
                this.getTextServer().getHyphenationServer();
        final Language language = this.currentLineText.inlineLanguage();
        final Country country = this.currentLineText.inlineCountry();
        // Count the number of chars at the beginning that should be ignored.
        final int actualWordStart = server.wordStarts(this.currentChars,
                this.wordStart, language, country);
        if (actualWordStart < 0) {
            return this.wordStart;
        }
        final int nonWordChars = actualWordStart - this.wordStart;
        // Extract the word that should be evaluated by the hyphenation system.
        final int wordSize = server.wordSize(this.currentChars, actualWordStart,
                language, country);
        // See if there are discretionary hyphenation points.
        Hyphenation hyph = null;
        try {
            hyph = server.hyphenate(this.currentChars, actualWordStart,
                    wordSize, language, country,
                    this.currentLineText.inlineHyphenationRemainCount(),
                    this.currentLineText.inlineHyphenationPushCount(), false);
        } catch (final HyphenationException e) {
            /* Log the exception and continue. */
 
View Full Code Here

    public static FOraySession makeFOraySession(
            final SessionConfig sessionConfig) throws FOrayException {
        final Log logger = FOraySpecific.makeLogger(sessionConfig);
        final FontServer fontServer = FOraySpecific.makeFontServer(logger,
                sessionConfig);
        final HyphenationServer hyphenServer =
                FOraySpecific.makeHyphenationServer(logger, sessionConfig);
        final TextServer textServer = FOraySpecific.makeTextServer(logger,
                hyphenServer);
        final GraphicServer graphicServer = FOraySpecific.makeGraphicServer(
                logger);
View Full Code Here

TOP

Related Classes of org.axsl.hyphen.HyphenationServer

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.