Examples of CMAPTable


Examples of com.google.typography.font.sfntly.table.core.CMapTable

      com.google.typography.font.sfntly.table.truetype.Glyph glyph = glyphTable.glyph(offset, length);
    return glyph;
  }

  private int lookupGlyphIndex(char ch) {
    CMapTable cmapTable = font.getTable(Tag.cmap);
      CMap cmap = cmapTable.cmap(CMapId.WINDOWS_BMP);
      int glyphId = cmap.glyphId(ch);
    return glyphId;
  }
View Full Code Here

Examples of com.sun.pdfview.font.ttf.CmapTable

     * Get the outline of a character given the character code
     */
    @Override
  protected synchronized GeneralPath getOutline (char src, float width) {
        // find the cmaps
        CmapTable cmap = (CmapTable) this.font.getTable ("cmap");

        // if there are no cmaps, this is (hopefully) a cid-mapped font,
        // so just trust the value we were given for src
        if (cmap == null) {
            return getOutline ((int) src, width);
        }

        CMap[] maps = cmap.getCMaps ();

        // try the maps in order
        for (int i = 0; i < maps.length; i++) {
            int idx = maps[i].map (src);
            if (idx != 0) {
View Full Code Here

Examples of com.sun.pdfview.font.ttf.CmapTable

     * @return GeneralPath
     */
    protected synchronized GeneralPath getOutlineFromCMaps (char val,
                                                            float width) {
        // find the cmaps
        CmapTable cmap = (CmapTable) this.font.getTable ("cmap");

        if (cmap == null) {
            return null;
        }

        // try maps in required order of (3, 1), (1, 0)
        CMap map = cmap.getCMap ((short) 3, (short) 1);
        if (map == null) {
            map = cmap.getCMap ((short) 1, (short) 0);
        }
        int idx = map.map (val);
        if (idx != 0) {
            return getOutline (idx, width);
        }
View Full Code Here

Examples of org.apache.batik.svggen.font.table.CmapTable

         * Contains multiple mapping tables from Unicode and various 8-bit encodings to glyph ids.
         * Multi-platform.
         */
        private void processCmapTable(Font font)
        {
            CmapTable cmap = font.getCmapTable();

            if (cmap != null)
            {
                // Decide upon a cmap table to use for our character to glyph look-up
                if (forceAscii)
                {
                    // We've been asked to use the ASCII/Macintosh cmap format
                    cmapFmt = cmap.getCmapFormat(Table.platformMacintosh, Table.encodingRoman);
                    platformID = PLATFORM_MACINTOSH;
                    encodingID = ENCODING_ROMAN;
                }
                else
                {
                    // The default behaviour is to use the Unicode cmap encoding
                    cmapFmt = cmap.getCmapFormat(Table.platformMicrosoft, Table.encodingUGL);
                    if (cmapFmt == null)
                    {
                        // This might be a symbol font, so we'll look for an "undefined" encoding
                        cmapFmt = cmap.getCmapFormat(Table.platformMicrosoft, Table.encodingUndefined);
                        platformID = PLATFORM_MICROSOFT;
                        encodingID = ENCODING_UNDEFINED;
                    }
                    else
                    {
View Full Code Here

Examples of org.apache.flex.forks.batik.svggen.font.table.CmapTable

         * Contains multiple mapping tables from Unicode and various 8-bit encodings to glyph ids.
         * Multi-platform.
         */
        private void processCmapTable(Font font)
        {
            CmapTable cmap = font.getCmapTable();

            if (cmap != null)
            {
                // Decide upon a cmap table to use for our character to glyph look-up
                if (forceAscii)
                {
                    // We've been asked to use the ASCII/Macintosh cmap format
                    cmapFmt = cmap.getCmapFormat(Table.platformMacintosh, Table.encodingRoman);
                    platformID = PLATFORM_MACINTOSH;
                    encodingID = ENCODING_ROMAN;
                }
                else
                {
                    // The default behaviour is to use the Unicode cmap encoding
                    cmapFmt = cmap.getCmapFormat(Table.platformMicrosoft, Table.encodingUGL);
                    if (cmapFmt == null)
                    {
                        // This might be a symbol font, so we'll look for an "undefined" encoding
                        cmapFmt = cmap.getCmapFormat(Table.platformMicrosoft, Table.encodingUndefined);
                        platformID = PLATFORM_MICROSOFT;
                        encodingID = ENCODING_UNDEFINED;
                    }
                    else
                    {
View Full Code Here

Examples of org.apache.fontbox.ttf.CMAPTable

            //hmm there does not seem to be a clear definition for StemV,
            //this is close enough and I am told it doesn't usually get used.
            fd.setStemV( (fd.getFontBoundingBox().getWidth() * .13f) );

            CMAPTable cmapTable = ttf.getCMAP();
            CMAPEncodingEntry[] cmaps = cmapTable.getCmaps();
            CMAPEncodingEntry uniMap = null;
           
            for( int i=0; i<cmaps.length; i++ )
            {
                if( cmaps[i].getPlatformId() == CMAPTable.PLATFORM_WINDOWS)
View Full Code Here

Examples of org.apache.fontbox.ttf.CMAPTable

            //hmm there does not seem to be a clear definition for StemV,
            //this is close enough and I am told it doesn't usually get used.
            fd.setStemV( (fd.getFontBoundingBox().getWidth() * .13f) );

            CMAPTable cmapTable = ttf.getCMAP();
            CMAPEncodingEntry[] cmaps = cmapTable.getCmaps();
            CMAPEncodingEntry uniMap = null;
           
            for( int i=0; i<cmaps.length; i++ )
            {
                if( cmaps[i].getPlatformId() == CMAPTable.PLATFORM_WINDOWS)
View Full Code Here

Examples of org.apache.fontbox.ttf.CMAPTable

            //hmm there does not seem to be a clear definition for StemV,
            //this is close enough and I am told it doesn't usually get used.
            fd.setStemV( (fd.getFontBoundingBox().getWidth() * .13f) );


            CMAPTable cmapTable = ttf.getCMAP();
            CMAPEncodingEntry[] cmaps = cmapTable.getCmaps();
            int[] glyphToCCode = null;
            for( int i=0; i<cmaps.length; i++ )
            {
                if( cmaps[i].getPlatformId() == CMAPTable.PLATFORM_WINDOWS &&
                    cmaps[i].getPlatformEncodingId() == CMAPTable.ENCODING_UNICODE )
View Full Code Here

Examples of org.apache.fontbox.ttf.CMAPTable

        TTFParser parser = new TTFParser();

        TrueTypeFont arial = parser.parseTTF(arialIs);

        CMAPTable cmap = arial.getCMAP();
        Assert.assertNotNull(cmap);

        CMAPEncodingEntry[] cmaps = cmap.getCmaps();
        Assert.assertNotNull(cmaps);

        CMAPEncodingEntry uc = null;

        for (CMAPEncodingEntry e : cmaps)
View Full Code Here

Examples of org.apache.fontbox.ttf.CMAPTable

            //hmm there does not seem to be a clear definition for StemV,
            //this is close enough and I am told it doesn't usually get used.
            fd.setStemV( (fd.getFontBoundingBox().getWidth() * .13f) );

            CMAPTable cmapTable = ttf.getCMAP();
            CMAPEncodingEntry[] cmaps = cmapTable.getCmaps();
            CMAPEncodingEntry uniMap = null;
           
            for( int i=0; i<cmaps.length; i++ )
            {
                if( cmaps[i].getPlatformId() == CMAPTable.PLATFORM_WINDOWS)
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.