title: How is GlyphIndices property encoded in GlyphRun object?
body: <p>I am trying to build a <code>GlyphRun</code> object, and I can't seem to understand how <code>GlyphIndices</code> property is encoded.</p>
  
  <p>For example, the <a href="http://msdn.microsoft.com/en-us/library/ms751619%28v=vs.85%29.aspx#drawtext" rel="nofollow">following</a> XAML string creates "hello world". It is obvious that the following rules hold:</p>
  
  <ul>
  <li>43 -> h</li>
  <li>72 -> e</li>
  <li>79 -> l</li>
  </ul>
  
  <p>But what is this coding scheme? I tried ASCII and it doesn't seem to fit.</p>
  
  <p>Do you have any idea?</p>
  
  <hr>
  
  <pre><code>&lt;GlyphRunDrawing ForegroundBrush="Black"&gt;
    &lt;GlyphRunDrawing.GlyphRun&gt;
      &lt;GlyphRun 
        CaretStops="{x:Null}" 
        ClusterMap="{x:Null}" 
        IsSideways="False" 
        GlyphOffsets="{x:Null}" 
        GlyphIndices="43 72 79 79 82 3 58 82 85 79 71" 
        BaselineOrigin="0,12.29"  
        FontRenderingEmSize="13.333333333333334" 
        DeviceFontName="{x:Null}" 
        AdvanceWidths="9.62666666666667 7.41333333333333 2.96 2.96 7.41333333333333 3.70666666666667 12.5866666666667 7.41333333333333 4.44 2.96 7.41333333333333" 
        BidiLevel="0"&gt;
        &lt;GlyphRun.GlyphTypeface&gt;
          &lt;GlyphTypeface FontUri="C:\WINDOWS\Fonts\TIMES.TTF" /&gt;
        &lt;/GlyphRun.GlyphTypeface&gt;
      &lt;/GlyphRun&gt;
    &lt;/GlyphRunDrawing.GlyphRun&gt;
  &lt;/GlyphRunDrawing&gt;
  </code></pre>