-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTestFontFace.Load.pas
More file actions
53 lines (43 loc) · 1 KB
/
TestFontFace.Load.pas
File metadata and controls
53 lines (43 loc) · 1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
unit TestFontFace.Load;
interface
uses
Generics.Collections,
Windows, Classes, SysUtils,
PascalType.FontFace,
PascalType.FontFace.SFNT,
TestFramework;
type
TTestPascalTypeFontFaceApple = class(TTestCase)
private
FFontFace: TPascalTypeFontFace;
public
procedure SetUp; override;
procedure TearDown; override;
published
procedure TestAppleChancery;
end;
implementation
uses
IOUtils,
TestFontFace;
const
sFontFolder = '..\Data\';
procedure TTestPascalTypeFontFaceApple.SetUp;
begin
inherited;
FFontFace := TPascalTypeFontFace.Create;
end;
procedure TTestPascalTypeFontFaceApple.TearDown;
begin
inherited;
FreeAndNil(FFontFace);
end;
procedure TTestPascalTypeFontFaceApple.TestAppleChancery;
begin
// Apple Chancery is an old OS 9 system font.
// Notably it contains a 'kern' version 1 table with a format 2 subtable.
FFontFace.LoadFromFile(sFontFolder+'Apple Chancery.ttf');
end;
initialization
TestSuiteFontFace.AddSuite(TTestPascalTypeFontFaceApple.Suite);
end.