Code example for CharBuffer

Methods: get

0
 
 
    public ByteBuffer getGlyphData(int glyph)
    { 
      int offset, limit;
      offset = ((int) indexToLoc.get(glyph)) << 1;
      limit = ((int) indexToLoc.get(glyph + 1)) << 1;
      if (offset >= limit)
        return null; 
 
      glyfTable.limit(limit).position(offset);
      return glyfTable;
    } 
  } 
 
 
  /** 
   * A GlyphLocator that locates glyphs using four-byte offsets, 
   * interpreting <code>loca</code> tables of format 1. 
   * 
   * @author Sascha Brawer (brawer@dandelis.ch)