Move get_character_index() out of the GlyphCache. It does not belong there