examples: fix lazfreetype example

git-svn-id: trunk@52152 -
This commit is contained in:
ondrej 2016-04-09 18:20:31 +00:00
parent 8977b0ad0c
commit 4ffd3756f3
4 changed files with 60 additions and 22 deletions

View File

@ -1,4 +1,4 @@
<?xml version="1.0"?>
<?xml version="1.0" encoding="UTF-8"?>
<CONFIG>
<ProjectOptions>
<Version Value="9"/>
@ -17,8 +17,38 @@
<VersionInfo>
<StringTable ProductVersion=""/>
</VersionInfo>
<BuildModes Count="1">
<Item1 Name="Default" Default="True"/>
<BuildModes Count="2">
<Item1 Name="Debug" Default="True"/>
<Item2 Name="Release">
<CompilerOptions>
<Version Value="11"/>
<PathDelim Value="\"/>
<Target>
<Filename Value="lazfreetypetest"/>
</Target>
<SearchPaths>
<IncludeFiles Value="$(ProjOutDir)"/>
<UnitOutputDirectory Value="lib\$(TargetCPU)-$(TargetOS)"/>
</SearchPaths>
<CodeGeneration>
<SmartLinkUnit Value="True"/>
<Optimizations>
<OptimizationLevel Value="3"/>
</Optimizations>
</CodeGeneration>
<Linking>
<Debugging>
<GenerateDebugInfo Value="False"/>
</Debugging>
<LinkSmart Value="True"/>
<Options>
<Win32>
<GraphicApplication Value="True"/>
</Win32>
</Options>
</Linking>
</CompilerOptions>
</Item2>
</BuildModes>
<PublishOptions>
<Version Value="2"/>
@ -39,7 +69,6 @@
<Unit0>
<Filename Value="lazfreetypetest.lpr"/>
<IsPartOfProject Value="True"/>
<UnitName Value="lazfreetypetest"/>
</Unit0>
<Unit1>
<Filename Value="mainform.pas"/>
@ -47,7 +76,6 @@
<ComponentName Value="Form1"/>
<HasResources Value="True"/>
<ResourceBaseClass Value="Form"/>
<UnitName Value="mainform"/>
</Unit1>
</Units>
</ProjectOptions>
@ -61,9 +89,24 @@
<IncludeFiles Value="$(ProjOutDir)"/>
<UnitOutputDirectory Value="lib\$(TargetCPU)-$(TargetOS)"/>
</SearchPaths>
<Parsing>
<SyntaxOptions>
<IncludeAssertionCode Value="True"/>
</SyntaxOptions>
</Parsing>
<CodeGeneration>
<Checks>
<IOChecks Value="True"/>
<RangeChecks Value="True"/>
<OverflowChecks Value="True"/>
<StackChecks Value="True"/>
</Checks>
</CodeGeneration>
<Linking>
<Debugging>
<DebugInfoType Value="dsDwarf2Set"/>
<UseHeaptrc Value="True"/>
<UseExternalDbgSyms Value="True"/>
</Debugging>
<Options>
<Win32>
@ -71,12 +114,6 @@
</Win32>
</Options>
</Linking>
<Other>
<CompilerMessages>
<UseMsgFile Value="True"/>
</CompilerMessages>
<CompilerPath Value="$(CompPath)"/>
</Other>
</CompilerOptions>
<Debugging>
<Exceptions Count="3">

View File

@ -14,7 +14,7 @@ object Form1: TForm1
OnPaint = FormPaint
OnShow = FormShow
Position = poDefault
LCLVersion = '1.1'
LCLVersion = '1.7'
object Panel_Option: TPanel
Left = 0
Height = 40
@ -50,15 +50,15 @@ object Form1: TForm1
end
object Label1: TLabel
Left = 6
Height = 13
Height = 15
Top = 12
Width = 26
Width = 32
Caption = 'Zoom'
ParentColor = False
end
object SpinEdit_Zoom: TSpinEdit
Left = 48
Height = 21
Height = 23
Top = 8
Width = 40
MaxValue = 9
@ -68,10 +68,10 @@ object Form1: TForm1
Value = 1
end
object CheckBox_Rect: TCheckBox
Left = 393
Height = 17
Left = 392
Height = 19
Top = 10
Width = 42
Width = 43
Anchors = [akTop, akRight]
Caption = 'Rect'
OnChange = CheckBox_RectChange

View File

@ -10,8 +10,8 @@ uses
IntfGraphics, GraphType, //Intf basic routines
EasyLazFreeType, LazFreeTypeIntfDrawer //EasyFreeType with Intf
EasyLazFreeType, LazFreeTypeIntfDrawer, //EasyFreeType with Intf
LazFreeTypeFontCollection
;
type
@ -65,7 +65,7 @@ var
function LoadFont: TFreeTypeFont;
var
FileName: string;
FileName, FontFamilyName: string;
begin
result := nil;
inc(n);
@ -81,8 +81,9 @@ var
else
exit;
end;
FontFamilyName := FontCollection.AddFile(FileName).Family.FamilyName;
result := TFreeTypeFont.Create;
result.Name := FileName;
result.Name := FontFamilyName;
LastFileName:= FileName;
end;