Ejemplo n.º 1
0
 public int GetKerning(int previousChar)
 {
     if (this.kerning != null)
     {
         int num   = 0;
         int count = this.kerning.Count;
         while (num < count)
         {
             BMGlyph.Kerning item = this.kerning[num];
             if (item.previousChar == previousChar)
             {
                 return(item.amount);
             }
             num++;
         }
     }
     return(0);
 }
Ejemplo n.º 2
0
 public void SetKerning(int previousChar, int amount)
 {
     if (this.kerning == null)
     {
         this.kerning = new List<BMGlyph.Kerning>();
     }
     for (int i = 0; i < this.kerning.Count; i++)
     {
         if (this.kerning[i].previousChar == previousChar)
         {
             BMGlyph.Kerning item = this.kerning[i];
             item.amount = amount;
             this.kerning[i] = item;
             return;
         }
     }
     BMGlyph.Kerning kerning = new BMGlyph.Kerning()
     {
         previousChar = previousChar,
         amount = amount
     };
     this.kerning.Add(kerning);
 }
Ejemplo n.º 3
0
 public void SetKerning(int previousChar, int amount)
 {
     if (this.kerning == null)
     {
         this.kerning = new List <BMGlyph.Kerning>();
     }
     for (int i = 0; i < this.kerning.Count; i++)
     {
         if (this.kerning[i].previousChar == previousChar)
         {
             BMGlyph.Kerning item = this.kerning[i];
             item.amount     = amount;
             this.kerning[i] = item;
             return;
         }
     }
     BMGlyph.Kerning kerning = new BMGlyph.Kerning()
     {
         previousChar = previousChar,
         amount       = amount
     };
     this.kerning.Add(kerning);
 }