aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/freetype/demo
diff options
context:
space:
mode:
authors_alexander <s_alexander@b956fd51-792f-4845-bead-9b4dfca2ff2c>2009-11-09 00:27:55 +0000
committers_alexander <s_alexander@b956fd51-792f-4845-bead-9b4dfca2ff2c>2009-11-09 00:27:55 +0000
commit917901e8e33438c425aef50a0a7417f32d77b760 (patch)
tree95f081dd0d9a206bba3bd9c0a70e7a9a4cddafc8 /src/lib/freetype/demo
parent474452a88427e6ea83d6435b117e5deb1d4cd0c6 (diff)
downloadusdx-917901e8e33438c425aef50a0a7417f32d77b760.tar.gz
usdx-917901e8e33438c425aef50a0a7417f32d77b760.tar.xz
usdx-917901e8e33438c425aef50a0a7417f32d77b760.zip
merged unicode branch (r1931) into trunk
git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@1939 b956fd51-792f-4845-bead-9b4dfca2ff2c
Diffstat (limited to 'src/lib/freetype/demo')
-rw-r--r--src/lib/freetype/demo/engine-test.bdsproj14
-rw-r--r--src/lib/freetype/demo/engine-test.dpr16
-rw-r--r--src/lib/freetype/demo/engine-test.lpi39
3 files changed, 40 insertions, 29 deletions
diff --git a/src/lib/freetype/demo/engine-test.bdsproj b/src/lib/freetype/demo/engine-test.bdsproj
index 9547f18f..e5b3e97d 100644
--- a/src/lib/freetype/demo/engine-test.bdsproj
+++ b/src/lib/freetype/demo/engine-test.bdsproj
@@ -27,13 +27,13 @@
<Compiler Name="I">1</Compiler>
<Compiler Name="J">0</Compiler>
<Compiler Name="K">0</Compiler>
- <Compiler Name="L">1</Compiler>
- <Compiler Name="M">0</Compiler>
- <Compiler Name="N">1</Compiler>
- <Compiler Name="O">0</Compiler>
- <Compiler Name="P">1</Compiler>
- <Compiler Name="Q">0</Compiler>
- <Compiler Name="R">0</Compiler>
+ <Compiler Name="L">1</Compiler>
+ <Compiler Name="M">0</Compiler>
+ <Compiler Name="N">1</Compiler>
+ <Compiler Name="O">1</Compiler>
+ <Compiler Name="P">1</Compiler>
+ <Compiler Name="Q">0</Compiler>
+ <Compiler Name="R">0</Compiler>
<Compiler Name="S">0</Compiler>
<Compiler Name="T">0</Compiler>
<Compiler Name="U">0</Compiler>
diff --git a/src/lib/freetype/demo/engine-test.dpr b/src/lib/freetype/demo/engine-test.dpr
index 80177735..bbd7d890 100644
--- a/src/lib/freetype/demo/engine-test.dpr
+++ b/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/src/lib/freetype/demo/engine-test.lpi b/src/lib/freetype/demo/engine-test.lpi
index 6cbfe1eb..45483a56 100644
--- a/src/lib/freetype/demo/engine-test.lpi
+++ b/src/lib/freetype/demo/engine-test.lpi
@@ -28,14 +28,14 @@
</local>
</RunParams>
<Units Count="16">
- <Unit0>
- <Filename Value="engine-test.dpr"/>
- <IsPartOfProject Value="True"/>
- <CursorPos X="25" Y="135"/>
- <TopLine Value="118"/>
- <EditorIndex Value="0"/>
- <UsageCount Value="72"/>
- <Loaded Value="True"/>
+ <Unit0>
+ <Filename Value="engine-test.dpr"/>
+ <IsPartOfProject Value="True"/>
+ <CursorPos X="18" Y="25"/>
+ <TopLine Value="1"/>
+ <EditorIndex Value="0"/>
+ <UsageCount Value="72"/>
+ <Loaded Value="True"/>
</Unit0>
<Unit1>
<Filename Value="JEDI-SDL\OpenGL\Pas\opengl12.pas"/>
@@ -139,13 +139,22 @@
<UnitName Value="UFont"/>
<CursorPos X="15" Y="1752"/>
<TopLine Value="1734"/>
- <UsageCount Value="10"/>
- </Unit15>
- </Units>
- <JumpHistory Count="0" HistoryIndex="-1"/>
- </ProjectOptions>
- <CompilerOptions>
- <Version Value="8"/>
+ <UsageCount Value="10"/>
+ </Unit15>
+ </Units>
+ <JumpHistory Count="2" HistoryIndex="1">
+ <Position1>
+ <Filename Value="engine-test.dpr"/>
+ <Caret Line="52" Column="10" TopLine="37"/>
+ </Position1>
+ <Position2>
+ <Filename Value="engine-test.dpr"/>
+ <Caret Line="1" Column="1" TopLine="1"/>
+ </Position2>
+ </JumpHistory>
+ </ProjectOptions>
+ <CompilerOptions>
+ <Version Value="8"/>
<PathDelim Value="\"/>
<SearchPaths>
<IncludeFiles Value="..\..\JEDI-SDL\SDL\Pas\"/>