Package org.apache.flex.swf.tags

Examples of org.apache.flex.swf.tags.DefineFontTag


    private ITag readDefineFont() throws IOException, MalformedTagException
    {
        final int id = bitStream.readUI16();
        final int firstGlyphShapeOffset = bitStream.readUI16();
        final int numGlyphs = firstGlyphShapeOffset / 2;
        final DefineFontTag tag = new DefineFontTag();
        tag.setCharacterID(id);

        final long[] offsetTable = new long[numGlyphs];
        offsetTable[0] = firstGlyphShapeOffset;
        for (int i = 1; i < numGlyphs; i++)
        {
            offsetTable[i] = bitStream.readUI16();
        }
        tag.setOffsetTable(offsetTable);

        final Shape[] glyphShapeTable = new Shape[numGlyphs];
        for (int i = 0; i < numGlyphs; i++)
        {
            glyphShapeTable[i] = readShape(tag.getTagType());
        }
        tag.setGlyphShapeTable(glyphShapeTable);

        return tag;
    }
View Full Code Here

TOP

Related Classes of org.apache.flex.swf.tags.DefineFontTag

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.