Examples of TTFDirTabEntry


Examples of org.apache.fop.fonts.truetype.TTFDirTabEntry

    private void readGDEF() throws IOException {
        TTFTableName tableTag = TTFTableName.GDEF;
        // Initialize temporary state
        initATState();
        // Read glyph definition (GDEF) table
        TTFDirTabEntry dirTab = ttf.getDirectoryEntry( tableTag );
        if ( gdef != null ) {
            if (log.isDebugEnabled()) {
                log.debug(tableTag + ": ignoring duplicate table");
            }
        } else if (dirTab != null) {
            ttf.seekTab(in, tableTag, 0);
            long version = in.readTTFULong();
            if (log.isDebugEnabled()) {
                log.debug(tableTag + " version: " + ( version / 65536 ) + "." + ( version % 65536 ));
            }
            // glyph class definition table offset (may be null)
            int cdo = in.readTTFUShort();
            // attach point list offset (may be null)
            int apo = in.readTTFUShort();
            // ligature caret list offset (may be null)
            int lco = in.readTTFUShort();
            // mark attach class definition table offset (may be null)
            int mao = in.readTTFUShort();
            // mark glyph sets definition table offset (may be null)
            int mgo;
            if ( version >= 0x00010002 ) {
                mgo = in.readTTFUShort();
            } else {
                mgo = 0;
            }
            if (log.isDebugEnabled()) {
                log.debug(tableTag + " glyph class definition table offset: " + cdo );
                log.debug(tableTag + " attachment point list offset: " + apo );
                log.debug(tableTag + " ligature caret list offset: " + lco );
                log.debug(tableTag + " mark attachment class definition table offset: " + mao );
                log.debug(tableTag + " mark glyph set definitions table offset: " + mgo );
            }
            // initialize subtable sequence number
            int seqno = 0;
            // obtain offset to start of gdef table
            long to = dirTab.getOffset();
            // (optionally) read glyph class definition subtable
            if ( cdo != 0 ) {
                readGDEFClassDefTable ( tableTag, seqno++, to + cdo );
            }
            // (optionally) read glyph attachment point subtable
View Full Code Here

Examples of org.apache.fop.fonts.truetype.TTFDirTabEntry

    private void readGSUB() throws IOException {
        TTFTableName tableTag = TTFTableName.GSUB;
        // Initialize temporary state
        initATState();
        // Read glyph substitution (GSUB) table
        TTFDirTabEntry dirTab = ttf.getDirectoryEntry ( tableTag );
        if ( gpos != null ) {
            if (log.isDebugEnabled()) {
                log.debug(tableTag + ": ignoring duplicate table");
            }
        } else if (dirTab != null) {
            ttf.seekTab(in, tableTag, 0);
            int version = in.readTTFLong();
            if (log.isDebugEnabled()) {
                log.debug(tableTag + " version: " + ( version / 65536 ) + "." + ( version % 65536 ));
            }
            int slo = in.readTTFUShort();
            int flo = in.readTTFUShort();
            int llo = in.readTTFUShort();
            if (log.isDebugEnabled()) {
                log.debug(tableTag + " script list offset: " + slo );
                log.debug(tableTag + " feature list offset: " + flo );
                log.debug(tableTag + " lookup list offset: " + llo );
            }
            long to = dirTab.getOffset();
            readCommonLayoutTables ( tableTag, to + slo, to + flo, to + llo );
            GlyphSubstitutionTable gsub;
            if ( ( gsub = constructGSUB() ) != null ) {
                this.gsub = gsub;
            }
View Full Code Here

Examples of org.apache.fop.fonts.truetype.TTFDirTabEntry

    private void readGPOS() throws IOException {
        TTFTableName tableTag = TTFTableName.GPOS;
        // Initialize temporary state
        initATState();
        // Read glyph positioning (GPOS) table
        TTFDirTabEntry dirTab = ttf.getDirectoryEntry ( tableTag );
        if ( gpos != null ) {
            if (log.isDebugEnabled()) {
                log.debug(tableTag + ": ignoring duplicate table");
            }
        } else if (dirTab != null) {
            ttf.seekTab(in, tableTag, 0);
            int version = in.readTTFLong();
            if (log.isDebugEnabled()) {
                log.debug(tableTag + " version: " + ( version / 65536 ) + "." + ( version % 65536 ));
            }
            int slo = in.readTTFUShort();
            int flo = in.readTTFUShort();
            int llo = in.readTTFUShort();
            if (log.isDebugEnabled()) {
                log.debug(tableTag + " script list offset: " + slo );
                log.debug(tableTag + " feature list offset: " + flo );
                log.debug(tableTag + " lookup list offset: " + llo );
            }
            long to = dirTab.getOffset();
            readCommonLayoutTables ( tableTag, to + slo, to + flo, to + llo );
            GlyphPositioningTable gpos;
            if ( ( gpos = constructGPOS() ) != null ) {
                this.gpos = gpos;
            }
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.