Package org.apache.fop.complexscripts.util

Examples of org.apache.fop.complexscripts.util.GlyphSequence


                    GlyphTable.LookupTable lt = l.getLookup();
                    if ( lt != null ) {
                        // perform substitution on a copy of previous state
                        GlyphSubstitutionState ss = new GlyphSubstitutionState ( this );
                        // apply lookup table substitutions
                        GlyphSequence gs = lt.substitute ( ss, l.getSequenceIndex() );
                        // replace current input sequence starting at current position with result
                        if ( replaceInput ( 0, -1, gs ) ) {
                            nog = gs.getGlyphCount() - nlg;
                        }
                    }
                }
            }
            // output glyphs and associations
View Full Code Here


     * Construct glyph processing state using an existing state object using shallow copy
     * except as follows: input glyph sequence is copied deep except for its characters array.
     * @param s existing processing state to copy from
     */
    protected GlyphProcessingState ( GlyphProcessingState s ) {
        this ( new GlyphSequence ( s.igs ), s.script, s.language, s.feature, s.sct );
        setPosition ( s.index );
    }
View Full Code Here

            gb.put ( igs.getGlyph ( i ) );
            al.add ( igs.getAssociation ( i ) );
        }
        gb.flip();
        if ( igs.compareGlyphs ( gb ) != 0 ) {
            this.igs = new GlyphSequence ( igs.getCharacters(), gb, al );
            this.indexLast = gb.limit();
            return true;
        } else {
            return false;
        }
View Full Code Here

    }

    /** {@inheritDoc} */
    public CharSequence performSubstitution ( CharSequence cs, String script, String language ) {
        if ( gsub != null ) {
            GlyphSequence igs = mapCharsToGlyphs ( cs );
            GlyphSequence ogs = gsub.substitute ( igs, script, language );
            CharSequence ocs = mapGlyphsToChars ( ogs );
            return ocs;
        } else {
            return cs;
        }
View Full Code Here

    /** {@inheritDoc} */
    public CharSequence reorderCombiningMarks
        ( CharSequence cs, int[][] gpa, String script, String language ) {
        if ( gdef != null ) {
            GlyphSequence igs = mapCharsToGlyphs ( cs );
            GlyphSequence ogs = gdef.reorderCombiningMarks ( igs, gpa, script, language );
            CharSequence ocs = mapGlyphsToChars ( ogs );
            return ocs;
        } else {
            return cs;
        }
View Full Code Here

    /** {@inheritDoc} */
    public int[][]
        performPositioning ( CharSequence cs, String script, String language, int fontSize ) {
        if ( gpos != null ) {
            GlyphSequence gs = mapCharsToGlyphs ( cs );
            int[][] adjustments = new int [ gs.getGlyphCount() ] [ 4 ];
            if ( gpos.position ( gs, script, language, fontSize, this.width, adjustments ) ) {
                return scaleAdjustments ( adjustments, fontSize );
            } else {
                return null;
            }
View Full Code Here

            cb.put ( cc );
            gb.put ( gi );
        }
        cb.flip();
        gb.flip();
        return new GlyphSequence ( cb, gb, null );
    }
View Full Code Here

     * @param script a script identifier
     * @param language a language identifier
     * @return the substituted (output) glyph sequence
     */
    public GlyphSequence substitute ( GlyphSequence gs, String script, String language ) {
        GlyphSequence ogs;
        Map/*<LookupSpec,List<LookupTable>>*/ lookups = matchLookups ( script, language, "*" );
        if ( ( lookups != null ) && ( lookups.size() > 0 ) ) {
            ScriptProcessor sp = ScriptProcessor.getInstance ( script );
            ogs = sp.substitute ( this, gs, script, language, lookups );
        } else {
View Full Code Here

    }

    /** {@inheritDoc} */
    public CharSequence performSubstitution ( CharSequence cs, String script, String language ) {
        if ( gsub != null ) {
            GlyphSequence igs = mapCharsToGlyphs ( cs );
            GlyphSequence ogs = gsub.substitute ( igs, script, language );
            CharSequence ocs = mapGlyphsToChars ( ogs );
            return ocs;
        } else {
            return cs;
        }
View Full Code Here

    /** {@inheritDoc} */
    public CharSequence reorderCombiningMarks
        ( CharSequence cs, int[][] gpa, String script, String language ) {
        if ( gdef != null ) {
            GlyphSequence igs = mapCharsToGlyphs ( cs );
            GlyphSequence ogs = gdef.reorderCombiningMarks ( igs, gpa, script, language );
            CharSequence ocs = mapGlyphsToChars ( ogs );
            return ocs;
        } else {
            return cs;
        }
View Full Code Here

TOP

Related Classes of org.apache.fop.complexscripts.util.GlyphSequence

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.