-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPascalType.Tables.TrueType.Panose.Classifications.pas
More file actions
1509 lines (1329 loc) · 44.2 KB
/
PascalType.Tables.TrueType.Panose.Classifications.pas
File metadata and controls
1509 lines (1329 loc) · 44.2 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
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
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
unit PascalType.Tables.TrueType.Panose.Classifications;
////////////////////////////////////////////////////////////////////////////////
// //
// Version: MPL 1.1 or LGPL 2.1 with linking exception //
// //
// The contents of this file are subject to the Mozilla Public License //
// Version 1.1 (the "License"); you may not use this file except in //
// compliance with the License. You may obtain a copy of the License at //
// http://www.mozilla.org/MPL/ //
// //
// Software distributed under the License is distributed on an "AS IS" //
// basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the //
// License for the specific language governing rights and limitations under //
// the License. //
// //
// Alternatively, the contents of this file may be used under the terms of //
// the Free Pascal modified version of the GNU Lesser General Public //
// License Version 2.1 (the "FPC modified LGPL License"), in which case the //
// provisions of this license are applicable instead of those above. //
// Please see the file LICENSE.txt for additional information concerning //
// this license. //
// //
// The code is part of the PascalType Project //
// //
// The initial developer of this code is Christian-W. Budde //
// //
// Portions created by Christian-W. Budde are Copyright (C) 2010-2017 //
// by Christian-W. Budde. All Rights Reserved. //
// //
////////////////////////////////////////////////////////////////////////////////
interface
{$I PT_Compiler.inc}
uses
Classes, Sysutils,
PascalType.Types,
PascalType.Tables.TrueType.Panose;
//------------------------------------------------------------------------------
//
// TPascalTypeLatinTextPanoseTable
//
//------------------------------------------------------------------------------
// Latin text
//------------------------------------------------------------------------------
// https://monotype.github.io/panose/pan2.htm
//------------------------------------------------------------------------------
type
TPascalTypeLatinTextPanoseTable = class(TCustomPascalTypePanoseTable)
private
function GetArmStyle: Byte;
function GetContrast: Byte;
function GetLetterform: Byte;
function GetMidline: Byte;
function GetProportion: Byte;
function GetSerifStyle: Byte;
function GetStrokeVariation: Byte;
function GetWeight: Byte;
function GetXHeight: Byte;
procedure SetArmStyle(const Value: Byte);
procedure SetContrast(const Value: Byte);
procedure SetLetterform(const Value: Byte);
procedure SetMidline(const Value: Byte);
procedure SetProportion(const Value: Byte);
procedure SetSerifStyle(const Value: Byte);
procedure SetStrokeVariation(const Value: Byte);
procedure SetWeight(const Value: Byte);
procedure SetXHeight(const Value: Byte);
protected
class function GetFamilyType: Byte; override;
procedure SerifStyleChanged; virtual;
procedure WeightChanged; virtual;
procedure ProportionChanged; virtual;
procedure ContrastChanged; virtual;
procedure StrokeVariationChanged; virtual;
procedure ArmStyleChanged; virtual;
procedure LetterformChanged; virtual;
procedure MidlineChanged; virtual;
procedure XHeightChanged; virtual;
public
property SerifStyle : Byte read GetSerifStyle write SetSerifStyle;
property Weight : Byte read GetWeight write SetWeight;
property Proportion : Byte read GetProportion write SetProportion;
property Contrast : Byte read GetContrast write SetContrast;
property StrokeVariation: Byte read GetStrokeVariation write SetStrokeVariation;
property ArmStyle : Byte read GetArmStyle write SetArmStyle;
property Letterform: Byte read GetLetterform write SetLetterform;
property Midline : Byte read GetMidline write SetMidline;
property XHeight : Byte read GetXHeight write SetXHeight;
end;
//------------------------------------------------------------------------------
//
// TPascalTypeLatinHandWrittenPanoseTable
//
//------------------------------------------------------------------------------
// Latin hand written
//------------------------------------------------------------------------------
// https://monotype.github.io/panose/pan3.htm
//------------------------------------------------------------------------------
type
TPascalTypeLatinHandWrittenPanoseTable = class(TCustomPascalTypePanoseTable)
private
function GetAspectRatio: Byte;
function GetContrast: Byte;
function GetFinials: Byte;
function GetForm: Byte;
function GetSpacing: Byte;
function GetToolKind: Byte;
function GetTopology: Byte;
function GetWeight: Byte;
function GetXAscent: Byte;
procedure SetAspectRatio(const Value: Byte);
procedure SetContrast(const Value: Byte);
procedure SetFinials(const Value: Byte);
procedure SetForm(const Value: Byte);
procedure SetSpacing(const Value: Byte);
procedure SetToolKind(const Value: Byte);
procedure SetTopology(const Value: Byte);
procedure SetWeight(const Value: Byte);
procedure SetXAscent(const Value: Byte);
protected
class function GetFamilyType: Byte; override;
procedure ToolKindChanged; virtual;
procedure WeightChanged; virtual;
procedure SpacingChanged; virtual;
procedure AspectRatioChanged; virtual;
procedure ContrastChanged; virtual;
procedure TopologyChanged; virtual;
procedure FormChanged; virtual;
procedure FinialsChanged; virtual;
procedure XAscentChanged; virtual;
public
property ToolKind : Byte read GetToolKind write SetToolKind;
property Weight : Byte read GetWeight write SetWeight;
property Spacing : Byte read GetSpacing write SetSpacing;
property AspectRatio: Byte read GetAspectRatio write SetAspectRatio;
property Contrast : Byte read GetContrast write SetContrast;
property Topology : Byte read GetTopology write SetTopology;
property Form : Byte read GetForm write SetForm;
property Finials : Byte read GetFinials write SetFinials;
property XAscent : Byte read GetXAscent write SetXAscent;
end;
//------------------------------------------------------------------------------
//
// TPascalTypeLatinDecorativePanoseTable
//
//------------------------------------------------------------------------------
// Latin decorative
//------------------------------------------------------------------------------
// https://monotype.github.io/panose/pan4.htm
//------------------------------------------------------------------------------
type
TPascalTypeLatinDecorativePanoseTable = class(TCustomPascalTypePanoseTable)
private
function GetAspect: Byte;
function GetContrast: Byte;
function GetFontClass: Byte;
function GetLining: Byte;
function GetRangeOfCharacters: Byte;
function GetSerifVariant: Byte;
function GetTopology: Byte;
function GetTreatment: Byte;
function GetWeight: Byte;
procedure SetAspect(const Value: Byte);
procedure SetContrast(const Value: Byte);
procedure SetFontClass(const Value: Byte);
procedure SetLining(const Value: Byte);
procedure SetRangeOfCharacters(const Value: Byte);
procedure SetSerifVariant(const Value: Byte);
procedure SetTopology(const Value: Byte);
procedure SetTreatment(const Value: Byte);
procedure SetWeight(const Value: Byte);
protected
class function GetFamilyType: Byte; override;
procedure FontClassChanged; virtual;
procedure WeightChanged; virtual;
procedure AspectChanged; virtual;
procedure ContrastChanged; virtual;
procedure SerifVariantChanged; virtual;
procedure TreatmentChanged; virtual;
procedure LiningChanged; virtual;
procedure TopologyChanged; virtual;
procedure RangeOfCharactersChanged; virtual;
public
property FontClass : Byte read GetFontClass write SetFontClass;
property Weight : Byte read GetWeight write SetWeight;
property Aspect : Byte read GetAspect write SetAspect;
property Contrast : Byte read GetContrast write SetContrast;
property SerifVariant: Byte read GetSerifVariant write SetSerifVariant;
property Treatment : Byte read GetTreatment write SetTreatment;
property Lining : Byte read GetLining write SetLining;
property Topology : Byte read GetTopology write SetTopology;
property RangeOfCharacters: Byte read GetRangeOfCharacters write SetRangeOfCharacters;
end;
//------------------------------------------------------------------------------
//
// TPascalTypeLatinSymbolPanoseTable
//
//------------------------------------------------------------------------------
// Latin pictoral
//------------------------------------------------------------------------------
// https://monotype.github.io/panose/pan5.htm
//------------------------------------------------------------------------------
type
TPascalTypeLatinSymbolPanoseTable = class(TCustomPascalTypePanoseTable)
private
function GetAspectRatioCharacter119: Byte;
function GetAspectRatioCharacter157: Byte;
function GetAspectRatioCharacter163: Byte;
function GetAspectRatioCharacter211: Byte;
function GetAspectRatioCharacter94: Byte;
function GetAspectRatioContrast: Byte;
function GetKind: Byte;
function GetSpacing: Byte;
function GetWeight: Byte;
procedure SetAspectRatioCharacter119(const Value: Byte);
procedure SetAspectRatioCharacter157(const Value: Byte);
procedure SetAspectRatioCharacter163(const Value: Byte);
procedure SetAspectRatioCharacter211(const Value: Byte);
procedure SetAspectRatioCharacter94(const Value: Byte);
procedure SetAspectRatioContrast(const Value: Byte);
procedure SetKind(const Value: Byte);
procedure SetSpacing(const Value: Byte);
procedure SetWeight(const Value: Byte);
protected
class function GetFamilyType: Byte; override;
procedure KindChanged; virtual;
procedure WeightChanged; virtual;
procedure SpacingChanged; virtual;
procedure AspectRatioContrastChanged; virtual;
procedure AspectRatioCharacter94Changed; virtual;
procedure AspectRatioCharacter119Changed; virtual;
procedure AspectRatioCharacter157Changed; virtual;
procedure AspectRatioCharacter163Changed; virtual;
procedure AspectRatioCharacter211Changed; virtual;
public
property Kind: Byte read GetKind write SetKind;
property Weight: Byte read GetWeight write SetWeight;
property Spacing: Byte read GetSpacing write SetSpacing;
property AspectRatioContrast: Byte read GetAspectRatioContrast write SetAspectRatioContrast;
property AspectRatioCharacter94: Byte read GetAspectRatioCharacter94 write SetAspectRatioCharacter94;
property AspectRatioCharacter119: Byte read GetAspectRatioCharacter119 write SetAspectRatioCharacter119;
property AspectRatioCharacter157: Byte read GetAspectRatioCharacter157 write SetAspectRatioCharacter157;
property AspectRatioCharacter163: Byte read GetAspectRatioCharacter163 write SetAspectRatioCharacter163;
property AspectRatioCharacter211: Byte read GetAspectRatioCharacter211 write SetAspectRatioCharacter211;
end;
//------------------------------------------------------------------------------
//
// String representations
//
//------------------------------------------------------------------------------
function LatinTextSerifStyleToString(SerifStyle: Byte): string;
function LatinTextWeightToString(Weight: Byte): string;
function LatinTextProportionToString(Proportion: Byte): string;
function LatinTextContrastToString(Contrast: Byte): string;
function LatinTextStrokeVariationToString(StrokeVariation: Byte): string;
function LatinTextArmStyleToString(ArmStyle: Byte): string;
function LatinTextLetterformToString(Letterform: Byte): string;
function LatinTextMidlineToString(Midline: Byte): string;
function LatinTextXHeightToString(XHeight: Byte): string;
function LatinHandWrittenToolKindToString(ToolKind: Byte): string;
function LatinHandWrittenWeightToString(Weight: Byte): string;
function LatinHandWrittenSpacingToString(Spacing: Byte): string;
function LatinHandWrittenAspectRatioToString(AspectRatio: Byte): string;
function LatinHandWrittenContrastToString(Contrast: Byte): string;
function LatinHandWrittenTopologyToString(Topology: Byte): string;
function LatinHandWrittenFormToString(Form: Byte): string;
function LatinHandWrittenFinialsToString(Finials: Byte): string;
function LatinHandWrittenXAscentToString(XAscent: Byte): string;
function LatinDecorativeFontClassToString(FontClass: Byte): string;
function LatinDecorativeWeightToString(Weight: Byte): string;
function LatinDecorativeAspectToString(Aspect: Byte): string;
function LatinDecorativeContrastToString(Contrast: Byte): string;
function LatinDecorativeSerifVariantToString(SerifVariant: Byte): string;
function LatinDecorativeTreatmentToString(Treatment: Byte): string;
function LatinDecorativeLiningToString(Lining: Byte): string;
function LatinDecorativeTopologyToString(Topology: Byte): string;
function LatinDecorativeRangeOfCharactersToString(RangeOfCharacters: Byte): string;
function LatinSymboleKindToString(Kind: Byte): string;
function LatinSymboleWeightToString(Weight: Byte): string;
function LatinSymboleSpacingToString(Spacing: Byte): string;
function LatinSymboleAspectRatioContrastToString(AspectRatioContrast: Byte): string;
function LatinSymboleAspectRatioCharacter94ToString(AspectRatio: Byte): string;
function LatinSymboleAspectRatioCharacter119ToString(AspectRatio: Byte): string;
function LatinSymboleAspectRatioCharacter157ToString(AspectRatio: Byte): string;
function LatinSymboleAspectRatioCharacter163ToString(AspectRatio: Byte): string;
function LatinSymboleAspectRatioCharacter211ToString(AspectRatio: Byte): string;
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
implementation
function LatinTextSerifStyleToString(SerifStyle: Byte): string;
const
CLatinTextSerifStyleText: array [0..15] of string = ('Any', 'No Fit',
'Cove', 'Obtuse Cove', 'Square Cove', 'Obtuse Square Cove', 'Square',
'Thin', 'Oval', 'Exaggerated', 'Triangle', 'Normal Sans', 'Obtuse Sans',
'Perpendicular Sans', 'Flared', 'Rounded');
begin
if SerifStyle in [0..15] then
Result := CLatinTextSerifStyleText[SerifStyle]
else
Result := 'Unknown';
end;
function LatinTextWeightToString(Weight: Byte): string;
const
CLatinTextWeightText: array [0..11] of string = ('Any', 'No Fit',
'Very Light', 'Light', 'Thin', 'Book', 'Medium', 'Demi', 'Bold', 'Heavy',
'Black', 'Extra Black');
begin
if Weight in [0..11] then
Result := CLatinTextWeightText[Weight]
else
Result := 'Unknown';
end;
function LatinTextProportionToString(Proportion: Byte): string;
const
CLatinTextProportionText: array [0..9] of string = ('Any', 'No Fit',
'Old Style', 'Modern', 'Even Width', 'Extended', 'Condensed',
'Very Extended', 'Very Condensed', 'Monospaced');
begin
if Proportion in [0..9] then
Result := CLatinTextProportionText[Proportion]
else
Result := 'Unknown';
end;
function LatinTextContrastToString(Contrast: Byte): string;
const
CLatinTextContrastText: array [0..9] of string = ('Any', 'No Fit', 'None',
'Very Low', 'Low', 'Medium Low', 'Medium', 'Medium High', 'High',
'Very High');
begin
if Contrast in [0..9] then
Result := CLatinTextContrastText[Contrast]
else
Result := 'Unknown';
end;
function LatinTextStrokeVariationToString(StrokeVariation: Byte): string;
const
CLatinTextStrokeVariationText: array [0..10] of string = ('Any', 'No Fit',
'No Variation', 'Gradual/Diagonal', 'Gradual/Transitional',
'Gradual/Vertical', 'Gradual/Horizontal', 'Rapid/Vertical',
'Rapid/Horizontal', 'Instant/Vertical', 'Instant/Horizontal');
begin
if StrokeVariation in [0..10] then
Result := CLatinTextStrokeVariationText[StrokeVariation]
else
Result := 'Unknown';
end;
function LatinTextArmStyleToString(ArmStyle: Byte): string;
const
CLatinTextArmStyleText: array [0..11] of string = ('Any', 'No Fit',
'Straight Arms/Horizontal', 'Straight Arms/Wedge', 'Straight Arms/Vertical',
'Straight Arms/Single Serif', 'Straight Arms/Double Serif',
'Non-Straight/Horizontal', 'Non-Straight/Wedge', 'Non-Straight/Vertical',
'Non-Straight/Single Serif', 'Non-Straight/Double Serif');
begin
if ArmStyle in [0..11] then
Result := CLatinTextArmStyleText[ArmStyle]
else
Result := 'Unknown';
end;
function LatinTextLetterformToString(Letterform: Byte): string;
const
CLatinTextLetterformText: array [0..15] of string = ('Any', 'No Fit',
'Normal/Contact', 'Normal/Weighted', 'Normal/Boxed', 'Normal/Flattened',
'Normal/Rounded', 'Normal/Off Center', 'Normal/Square', 'Oblique/Contact',
'Oblique/Weighted', 'Oblique/Boxed', 'Oblique/Flattened', 'Oblique/Rounded',
'Oblique/Off Center', 'Oblique/Square');
begin
if Letterform in [0..15] then
Result := CLatinTextLetterformText[Letterform]
else
Result := 'Unknown';
end;
function LatinTextMidlineToString(Midline: Byte): string;
const
CLatinTextMidlineText: array [0..13] of string = ('Any', 'No Fit',
'Standard/Trimmed', 'Standard/Pointed', 'Standard/Serifed', 'High/Trimmed',
'High/Pointed', 'High/Serifed', 'Constant/Trimmed', 'Constant/Pointed',
'Constant/Serifed', 'Low/Trimmed', 'Low/Pointed', 'Low/Serifed');
begin
if Midline in [0..13] then
Result := CLatinTextMidlineText[Midline]
else
Result := 'Unknown';
end;
function LatinTextXHeightToString(XHeight: Byte): string;
const
CLatinTextXHeightText: array [0..7] of string = ('Any', 'No Fit',
'Constant/Small', 'Constant/Standard', 'Constant/Large', 'Ducking/Small',
'Ducking/Standard', 'Ducking/Large');
begin
if XHeight in [0..7] then
Result := CLatinTextXHeightText[XHeight]
else
Result := 'Unknown';
end;
function LatinHandWrittenToolKindToString(ToolKind: Byte): string;
const
CLatinHandWrittenToolKindText: array [0..9] of string = ('Any', 'No Fit',
'Flat Nib', 'Pressure Point', 'Engraved', 'Ball (Round Cap)', 'Brush',
'Rough', 'Felt Pen/Brush Tip', 'Wild Brush - Drips a lot');
begin
if ToolKind in [0..9] then
Result := CLatinHandWrittenToolKindText[ToolKind]
else
Result := 'Unknown';
end;
function LatinHandWrittenWeightToString(Weight: Byte): string;
const
CLatinHandWrittenWeightText: array [0..11] of string = ('Any', 'No Fit',
'Very Light', 'Light', 'Thin', 'Book', 'Medium', 'Demi', 'Bold', 'Heavy',
'Black', 'Extra Black (Nord)');
begin
if Weight in [0..11] then
Result := CLatinHandWrittenWeightText[Weight]
else
Result := 'Unknown';
end;
function LatinHandWrittenSpacingToString(Spacing: Byte): string;
const
CLatinHandWrittenSpacingText: array [0..3] of string = ('Any', 'No Fit',
'Proportional Spaced', 'Monospaced');
begin
if Spacing in [0..3] then
Result := CLatinHandWrittenSpacingText[Spacing]
else
Result := 'Unknown';
end;
function LatinHandWrittenAspectRatioToString(AspectRatio: Byte): string;
const
CLatinHandWrittenAspectRatioText: array [0..6] of string = ('Any', 'No Fit',
'Very Condensed', 'Condensed', 'Normal', 'Expanded', 'Very Expanded');
begin
if AspectRatio in [0..6] then
Result := CLatinHandWrittenAspectRatioText[AspectRatio]
else
Result := 'Unknown';
end;
function LatinHandWrittenContrastToString(Contrast: Byte): string;
const
CLatinHandWrittenContrastText: array [0..9] of string = ('Any', 'No Fit',
'None', 'Very Low', 'Low', 'Medium Low', 'Medium', 'Medium High', 'High',
'Very High');
begin
if Contrast in [0..9] then
Result := CLatinHandWrittenContrastText[Contrast]
else
Result := 'Unknown';
end;
function LatinHandWrittenTopologyToString(Topology: Byte): string;
const
CLatinHandWrittenTopologyText: array [0..10] of string = ('Any', 'No Fit',
'Roman Disconnected', 'Roman Trailing', 'Roman Connected',
'Cursive Disconnected', 'Cursive Trailing', 'Cursive Connected',
'Blackletter Disconnected', 'Blackletter Trailing',
'Blackletter Connected');
begin
if Topology in [0..10] then
Result := CLatinHandWrittenTopologyText[Topology]
else
Result := 'Unknown';
end;
function LatinHandWrittenFormToString(Form: Byte): string;
const
CLatinHandWrittenFormText: array [0..13] of string = ('Any', 'No Fit',
'Upright / No Wrapping', 'Upright / Some Wrapping',
'Upright / More Wrapping', 'Upright / Extreme Wrapping',
'Oblique / No Wrapping', 'Oblique / Some Wrapping',
'Oblique / More Wrapping', 'Oblique / Extreme Wrapping',
'Exaggerated / No Wrapping', 'Exaggerated / Some Wrapping',
'Exaggerated / More Wrapping', 'Exaggerated / Extreme Wrapping');
begin
if Form in [0..13] then
Result := CLatinHandWrittenFormText[Form]
else
Result := 'Unknown';
end;
function LatinHandWrittenFinialsToString(Finials: Byte): string;
const
CLatinHandWrittenFinialsText: array [0..13] of string = ('Any', 'No Fit',
'None / No loops', 'None / Closed loops', 'None / Open loops',
'Sharp / No loops', 'Sharp / Closed loops', 'Sharp / Open loops',
'Tapered / No loops', 'Tapered / Closed loops', 'Tapered / Open loops',
'Round / No loops', 'Round / Closed loops', 'Round / Open loops');
begin
if Finials in [0..13] then
Result := CLatinHandWrittenFinialsText[Finials]
else
Result := 'Unknown';
end;
function LatinHandWrittenXAscentToString(XAscent: Byte): string;
const
CLatinHandWrittenXAscentText: array [0..6] of string = ('Any', 'No Fit',
'Very Low', 'Low', 'Medium', 'High', 'Very High');
begin
if XAscent in [0..6] then
Result := CLatinHandWrittenXAscentText[XAscent]
else
Result := 'Unknown';
end;
/// /////////////////////////////////////////////////////////////////////////////
function LatinDecorativeFontClassToString(FontClass: Byte): string;
const
CLatinDecorativeFontClassText: array [0..12] of string = ('Any', 'No Fit',
'Derivative', 'Non-standard Topology', 'Non-standard Elements',
'Non-standard Aspect', 'Initials', 'Cartoon', 'Picture Stems', 'Ornamented',
'Text and Background', 'Collage', 'Montage');
begin
if FontClass in [0..12] then
Result := CLatinDecorativeFontClassText[FontClass]
else
Result := 'Unknown';
end;
function LatinDecorativeWeightToString(Weight: Byte): string;
const
CLatinDecorativeWeightText: array [0..11] of string = ('Any', 'No Fit',
'Very Light', 'Light', 'Thin', 'Book', 'Medium', 'Demi', 'Bold', 'Heavy',
'Black', 'Extra Black');
begin
if Weight in [0..11] then
Result := CLatinDecorativeWeightText[Weight]
else
Result := 'Unknown';
end;
function LatinDecorativeAspectToString(Aspect: Byte): string;
const
CLatinDecorativeAspectText: array [0..9] of string = ('Any', 'No Fit',
'Super Condensed', 'Very Condensed', 'Condensed', 'Normal', 'Extended',
'Very Extended', 'Super Extended', 'Monospaced');
begin
if Aspect in [0..9] then
Result := CLatinDecorativeAspectText[Aspect]
else
Result := 'Unknown';
end;
function LatinDecorativeContrastToString(Contrast: Byte): string;
const
CLatinDecorativeContrastText: array [0..13] of string = ('Any', 'No Fit',
'None', 'Very Low', 'Low', 'Medium Low', 'Medium', 'Medium High', 'High',
'Very High', 'Horizontal Low', 'Horizontal Medium', 'Horizontal High',
'Broken');
begin
if Contrast in [0..13] then
Result := CLatinDecorativeContrastText[Contrast]
else
Result := 'Unknown';
end;
function LatinDecorativeSerifVariantToString(SerifVariant: Byte): string;
const
CLatinDecorativeSerifVariantText: array [0..16] of string = ('Any',
'No Fit', 'Cove', 'Obtuse Cove', 'Square Cove', 'Obtuse Square Cove',
'Square', 'Thin', 'Oval', 'Exaggerated', 'Triangle', 'Normal Sans',
'Obtuse Sans', 'Perpendicular Sans', 'Flared', 'Rounded', 'Script');
begin
if SerifVariant in [0..16] then
Result := CLatinDecorativeSerifVariantText[SerifVariant]
else
Result := 'Unknown';
end;
function LatinDecorativeTreatmentToString(Treatment: Byte): string;
const
CLatinDecorativeTreatmentText: array [0..7] of string = ('Any', 'No Fit',
'None - Standard Solid Fill', 'White / No Fill', 'Patterned Fill',
'Complex Fill', 'Shaped Fill', 'Drawn / Distressed');
begin
if Treatment in [0..7] then
Result := CLatinDecorativeTreatmentText[Treatment]
else
Result := 'Unknown';
end;
function LatinDecorativeLiningToString(Lining: Byte): string;
const
CLatinDecorativeLiningText: array [0..8] of string = ('Any', 'No Fit',
'None', 'Inline', 'Outline', 'Engraved (Multiple Lines)', 'Shadow',
'Relief', 'Backdrop');
begin
if Lining in [0..8] then
Result := CLatinDecorativeLiningText[Lining]
else
Result := 'Unknown';
end;
function LatinDecorativeTopologyToString(Topology: Byte): string;
const
CLatinDecorativeTopologyText: array [0..15] of string = ('Any', 'No Fit',
'Standard', 'Square', 'Multiple Segment', 'Deco (E,M,S) Waco midlines',
'Uneven Weighting', 'Diverse Arms', 'Diverse Forms', 'Lombardic Forms',
'Upper Case in Lower Case', 'Implied Topology', 'Horseshoe E and A',
'Cursive', 'Blackletter', 'Swash Variance');
begin
if Topology in [0..15] then
Result := CLatinDecorativeTopologyText[Topology]
else
Result := 'Unknown';
end;
function LatinDecorativeRangeOfCharactersToString(RangeOfCharacters: Byte): string;
const
CLatinDecorativeRangeOfCharactersText: array [0..5] of string = ('Any',
'No Fit', 'Extended Collection', 'Litterals', 'No Lower Case',
'Small Caps');
begin
if RangeOfCharacters in [0..5] then
Result := CLatinDecorativeRangeOfCharactersText[RangeOfCharacters]
else
Result := 'Unknown';
end;
function LatinSymboleKindToString(Kind: Byte): string;
const
CLatinSymboleKindText: array [0..5] of string = ('Any', 'No Fit',
'Latin Text', 'Latin Hand Written', 'Latin Decorative', 'Latin Symbol');
begin
if Kind in [0..5] then
Result := CLatinSymboleKindText[Kind]
else
Result := 'Unknown';
end;
function LatinSymboleWeightToString(Weight: Byte): string;
const
CLatinSymboleWeightText: array [0..12] of string = ('Any', 'No Fit',
'Montages', 'Pictures', 'Shapes', 'Scientific', 'Music', 'Expert',
'Patterns', 'Boarders', 'Icons', 'Logos', 'Industry specific');
begin
if Weight in [0..12] then
Result := CLatinSymboleWeightText[Weight]
else
Result := 'Unknown';
end;
function LatinSymboleSpacingToString(Spacing: Byte): string;
const
CLatinSymboleSpacingText: array [0..3] of string = ('Any', 'No Fit',
'Proportional Spaced', 'Monospaced');
begin
if Spacing in [0..3] then
Result := CLatinSymboleSpacingText[Spacing]
else
Result := 'Unknown';
end;
function LatinSymboleAspectRatioContrastToString(AspectRatioContrast: Byte): string;
begin
if AspectRatioContrast = 1 then
Result := 'No Fit'
else
Result := 'Unknown';
end;
function LatinSymboleAspectRatioCharacter94ToString(AspectRatio: Byte): string;
const
CLatinSymboleAspectRatioText: array [0..9] of string = ('Any', 'No Fit',
'No Width', 'Exceptionally Wide', 'Super Wide', 'Very Wide', 'Wide',
'Normal', 'Narrow', 'Very Narrow');
begin
if AspectRatio in [0..9] then
Result := CLatinSymboleAspectRatioText[AspectRatio]
else
Result := 'Unknown';
end;
function LatinSymboleAspectRatioCharacter119ToString(AspectRatio: Byte): string;
const
CLatinSymboleAspectRatioText: array [0..9] of string = ('Any', 'No Fit',
'No Width', 'Exceptionally Wide', 'Super Wide', 'Very Wide', 'Wide',
'Normal', 'Narrow', 'Very Narrow');
begin
if AspectRatio in [0..9] then
Result := CLatinSymboleAspectRatioText[AspectRatio]
else
Result := 'Unknown';
end;
function LatinSymboleAspectRatioCharacter157ToString(AspectRatio: Byte): string;
const
CLatinSymboleAspectRatioText: array [0..9] of string = ('Any', 'No Fit',
'No Width', 'Exceptionally Wide', 'Super Wide', 'Very Wide', 'Wide',
'Normal', 'Narrow', 'Very Narrow');
begin
if AspectRatio in [0..9] then
Result := CLatinSymboleAspectRatioText[AspectRatio]
else
Result := 'Unknown';
end;
function LatinSymboleAspectRatioCharacter163ToString(AspectRatio: Byte): string;
const
CLatinSymboleAspectRatioText: array [0..9] of string = ('Any', 'No Fit',
'No Width', 'Exceptionally Wide', 'Super Wide', 'Very Wide', 'Wide',
'Normal', 'Narrow', 'Very Narrow');
begin
if AspectRatio in [0..9] then
Result := CLatinSymboleAspectRatioText[AspectRatio]
else
Result := 'Unknown';
end;
function LatinSymboleAspectRatioCharacter211ToString(AspectRatio: Byte): string;
const
CLatinSymboleAspectRatioText: array [0..9] of string = ('Any', 'No Fit',
'No Width', 'Exceptionally Wide', 'Super Wide', 'Very Wide', 'Wide',
'Normal', 'Narrow', 'Very Narrow');
begin
if AspectRatio in [0..9] then
Result := CLatinSymboleAspectRatioText[AspectRatio]
else
Result := 'Unknown';
end;
//------------------------------------------------------------------------------
//
// TPascalTypeLatinTextPanoseTable
//
//------------------------------------------------------------------------------
class function TPascalTypeLatinTextPanoseTable.GetFamilyType: Byte;
begin
Result := 2;
end;
function TPascalTypeLatinTextPanoseTable.GetSerifStyle: Byte;
begin
Result := FData[0];
end;
function TPascalTypeLatinTextPanoseTable.GetWeight: Byte;
begin
Result := FData[1];
end;
function TPascalTypeLatinTextPanoseTable.GetProportion: Byte;
begin
Result := FData[2];
end;
function TPascalTypeLatinTextPanoseTable.GetContrast: Byte;
begin
Result := FData[3];
end;
function TPascalTypeLatinTextPanoseTable.GetStrokeVariation: Byte;
begin
Result := FData[4];
end;
function TPascalTypeLatinTextPanoseTable.GetArmStyle: Byte;
begin
Result := FData[5];
end;
function TPascalTypeLatinTextPanoseTable.GetLetterform: Byte;
begin
Result := FData[6];
end;
function TPascalTypeLatinTextPanoseTable.GetMidline: Byte;
begin
Result := FData[7];
end;
function TPascalTypeLatinTextPanoseTable.GetXHeight: Byte;
begin
Result := FData[8];
end;
procedure TPascalTypeLatinTextPanoseTable.SetSerifStyle(const Value: Byte);
begin
if FData[0] <> Value then
begin
FData[0] := Value;
SerifStyleChanged;
end;
end;
procedure TPascalTypeLatinTextPanoseTable.SetWeight(const Value: Byte);
begin
if FData[1] <> Value then
begin
FData[1] := Value;
WeightChanged;
end;
end;
procedure TPascalTypeLatinTextPanoseTable.SetProportion(const Value: Byte);
begin
if FData[2] <> Value then
begin
FData[2] := Value;
ProportionChanged;
end;
end;
procedure TPascalTypeLatinTextPanoseTable.SetContrast(const Value: Byte);
begin
if FData[3] <> Value then
begin
FData[3] := Value;
ContrastChanged;
end;
end;
procedure TPascalTypeLatinTextPanoseTable.SetStrokeVariation(const Value: Byte);
begin
if FData[4] <> Value then
begin
FData[4] := Value;
StrokeVariationChanged;
end;
end;
procedure TPascalTypeLatinTextPanoseTable.SetArmStyle(const Value: Byte);
begin
if FData[5] <> Value then
begin
FData[5] := Value;
ArmStyleChanged;
end;
end;
procedure TPascalTypeLatinTextPanoseTable.SetLetterform(const Value: Byte);
begin
if FData[6] <> Value then
begin
FData[6] := Value;
LetterformChanged;
end;
end;
procedure TPascalTypeLatinTextPanoseTable.SetMidline(const Value: Byte);
begin
if FData[7] <> Value then
begin
FData[7] := Value;
MidlineChanged;
end;
end;
procedure TPascalTypeLatinTextPanoseTable.SetXHeight(const Value: Byte);
begin
if FData[8] <> Value then
begin
FData[8] := Value;
XHeightChanged;
end;
end;
procedure TPascalTypeLatinTextPanoseTable.ArmStyleChanged;
begin
Changed;
end;
procedure TPascalTypeLatinTextPanoseTable.ContrastChanged;
begin
Changed;
end;
procedure TPascalTypeLatinTextPanoseTable.LetterformChanged;
begin
Changed;
end;
procedure TPascalTypeLatinTextPanoseTable.MidlineChanged;
begin
Changed;
end;
procedure TPascalTypeLatinTextPanoseTable.ProportionChanged;
begin
Changed;
end;
procedure TPascalTypeLatinTextPanoseTable.SerifStyleChanged;
begin
Changed;
end;
procedure TPascalTypeLatinTextPanoseTable.StrokeVariationChanged;
begin
Changed;
end;
procedure TPascalTypeLatinTextPanoseTable.WeightChanged;
begin
Changed;
end;
procedure TPascalTypeLatinTextPanoseTable.XHeightChanged;
begin
Changed;
end;
//------------------------------------------------------------------------------
//
// TPascalTypeLatinHandWrittenPanoseTable
//
//------------------------------------------------------------------------------
class function TPascalTypeLatinHandWrittenPanoseTable.GetFamilyType: Byte;
begin
Result := 3;
end;
function TPascalTypeLatinHandWrittenPanoseTable.GetToolKind: Byte;
begin
Result := FData[0];
end;
function TPascalTypeLatinHandWrittenPanoseTable.GetWeight: Byte;
begin
Result := FData[1];
end;
function TPascalTypeLatinHandWrittenPanoseTable.GetSpacing: Byte;
begin
Result := FData[2];
end;
function TPascalTypeLatinHandWrittenPanoseTable.GetAspectRatio: Byte;
begin
Result := FData[3];
end;
function TPascalTypeLatinHandWrittenPanoseTable.GetContrast: Byte;
begin
Result := FData[4];
end;
function TPascalTypeLatinHandWrittenPanoseTable.GetTopology: Byte;
begin
Result := FData[5];
end;
function TPascalTypeLatinHandWrittenPanoseTable.GetForm: Byte;
begin
Result := FData[6];
end;
function TPascalTypeLatinHandWrittenPanoseTable.GetFinials: Byte;
begin
Result := FData[7];
end;
function TPascalTypeLatinHandWrittenPanoseTable.GetXAscent: Byte;
begin
Result := FData[8];
end;
procedure TPascalTypeLatinHandWrittenPanoseTable.SetToolKind(const Value: Byte);
begin
if FData[0] <> Value then
begin