From 66f499d9516f60a650a114a865687f4eb9ffaadd Mon Sep 17 00:00:00 2001 From: tobigun Date: Thu, 23 Jul 2009 14:58:51 +0000 Subject: some missing freetype functions added to headers git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/branches/experimental@1859 b956fd51-792f-4845-bead-9b4dfca2ff2c --- unicode/src/lib/freetype/demo/engine-test.bdsproj | 14 ++++---- unicode/src/lib/freetype/demo/engine-test.dpr | 16 ++++++---- unicode/src/lib/freetype/demo/engine-test.lpi | 39 ++++++++++++++--------- 3 files changed, 40 insertions(+), 29 deletions(-) (limited to 'unicode/src/lib/freetype/demo') diff --git a/unicode/src/lib/freetype/demo/engine-test.bdsproj b/unicode/src/lib/freetype/demo/engine-test.bdsproj index 9547f18f..e5b3e97d 100644 --- a/unicode/src/lib/freetype/demo/engine-test.bdsproj +++ b/unicode/src/lib/freetype/demo/engine-test.bdsproj @@ -27,13 +27,13 @@ 1 0 0 - 1 - 0 - 1 - 0 - 1 - 0 - 0 + 1 + 0 + 1 + 1 + 1 + 0 + 0 0 0 0 diff --git a/unicode/src/lib/freetype/demo/engine-test.dpr b/unicode/src/lib/freetype/demo/engine-test.dpr index 80177735..bbd7d890 100644 --- a/unicode/src/lib/freetype/demo/engine-test.dpr +++ b/unicode/src/lib/freetype/demo/engine-test.dpr @@ -27,7 +27,9 @@ uses ctypes in '../../ctypes/ctypes.pas', {$ENDIF} FreeType in '../freetype.pas', - UFont in '../../../base/UFont.pas', + UFont in 'UFont.pas', + //UFont in '../../../base/UFont.pas', + UUnicodeUtils in '../../../base/UUnicodeUtils.pas', math, sysutils; @@ -41,7 +43,7 @@ const //FONT_FILE = 'C:/Windows/Fonts/Arial.ttf'; //FONT_FILE = 'C:/Windows/Fonts/SimSun.ttf'; //FONT_FILE = 'eurostarregularextended.ttf'; - FONT_FILE = 'FreeSans.ttf'; + FONT_FILE = '../../../../game/fonts/FreeSans/FreeSans.ttf'; var OurFont: TScalableFont; @@ -129,11 +131,11 @@ begin // Really Nice Perspective Calculations glHint( GL_PERSPECTIVE_CORRECTION_HINT, GL_NICEST ); - //OurFont := TFTScalableFont.Create(FONT_FILE, 64); + OurFont := TFTScalableFont.Create(FONT_FILE, 64, 0.03); //OurFont := TFTFont.Create(FONT_FILE, 128); - OurFont := TFTScalableOutlineFont.Create(FONT_FILE, 64, 0.05); + //OurFont := TFTScalableOutlineFont.Create(FONT_FILE, 64, 0.03); //OurFont.UseKerning := false; - TFTScalableOutlineFont(OurFont).SetOutlineColor(1, 0, 0); + //TFTScalableOutlineFont(OurFont).SetOutlineColor(1, 0, 0, 1); //OurFont := TOutlineFont.Create(FONT_FILE, 32, 2); //OurFont.LineSpacing := OurFont.LineSpacing * 0.5; @@ -183,7 +185,7 @@ begin //OurFont.SetOutlineColor(0.5, 0.5, 0.5); //OurFont.ReflectionSpacing := -4; //OurFont.UseKerning := false; - OurFont.Height := 64;//cnt2; + OurFont.Height := 150;//cnt2; //OurFont.Reset; //OurFont.Aspect := 2; @@ -191,7 +193,7 @@ begin bounds := OurFont.BBox(msg); //glRectf(bounds.Left, OurFont.Ascender, bounds.Right, OurFont.Ascender-OurFont.Height); - glColor3f(1, 1, 1); + glColor4f(1, 1, 1, 1); //OurFont.ReflectionSpacing := 0; OurFont.Print(msg); diff --git a/unicode/src/lib/freetype/demo/engine-test.lpi b/unicode/src/lib/freetype/demo/engine-test.lpi index 6cbfe1eb..45483a56 100644 --- a/unicode/src/lib/freetype/demo/engine-test.lpi +++ b/unicode/src/lib/freetype/demo/engine-test.lpi @@ -28,14 +28,14 @@ - - - - - - - - + + + + + + + + @@ -139,13 +139,22 @@ - - - - - - - + + + + + + + + + + + + + + + + -- cgit v1.2.3