From 36ad87b2e0d2f28ef7dc1e8c43c9aa2d1024daff Mon Sep 17 00:00:00 2001 From: tobigun Date: Fri, 7 Nov 2008 20:59:33 +0000 Subject: - string replaced with UTF8String (although it's just a typedef) to mark UTF8 strings. - misc. unicode compatibility fixes git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/branches/experimental@1509 b956fd51-792f-4845-bead-9b4dfca2ff2c --- unicode/src/base/TextGL.pas | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'unicode/src/base/TextGL.pas') diff --git a/unicode/src/base/TextGL.pas b/unicode/src/base/TextGL.pas index 2bc68637..28c3c6b6 100644 --- a/unicode/src/base/TextGL.pas +++ b/unicode/src/base/TextGL.pas @@ -55,8 +55,8 @@ var procedure BuildFont; // build our bitmap font procedure KillFont; // delete the font -function glTextWidth(const text: string): real; // returns text width -procedure glPrint(const text: string); // custom GL "Print" routine +function glTextWidth(const text: UTF8String): real; // returns text width +procedure glPrint(const text: UTF8String); // custom GL "Print" routine procedure ResetFont(); // reset font settings of active font procedure SetFontPos(X, Y: real); // sets X and Y procedure SetFontZ(Z: real); // sets Z @@ -132,7 +132,7 @@ begin //glDeleteLists(..., 256); end; -function glTextWidth(const text: string): real; +function glTextWidth(const text: UTF8String): real; var Bounds: TBoundsDbl; begin @@ -141,7 +141,7 @@ begin end; // Custom GL "Print" Routine -procedure glPrint(const Text: string); +procedure glPrint(const Text: UTF8String); var GLFont: PGLFont; begin @@ -155,7 +155,6 @@ begin // set font position glTranslatef(GLFont.X, GLFont.Y + GLFont.Font.Ascender, GLFont.Z); // draw string - //GLFont.Font.Print(RecodeString(Text, encCP1252)); GLFont.Font.Print(Text); glPopMatrix(); end; -- cgit v1.2.3