+void GetGlyphMetricsFromCharacterIndex(CharacterIndex index, const GlyphInfo* const glyphInfoBuffer, const GlyphIndex* const charactersToGlyphBuffer, const Length* const glyphsPerCharacterBuffer, MetricsPtr& metrics, GlyphMetrics& glyphMetrics, GlyphIndex& glyphIndex, Length& numberOfGlyphs)
+{
+ //Takes the character index, obtains the glyph index (and the number of Glyphs) from it and finally gets the glyph metrics.
+ glyphIndex = *(charactersToGlyphBuffer + index);
+ numberOfGlyphs = *(glyphsPerCharacterBuffer + index);
+
+ // Get the metrics for the group of glyphs.
+ GetGlyphsMetrics(glyphIndex,
+ numberOfGlyphs,
+ glyphMetrics,
+ glyphInfoBuffer,
+ metrics);
+}
+