X-Git-Url: http://deadsoftware.ru/gitweb?a=blobdiff_plain;f=src%2Fgame%2Frenders%2Fopengl%2Fr_textures.pas;h=64d4f533ab39c7fd89e4704d808258864489a51e;hb=38f37ffd695612d219b1dbd7bf3165880a012502;hp=b51afd2e964bfbd9a76e2edddc8cf4641a43e97f;hpb=6566ca53c9b557146e5ac5bd204ae0313b66e158;p=d2df-sdl.git diff --git a/src/game/renders/opengl/r_textures.pas b/src/game/renders/opengl/r_textures.pas index b51afd2..64d4f53 100644 --- a/src/game/renders/opengl/r_textures.pas +++ b/src/game/renders/opengl/r_textures.pas @@ -111,6 +111,7 @@ interface destructor Destroy; override; function GetChar (c: AnsiChar): TGLTexture; function GetWidth (c: AnsiChar): Integer; + function GetMaxWidth (): Integer; function GetMaxHeight (): Integer; function GetSpace (): Integer; end; @@ -778,6 +779,15 @@ implementation result := self.info.ch[c].w; if result = 0 then result := self.info.w; + if self.info.kern < 0 then + result := result + self.info.kern; + end; + + function TGLFont.GetMaxWidth (): Integer; + begin + result := self.info.w; + if self.info.kern < 0 then + result := result + self.info.kern; end; function TGLFont.GetMaxHeight (): Integer;