瀏覽代碼

Merge pull request #2004 from iainmerrick/kerning_fix

Fix kerning pairs (#2003)
Lasse Öörni 8 年之前
父節點
當前提交
5475c48298
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2 2
      Source/Urho3D/UI/FontFaceFreeType.cpp

+ 2 - 2
Source/Urho3D/UI/FontFaceFreeType.cpp

@@ -268,8 +268,8 @@ bool FontFaceFreeType::Load(const unsigned char* fontData, unsigned fontDataSize
                         unsigned rightIndex = deserializer.ReadUShort();
                         short amount = FixedToFloat(deserializer.ReadShort());
 
-                        unsigned leftCharCode = leftIndex < numGlyphs ? charCodes[leftIndex] : 0;
-                        unsigned rightCharCode = rightIndex < numGlyphs ? charCodes[rightIndex] : 0;
+                        unsigned leftCharCode = leftIndex < numGlyphs ? charCodes[leftIndex + 1] : 0;
+                        unsigned rightCharCode = rightIndex < numGlyphs ? charCodes[rightIndex + 1] : 0;
                         if (leftCharCode != 0 && rightCharCode != 0)
                         {
                             unsigned value = (leftCharCode << 16) + rightCharCode;