X-Git-Url: http://deadsoftware.ru/gitweb?a=blobdiff_plain;f=src%2Fgame%2Frenders%2Fopengl%2Fr_textures.pas;h=64d4f533ab39c7fd89e4704d808258864489a51e;hb=38f37ffd695612d219b1dbd7bf3165880a012502;hp=5950e36f6f272bf67b39af7fd2cfac386291ae6a;hpb=86639e1fae2121ee4e86727933dfa1f06983b67c;p=d2df-sdl.git diff --git a/src/game/renders/opengl/r_textures.pas b/src/game/renders/opengl/r_textures.pas index 5950e36..64d4f53 100644 --- a/src/game/renders/opengl/r_textures.pas +++ b/src/game/renders/opengl/r_textures.pas @@ -111,6 +111,8 @@ interface destructor Destroy; override; function GetChar (c: AnsiChar): TGLTexture; function GetWidth (c: AnsiChar): Integer; + function GetMaxWidth (): Integer; + function GetMaxHeight (): Integer; function GetSpace (): Integer; end; @@ -777,6 +779,20 @@ 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; + begin + result := self.info.h; end; function TGLFont.GetSpace (): Integer;