* Attempts to create mapping of the characters to glyphs in the glyph vector.
* @return array where for each character index stored corresponding glyph index
*/
private int[] getChar2Glyph() {
if (char2glyph == null) {
GlyphVector gv = getGlyphVector();
char2glyph = new int[info.length];
Arrays.fill(char2glyph, -1);
// Fill glyph indicies for first characters corresponding to each glyph
int charIndicies[] = gv.getGlyphCharIndices(0, gv.getNumGlyphs(), null);
for (int i=0; i<charIndicies.length; i++) {
char2glyph[charIndicies[i]] = i;
}
// If several characters corresponds to one glyph, create mapping for them