Sfoglia il codice sorgente

Scintilla: Fixed char advance.

Branimir Karadžić 10 anni fa
parent
commit
c7ea0a6a97
1 ha cambiato i file con 1 aggiunte e 6 eliminazioni
  1. 1 6
      examples/common/imgui/scintilla.cpp

+ 1 - 6
examples/common/imgui/scintilla.cpp

@@ -217,12 +217,7 @@ public:
 
 		while (_len--)
 		{
-			int advance;
-
-			const ImFont::Glyph* glyph = imFont->FindGlyph( (unsigned short)*_str++);
-			advance = glyph->XAdvance;
-
-			position     += advance;
+			position     += imFont->GetCharAdvance( (unsigned short)*_str++);
 			*_positions++ = position;
 		}
 	}