HashMap readFormat6 ( ) throws IOException { HashMap h = new HashMap ( ) ; rf . skipBytes ( 4 ) ; int start_code = rf . readUnsignedShort ( ) ; int code_count = rf . readUnsignedShort ( ) ; for ( int k = 0 ; k < code_count ; ++ k ) { int r [ ] = new int [ 2 ] ; r [ 0 ] = rf . readUnsignedShort ( ) ; r [ 1 ] = getGlyphWidth ( r [ 0 ] ) ; h . put ( Integer . valueOf ( k + start_code ) , r ) ; } return h ; }
The information in the maps of the table cmap is coded in several formats . Format 6 is a trimmed table mapping . It is similar to format 0 but can have less than 256 entries .