-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCEF_LCL_Chromium_FontOptions.inc
150 lines (138 loc) · 4.24 KB
/
CEF_LCL_Chromium_FontOptions.inc
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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
//----------------------------------------
// Copyright © yanghy. All Rights Reserved.
//
// Licensed under Lazarus.modifiedLGPL
//----------------------------------------
procedure ChromiumFontOptions_StandardFontFamily(ASet: LongBool; const AObj: TChromium; AValue: PChar; out Result: PChar); extdecl;
begin
handleExceptionBegin
if ASet then
begin
AObj.FontOptions.StandardFontFamily := PCharToUStr(AValue);
end
else
Result := ToPChar(AObj.FontOptions.StandardFontFamily);
handleExceptionEnd
end;
procedure ChromiumFontOptions_FixedFontFamily(ASet: LongBool; const AObj: TChromium; AValue: PChar; out Result: PChar); extdecl;
begin
handleExceptionBegin
if ASet then
begin
AObj.FontOptions.FixedFontFamily := PCharToUStr(AValue);
end
else
Result := ToPChar(AObj.FontOptions.FixedFontFamily);
handleExceptionEnd
end;
procedure ChromiumFontOptions_SerifFontFamily(ASet: LongBool; const AObj: TChromium; AValue: PChar; out Result: PChar); extdecl;
begin
handleExceptionBegin
if ASet then
begin
AObj.FontOptions.SerifFontFamily := PCharToUStr(AValue);
end
else
Result := ToPChar(AObj.FontOptions.SerifFontFamily);
handleExceptionEnd
end;
procedure ChromiumFontOptions_SansSerifFontFamily(ASet: LongBool; const AObj: TChromium; AValue: PChar; out Result: PChar); extdecl;
begin
handleExceptionBegin
if ASet then
begin
AObj.FontOptions.SansSerifFontFamily := PCharToUStr(AValue);
end
else
Result := ToPChar(AObj.FontOptions.SansSerifFontFamily);
handleExceptionEnd
end;
procedure ChromiumFontOptions_CursiveFontFamily(ASet: LongBool; const AObj: TChromium; AValue: PChar; out Result: PChar); extdecl;
begin
handleExceptionBegin
if ASet then
begin
AObj.FontOptions.CursiveFontFamily := PCharToUStr(AValue);
end
else
Result := ToPChar(AObj.FontOptions.CursiveFontFamily);
handleExceptionEnd
end;
procedure ChromiumFontOptions_FantasyFontFamily(ASet: LongBool; const AObj: TChromium; AValue: PChar; out Result: PChar); extdecl;
begin
handleExceptionBegin
if ASet then
begin
AObj.FontOptions.FantasyFontFamily := PCharToUStr(AValue);
end
else
Result := ToPChar(AObj.FontOptions.FantasyFontFamily);
handleExceptionEnd
end;
procedure ChromiumFontOptions_DefaultFontSize(ASet: LongBool; const AObj: TChromium; AValue: Integer; out Result: Integer); extdecl;
begin
handleExceptionBegin
if ASet then
begin
AObj.FontOptions.DefaultFontSize := AValue;
end
else
Result := AObj.FontOptions.DefaultFontSize;
handleExceptionEnd
end;
procedure ChromiumFontOptions_DefaultFixedFontSize(ASet: LongBool; const AObj: TChromium; AValue: Integer; out Result: Integer); extdecl;
begin
handleExceptionBegin
if ASet then
begin
AObj.FontOptions.DefaultFixedFontSize := AValue;
end
else
Result := AObj.FontOptions.DefaultFixedFontSize;
handleExceptionEnd
end;
procedure ChromiumFontOptions_MinimumFontSize(ASet: LongBool; const AObj: TChromium; AValue: Integer; out Result: Integer); extdecl;
begin
handleExceptionBegin
if ASet then
begin
AObj.FontOptions.MinimumFontSize := AValue;
end
else
Result := AObj.FontOptions.MinimumFontSize;
handleExceptionEnd
end;
procedure ChromiumFontOptions_MinimumLogicalFontSize(ASet: LongBool; const AObj: TChromium; AValue: Integer; out Result: Integer); extdecl;
begin
handleExceptionBegin
if ASet then
begin
AObj.FontOptions.MinimumLogicalFontSize := AValue;
end
else
Result := AObj.FontOptions.MinimumLogicalFontSize;
handleExceptionEnd
end;
procedure ChromiumFontOptions_RemoteFonts(ASet: LongBool; const AObj: TChromium; AValue: TCefState; out Result: TCefState); extdecl;
begin
handleExceptionBegin
if ASet then
begin
AObj.FontOptions.RemoteFonts := AValue;
end
else
Result := AObj.FontOptions.RemoteFonts;
handleExceptionEnd
end;
exports
ChromiumFontOptions_StandardFontFamily,
ChromiumFontOptions_FixedFontFamily,
ChromiumFontOptions_SerifFontFamily,
ChromiumFontOptions_SansSerifFontFamily,
ChromiumFontOptions_CursiveFontFamily,
ChromiumFontOptions_FantasyFontFamily,
ChromiumFontOptions_DefaultFontSize,
ChromiumFontOptions_DefaultFixedFontSize,
ChromiumFontOptions_MinimumFontSize,
ChromiumFontOptions_MinimumLogicalFontSize,
ChromiumFontOptions_RemoteFonts;