Explorar o código

Scintilla: Fixed char advance.

Branimir Karadžić %!s(int64=10) %!d(string=hai) anos
pai
achega
c7ea0a6a97
Modificáronse 1 ficheiros con 1 adicións e 6 borrados
  1. 1 6
      examples/common/imgui/scintilla.cpp

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

@@ -217,12 +217,7 @@ public:
 
 
 		while (_len--)
 		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;
 			*_positions++ = position;
 		}
 		}
 	}
 	}