aboutsummaryrefslogtreecommitdiffstats
path: root/medley_new/src/base
diff options
context:
space:
mode:
authorbrunzelchen <brunzelchen@b956fd51-792f-4845-bead-9b4dfca2ff2c>2010-10-17 18:06:59 +0000
committerbrunzelchen <brunzelchen@b956fd51-792f-4845-bead-9b4dfca2ff2c>2010-10-17 18:06:59 +0000
commit990a17b6b72252ea338e545274800867ee492f55 (patch)
tree14fcf4d39afa3b3faa907523eebb36028c210564 /medley_new/src/base
parentf5b0f20934afd14448235c2c0db84c670f75ff4e (diff)
downloadusdx-990a17b6b72252ea338e545274800867ee492f55.tar.gz
usdx-990a17b6b72252ea338e545274800867ee492f55.tar.xz
usdx-990a17b6b72252ea338e545274800867ee492f55.zip
- added PreCache option in font.ini
- added MaxResolution option in font.ini - added new font type: bold high-res (for medley count-down) git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/branches/experimental@2678 b956fd51-792f-4845-bead-9b4dfca2ff2c
Diffstat (limited to 'medley_new/src/base')
-rw-r--r--medley_new/src/base/TextGL.pas26
1 files changed, 22 insertions, 4 deletions
diff --git a/medley_new/src/base/TextGL.pas b/medley_new/src/base/TextGL.pas
index feca0974..a4361319 100644
--- a/medley_new/src/base/TextGL.pas
+++ b/medley_new/src/base/TextGL.pas
@@ -56,6 +56,7 @@ const
ftBold = 1;
ftOutline1 = 2;
ftOutline2 = 3;
+ ftBoldHighRes = 4;
var
Fonts: array of TGLFont;
@@ -117,8 +118,8 @@ begin
end;
const
- FONT_NAMES: array [0..3] of string = (
- 'Normal', 'Bold', 'Outline1', 'Outline2'
+ FONT_NAMES: array [0..4] of string = (
+ 'Normal', 'Bold', 'Outline1', 'Outline2', 'BoldHighRes'
);
procedure BuildFonts;
@@ -126,6 +127,8 @@ var
I: integer;
FontIni: TMemIniFile;
FontFile: IPath;
+ FontMaxResolution: Integer;
+ FontPreCache: Integer;
Outline: single;
Embolden: single;
OutlineFont: TFTScalableOutlineFont;
@@ -144,12 +147,21 @@ begin
FontFile := FindFontFile(FontIni.ReadString(SectionName , 'File', ''));
+ FontMaxResolution := FontIni.ReadInteger(SectionName, 'MaxResolution', 64);
+ FontPreCache := FontIni.ReadInteger(SectionName, 'PreCache', 1);
+
// create either outlined or normal font
Outline := FontIni.ReadFloat(SectionName, 'Outline', 0.0);
if (Outline > 0.0) then
begin
// outlined font
- OutlineFont := TFTScalableOutlineFont.Create(FontFile, 64, Outline, True, True);
+ OutlineFont := TFTScalableOutlineFont.Create(
+ FontFile,
+ FontMaxResolution,
+ Outline,
+ True,
+ (FontPreCache<>0)
+ );
OutlineFont.SetOutlineColor(
FontIni.ReadFloat(SectionName, 'OutlineColorR', 0.0),
FontIni.ReadFloat(SectionName, 'OutlineColorG', 0.0),
@@ -163,7 +175,13 @@ begin
begin
// normal font
Embolden := FontIni.ReadFloat(SectionName, 'Embolden', 0.0);
- Fonts[I].Font := TFTScalableFont.Create(FontFile, 64, Embolden, True, True);
+ Fonts[I].Font := TFTScalableFont.Create(
+ FontFile,
+ FontMaxResolution,
+ Embolden,
+ True,
+ (FontPreCache<>0)
+ );
Fonts[I].Outlined := false;
end;