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
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
3634
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687
3688
3689
3690
3691
3692
3693
3694
3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790
3791
3792
3793
3794
3795
3796
3797
3798
3799
3800
3801
3802
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814
3815
3816
3817
3818
3819
3820
3821
3822
3823
3824
3825
3826
3827
3828
3829
3830
3831
3832
3833
3834
3835
3836
3837
3838
3839
3840
3841
3842
3843
3844
3845
3846
3847
3848
3849
3850
3851
3852
3853
3854
3855
3856
3857
3858
3859
3860
3861
3862
3863
3864
3865
3866
3867
3868
3869
3870
3871
3872
3873
3874
3875
3876
3877
3878
3879
3880
3881
3882
3883
3884
3885
3886
3887
3888
3889
3890
3891
3892
3893
3894
3895
3896
3897
3898
3899
3900
3901
3902
3903
3904
3905
3906
3907
3908
3909
3910
3911
3912
3913
3914
3915
3916
3917
3918
3919
3920
3921
3922
3923
3924
3925
3926
3927
3928
3929
3930
3931
3932
3933
3934
3935
3936
3937
3938
3939
3940
3941
3942
3943
3944
3945
3946
3947
3948
3949
3950
3951
3952
3953
3954
3955
3956
3957
3958
3959
3960
3961
3962
3963
3964
3965
3966
3967
3968
3969
3970
3971
3972
3973
3974
3975
3976
3977
3978
3979
3980
3981
3982
3983
3984
3985
3986
3987
3988
3989
3990
3991
3992
3993
3994
3995
3996
3997
3998
3999
4000
4001
4002
4003
4004
4005
4006
4007
4008
4009
4010
4011
4012
4013
4014
4015
4016
4017
4018
4019
4020
4021
4022
4023
4024
4025
4026
4027
4028
4029
4030
4031
4032
4033
4034
4035
4036
4037
4038
4039
4040
4041
4042
4043
4044
4045
4046
4047
4048
4049
4050
4051
4052
4053
4054
4055
4056
4057
4058
4059
4060
4061
4062
4063
4064
4065
4066
4067
4068
4069
4070
4071
4072
4073
4074
4075
4076
4077
4078
4079
4080
4081
4082
4083
4084
4085
4086
4087
4088
4089
4090
4091
4092
4093
4094
4095
4096
4097
4098
4099
4100
4101
4102
4103
4104
4105
4106
4107
4108
4109
4110
4111
4112
4113
4114
4115
4116
4117
4118
4119
4120
4121
4122
4123
4124
4125
4126
4127
|
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
"http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd"
[
<!ENTITY % defs SYSTEM "defs.ent"> %defs;
]>
<book id="xlfd">
<bookinfo>
<title>X Logical Font Description Conventions</title>
<subtitle>X Consortium Standard</subtitle>
<authorgroup>
<author>
<firstname>Jim</firstname><surname>Flowers</surname>
<affiliation><orgname>Digital Equipment Corporation</orgname></affiliation>
</author>
<editor>
<firstname>Stephen </firstname><surname>Gildea</surname>
<affiliation><orgname>X Consortium</orgname></affiliation>
</editor>
</authorgroup>
<releaseinfo>X Version 11, Release &fullrelvers;</releaseinfo>
<releaseinfo>Version 1.5</releaseinfo>
<copyright><year>1988</year><year>1994</year><holder>X Consortium</holder></copyright>
<legalnotice>
<para>
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
</para>
<para>
The above copyright notice and this permission notice shall be included
in all copies or substantial portions of the Software.
</para>
<para>
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR
OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.
</para>
<para>
Except as contained in this notice, the name of the X Consortium shall
not be used in advertising or otherwise to promote the sale, use or
other dealings in this Software without prior written authorization
from the X Consortium.
</para>
<para>X Window System is a trademark of The Open Group.</para>
</legalnotice>
<legalnotice>
<para role="multiLicensing">
Copyright © 1988, 1989
Digital Equipment Corporation, Maynard MA. All rights reserved.
</para>
<para>
Permission to use, copy, modify, and distribute this documentation
for any purpose and without fee is hereby granted, provided
that the above copyright notice and this permission
notice appear in all copies.
Digital Equipment Corporation makes no representations
about the
suitability for any purpose of the information in this document.
This documentation is provided as is without express or implied warranty.
</para>
</legalnotice>
<legalnotice>
<para>
Helvetica and Times are registered trademarks of Linotype Company.
</para>
<para>
ITC Avant Garde Gothic is a registered trademark of International
Typeface Corporation.
</para>
<para>
Times Roman is a registered trademark of Monotype Corporation.
</para>
<para>
Bitstream Amerigo is a registered trademark of Bitstream Inc.
</para>
<para>
Stone is a registered trademark of Adobe Systems Inc.
</para>
</legalnotice>
</bookinfo>
<chapter id='Introduction'>
<title>Introduction</title>
<!-- .XS -->
<!-- (SN Introduction -->
<!-- .XE -->
<para>
It is a requirement that X client applications must be portable across server
implementations, with very different file systems, naming conventions, and
font libraries.
However, font access requests,
as defined by the <emphasis remap='I'>X Window System Protocol</emphasis>,
neither specify server-independent conventions for font names
nor provide adequate font properties for logically describing typographic fonts.
</para>
<para>
X clients must be able to dynamically determine the fonts available
on any given server so that understandable information can be presented
to the user or so that intelligent font fallbacks can be chosen.
It is desirable for the most common queries to be accomplished
without the overhead of opening each font and inspecting font properties,
by means of simple
<function>ListFonts</function>
requests.
For example, if a user selected a Helvetica typeface family,
a client application should be able to query the server
for all Helvetica fonts and present only those setwidths, weights, slants,
point sizes, and character sets available for that family.
</para>
<para>
This document gives a standard logical font description
(hereafter referred to as XLFD) and the conventions to be used
in the core protocol so that clients can query and access screen type libraries
in a consistent manner across all X servers.
In addition to completely specifying a given font by means of its
<function>FontName</function>,
the XLFD also provides for a standard set of key
<function>FontProperties</function>
that describe the font in more detail.
</para>
<para>
<!-- .LP -->
The XLFD provides an adequate set of typographic font properties,
such as CAP_HEIGHT, X_HEIGHT,
and RELATIVE_SETWIDTH,
for publishing and other applications to do intelligent font matching
or substitution when handling documents created on some foreign server
that use potentially unknown fonts.
In addition,
this information is required by certain clients
to position subscripts automatically and determine small capital heights,
recommended leading, word-space values, and so on.
</para>
</chapter>
<chapter id='Requirements_and_Goals'>
<title>Requirements and Goals</title>
<!-- .XS -->
<!-- (SN Requirements and Goals -->
<!-- .XE -->
<para>
The XLFD meets the short-term and long-term goals to have a
standard logical font description that:
</para>
<itemizedlist>
<listitem>
<para>
Provides unique, descriptive font names that support simple pattern
matching
</para>
</listitem>
<listitem>
<para>
Supports multiple font vendors, arbitrary character sets, and encodings
</para>
</listitem>
<listitem>
<para>
Supports naming and instancing of scalable and polymorphic fonts
</para>
</listitem>
<listitem>
<para>
Supports transformations and subsetting of fonts
</para>
</listitem>
<listitem>
<para>
Is independent of X server and operating or file system implementations
</para>
</listitem>
<listitem>
<para>
Supports arbitrarily complex font matching or substitution
</para>
</listitem>
<listitem>
<para>
Is extensible
</para>
</listitem>
</itemizedlist>
<sect1 id='Provide_Unique_and_Descriptive_Font_Names'>
<title>Provide Unique and Descriptive Font Names</title>
<!-- .XS -->
<!-- (SN Provide Unique and Descriptive Font Names -->
<!-- .XE -->
<para>
It should be possible to have font names that are long enough and
descriptive enough to have a reasonable probability of being unique
without inventing a new registration organization.
Resolution and size-dependent font masters, multivendor font libraries,
and so on must be anticipated and handled by the font name alone.
</para>
<para>
<!-- .LP -->
The name itself should be structured to be amenable to simple pattern
matching and parsing, thus allowing X clients to restrict font queries to
some subset of all possible fonts in the server.
</para>
</sect1>
<sect1 id='Support_Multiple_Font_Vendors_and_Character_Sets'>
<title>Support Multiple Font Vendors and Character Sets</title>
<!-- .XS -->
<!-- (SN Support Multiple Font Vendors and Character Sets -->
<!-- .XE -->
<para>
<!-- .LP -->
The font name and properties should distinguish between fonts
that were supplied by different font vendors
but that possibly share the same name.
We anticipate a highly competitive font market where users will be able to
buy fonts from many sources according to their particular requirements.
</para>
<para>
<!-- .LP -->
A number of font vendors deliver each font with all glyphs designed for that
font, where charset mappings are defined by encoding vectors.
Some server implementations may force these mappings to proprietary
or standard charsets statically in the font data.
Others may desire to perform the mapping dynamically in the server.
Provisions must be made in the font name
that allows a font request to specify or identify specific charset mappings
in server environments where multiple charsets are supported.
</para>
</sect1>
<sect1 id='Support_Scalable_and_Polymorphic_Fonts'>
<title>Support Scalable and Polymorphic Fonts</title>
<!-- .XS -->
<!-- (SN Support Scalable and Polymorphic Fonts -->
<!-- .XE -->
<para>
<!-- .LP -->
If a font source can be scaled to an arbitrary size or varied in other
ways, it should be possible for an application to determine
that fact from the font name, and the
application should be able to construct a font name for any specific
instance.
</para>
</sect1>
<sect1 id='Support_Transformations_and_Subsetting_of_Fonts'>
<title>Support Transformations and Subsetting of Fonts</title>
<!-- .XS -->
<!-- (SN Support Transformations and Subsetting of Fonts -->
<!-- .XE -->
<para>
<!-- .LP -->
Arbitrary two-dimensional linear transformations of fonts should be
able to be requested by applications. Since such transformed fonts
may be used for special effects requiring a few characters from each
of many differently transformed fonts, it should be possible to
request only a few characters from a font for efficiency.
</para>
</sect1>
<sect1 id='Be_Independent_of_X_Server_and_Operating_or_File_System_Implementations'>
<title>Be Independent of X Server and Operating or File System Implementations</title>
<!-- .XS -->
<!-- (SN Be Independent of X Server and Operating or File System Implementations -->
<!-- .XE -->
<para>
<!-- .LP -->
X client applications that require a particular font should be able to use
the descriptive name without knowledge of the file system or other
repository in use by the server.
However,
it should be possible for servers to translate a given font name
into a file name syntax that it knows how to deal with,
without compromising the uniqueness of the font name.
This algorithm should be reversible (exactly how this translation is done is
implementation dependent).
</para>
</sect1>
<sect1 id='Support_Arbitrarily_Complex_Font_Matching_and_Substitution'>
<title>Support Arbitrarily Complex Font Matching and Substitution</title>
<!-- .XS -->
<!-- (SN Support Arbitrarily Complex Font Matching and Substitution -->
<!-- .XE -->
<para>
<!-- .LP -->
In addition to the font name,
the XLFD should define a standard list of descriptive font properties,
with agreed-upon fallbacks for all fonts.
This allows client applications to derive font-specific formatting
or display data and to perform font matching or substitution
when asked to handle potentially unknown fonts, as required.
</para>
</sect1>
<sect1 id='Be_Extensible'>
<title>Be Extensible</title>
<!-- .XS -->
<!-- (SN Be Extensible -->
<!-- .XE -->
<para>
<!-- .LP -->
The XLFD must be extensible so that new and/or private descriptive font
properties can be added to conforming fonts without making existing
X client or server implementations obsolete.
</para>
</sect1>
</chapter>
<chapter id='X_Logical_Font_Description'>
<title>X Logical Font Description</title>
<!-- .XS -->
<!-- (SN X Logical Font Description -->
<!-- .XE -->
<para>
<!-- .LP -->
XLFD is divided into two basic components:
the
<function>FontName</function>,
which gives all font information needed to uniquely identify a font
in X protocol requests (for example,
<function>OpenFont</function>,
<function>ListFonts</function>,
and so on) and a variable list of optional
<function>FontProperties</function>,
which describe a font in more detail.
</para>
<para>
<!-- .LP -->
The
<function>FontName</function>
is used in font queries and is returned as data in certain X protocol requests.
It is also specified as the data value for the
<function>FONT</function>
item in the X Consortium Character Bitmap Distribution Format Standard
(BDF V2.1).
</para>
<para>
<!-- .LP -->
The
<function>FontProperties</function>
are supplied on a font-by-font basis and are returned
as data in certain X protocol requests as part of the
<function>XFontStruct</function>
data structure.
The names and associated data values for each of the
<function>FontProperties</function>
may also appear as items of the
<function>STARTPROPERTIES</function>...<function>ENDPROPERTIES</function>list
in the BDF V2.1 specification. <!-- xref -->
</para>
<sect1 id='FontName'>
<title>FontName</title>
<!-- .XS -->
<!-- (SN FontName -->
<!-- .XE -->
<para>
<!-- .LP -->
Each
<function>FontName</function>
is logically composed of two strings: a
<function>FontNameRegistry</function>
prefix that is followed by a
<function>FontNameSuffix</function>.
The
<function>FontName</function>
uses the ISO 8859-1 encoding.
The
<function>FontNameRegistry</function>
is an
<!-- .IN x-registered-name -->
x-registered-name (a name that has been registered with the X Consortium)
that identifies the registration authority that owns the specified
<function>FontNameSuffix</function>
syntax and semantics.
</para>
<para>
<!-- .LP -->
All font names that conform to this specification are to use a
<function>FontNameRegistry</function>
prefix, which is defined to be the string "-"
(HYPHEN).
All
<function>FontNameRegistry</function>
prefixes of the form: +<emphasis remap='I'>version</emphasis>-,
where the specified version indicates some future XLFD specification,
are reserved by the X Consortium for future extensions to XLFD font names.
If required, extensions to the current XLFD font name shall be constructed
by appending new fields to the current structure,
each delimited by the existing field delimiter.
The availability of other
<function>FontNameRegistry</function>
prefixes or fonts that support other registries
is server implementation dependent.
</para>
<para>
<!-- .LP -->
In the X protocol specification,
the
<function>FontName</function>
is required to be a string;
hence, numeric field values are represented in the name as string equivalents.
All
<function>FontNameSuffix</function>
fields are also defined as
<function>FontProperties</function>;
numeric property values are represented as signed or unsigned integers,
as appropriate.
</para>
<sect2 id='FontName_Syntax'>
<title>FontName Syntax</title>
<!-- .XS -->
<!-- (SN FontName Syntax -->
<!-- .XE -->
<para>
<!-- .LP -->
The
<function>FontName</function>
is a structured, parsable string (of type STRING8)
whose Backus-Naur Form syntax description is as follows:
</para>
<!-- .IN "FontName Syntax" -->
<!-- .SM -->
<informaltable frame="none">
<?dbfo keep-together="always" ?>
<tgroup cols='2' align='left' colsep='0' rowsep='0'>
<colspec colname='c1' colwidth='1.0*'/>
<colspec colname='c2' colwidth='2.0*'/>
<tbody>
<row>
<entry>FontName ::=</entry>
<entry>
XFontNameRegistry XFontNameSuffix |
PrivFontNameRegistry PrivFontNameSuffix
</entry>
</row>
<row>
<entry>XFontNameRegistry ::=</entry>
<entry>XFNDelim | XFNExtPrefix Version XFNDelim</entry>
</row>
<row>
<entry>XFontNameSuffix ::=</entry>
<entry>
FOUNDRY XFNDelim FAMILY_NAME XFNDelim WEIGHT_NAME
XFNDelim SLANT XFNDelim SETWIDTH_NAME XFNDelim ADD_STYLE_NAME
XFNDelim PIXEL_SIZE XFNDelim POINT_SIZE
XFNDelim RESOLUTION_X XFNDelim RESOLUTION_Y XFNDelim
SPACING XFNDelim AVERAGE_WIDTH XFNDelim CHARSET_REGISTRY
XFNDelim CHARSET_ENCODING
</entry>
</row>
<row>
<entry>Version ::=</entry>
<entry>
STRING8 - the XLFD version that defines an extension
to the font name syntax (for example, "1.4")
</entry>
</row>
<row>
<entry>XFNExtPrefix ::=</entry>
<entry>OCTET - "+" (PLUS)</entry>
</row>
<row>
<entry>XFNDelim ::=</entry>
<entry>OCTET - "-" (HYPHEN)</entry>
</row>
<row>
<entry>PrivFontNameRegistry ::=</entry>
<entry>STRING8 - other than those strings reserved by XLFD</entry>
</row>
<row>
<entry>PrivFontNameSuffix ::=</entry>
<entry>STRING8</entry>
</row>
</tbody>
</tgroup>
</informaltable>
<para>
<!-- .LP -->
Field values are constructed as strings of ISO 8859-1 graphic characters,
excluding the following:
</para>
<itemizedlist>
<listitem>
<para>
'-' (HYPHEN), the XLFD font name delimiter character
</para>
</listitem>
<listitem>
<para>
'?' (QUESTION MARK) and "*" (ASTERISK), the X protocol
font name wildcard characters
</para>
</listitem>
<listitem>
<para>
',' (COMMA), used by Xlib to separate XLFD font names in a font set.
</para>
</listitem>
<listitem>
<para>
'"' (QUOTATION MARK), used by some commercial products to quote a
font name.
</para>
</listitem>
</itemizedlist>
<para>
<!-- .LP -->
Alphabetic case distinctions are allowed but are for human readability
concerns only.
Conforming X servers will perform matching on font name query or open requests
independent of case.
The entire font name string must have no more than 255 characters.
It is recommended that clients construct font name query patterns
by explicitly including all field delimiters to avoid unexpected results.
Note that SPACE is a valid character of a
<function>FontName</function>
field; for example, the string "ITC Avant Garde Gothic" might be a
FAMILY_NAME.
</para>
</sect2>
<sect2 id='FontName_Field_Definitions'>
<title>FontName Field Definitions</title>
<!-- .XS -->
<!-- (SN FontName Field Definitions -->
<!-- .XE -->
<para>
<!-- .LP -->
This section discusses the
<function>FontName</function>:
</para>
<itemizedlist>
<listitem>
<para>
FOUNDRY field
</para>
</listitem>
<listitem>
<para>
FAMILY_NAME field
</para>
</listitem>
<listitem>
<para>
WEIGHT_NAME field
</para>
</listitem>
<listitem>
<para>
SLANT field
</para>
</listitem>
<listitem>
<para>
SETWIDTH_NAME field
</para>
</listitem>
<listitem>
<para>
ADD_STYLE_NAME field
</para>
</listitem>
<listitem>
<para>
PIXEL_SIZE field
</para>
</listitem>
<listitem>
<para>
POINT_SIZE field
</para>
</listitem>
<listitem>
<para>
RESOLUTION_X and RESOLUTION_Y fields
</para>
</listitem>
<listitem>
<para>
SPACING field
</para>
</listitem>
<listitem>
<para>
AVERAGE_WIDTH field
</para>
</listitem>
<listitem>
<para>
CHARSET_REGISTRY and CHARSET_ENCODING fields
</para>
</listitem>
</itemizedlist>
<sect3 id='FOUNDRY_Field'>
<title>FOUNDRY Field</title>
<!-- .XS -->
<!-- (SN FOUNDRY Field -->
<!-- .XE -->
<para>
<!-- .LP -->
FOUNDRY is an x-registered-name,
the name or identifier of the digital type foundry
that digitized and supplied the font data,
or if different, the identifier of the organization that last modified
the font shape or metric information.
</para>
<para>
<!-- .LP -->
The reason this distinction is necessary is
that a given font design may be licensed from one source (for example, ITC)
but digitized and sold by any number of different type suppliers.
Each digital version of the original design, in general, will be somewhat
different in metrics and shape from the idealized original font data,
because each font foundry, for better or for worse, has its own standards
and practices for tweaking a typeface for a particular generation
of output technologies or has its own perception of market needs.
</para>
<para>
<!-- .LP -->
It is up to the type supplier to register with the X Consortium a
suitable name for this
<function>FontName</function>
field according to the registration procedures defined by the Consortium.
</para>
<para>
<!-- .LP -->
The X Consortium shall define procedures for registering foundry
and other names and shall maintain and publish,
as part of its public distribution,
a registry of such registered names for use in XLFD font names and properties.
</para>
<para>
<!-- .LP -->
</para>
</sect3>
<sect3 id='FAMILY_NAME_Field'>
<title>FAMILY_NAME Field</title>
<!-- .XS -->
<!-- (SN FAMILY_NAME Field -->
<!-- .XE -->
<para>
<!-- .LP -->
FAMILY_NAME is a string that identifies the range or family of
typeface designs that are all variations of one basic typographic style.
This must be spelled out in full,
with words separated by spaces, as required.
This name must be human-understandable and suitable for presentation to a
font user to identify the typeface family.
</para>
<para>
<!-- .LP -->
It is up to the type supplier to supply and maintain a suitable string for
this field and font property, to secure the proper legal title to a given
name, and to guard against the infringement of other's copyrights or
trademarks.
By convention, FAMILY_NAME is not translated.
FAMILY_NAME may include an indication of design ownership
if considered a valid part of the
typeface family name.
</para>
<para>
<!-- .LP -->
The following are examples of FAMILY_NAME:
</para>
<itemizedlist>
<listitem>
<para>
Helvetica
</para>
</listitem>
<listitem>
<para>
ITC Avant Garde Gothic
</para>
</listitem>
<listitem>
<para>
Times
</para>
</listitem>
<listitem>
<para>
Times Roman
</para>
</listitem>
<listitem>
<para>
Bitstream Amerigo
</para>
</listitem>
<listitem>
<para>
Stone
</para>
</listitem>
</itemizedlist>
</sect3>
<sect3 id='WEIGHT_NAME_Field'>
<title>WEIGHT_NAME Field</title>
<!-- .XS -->
<!-- (SN WEIGHT_NAME Field -->
<!-- .XE -->
<para>
<!-- .LP -->
WEIGHT_NAME is a string that identifies the font's typographic weight,
that is, the nominal blackness of the font,
according to the FOUNDRY's judgment.
This name must be human-understandable and suitable for presentation to a
font user.
The value "0" is used to indicate a polymorphic font (see <xref linkend='Polymorphic_Fonts' xrefstyle='select: title'/>).
</para>
<para>
<!-- .LP -->
The interpretation of this field is somewhat problematic
because the typographic judgment of weight has traditionally
depended on the overall design of the typeface family in question;
that is, it is possible that the DemiBold weight of one font could be
almost equivalent in typographic feel to a Bold font from another family.
</para>
<para>
<!-- .LP -->
WEIGHT_NAME is captured as an arbitrary string
because it is an important part of a font's complete human-understandable name.
However, it should not be used for font matching or substitution.
For this purpose,
X client applications should use the weight-related font properties
(RELATIVE_WEIGHT and WEIGHT) that give the coded relative weight
and the calculated weight, respectively.
</para>
</sect3>
<sect3 id='SLANT_Field'>
<title>SLANT Field</title>
<!-- .XS -->
<!-- (SN SLANT Field -->
<!-- .XE -->
<para>
<!-- .LP -->
SLANT is a code-string that indicates the overall posture of the
typeface design used in the font.
The encoding is as follows:
</para>
<informaltable frame="topbot">
<?dbfo keep-together="always" ?>
<tgroup cols='3' align='left' colsep='0' rowsep='0'>
<colspec colname='c1' colwidth='1.0*'/>
<colspec colname='c2' colwidth='3.0*'/>
<colspec colname='c3' colwidth='5.0*'/>
<thead>
<row rowsep='1'>
<entry>Code</entry>
<entry>English Translation</entry>
<entry>Description</entry>
</row>
</thead>
<tbody>
<row>
<entry>"R"</entry>
<entry>Roman</entry>
<entry>Upright design</entry>
</row>
<row>
<entry>"I"</entry>
<entry>Italic</entry>
<entry>Italic design, slanted clockwise from the vertical</entry>
</row>
<row>
<entry>"O"</entry>
<entry>Oblique</entry>
<entry>Obliqued upright design, slanted clockwise from the vertical</entry>
</row>
<row>
<entry>"RI"</entry>
<entry>Reverse Italic</entry>
<entry>Italic design, slanted counterclockwise from the vertical</entry>
</row>
<row>
<entry>"RO"</entry>
<entry>Reverse Oblique</entry>
<entry>Obliqued upright design, slanted counterclockwise from the vertical</entry>
</row>
<row>
<entry>"OT"</entry>
<entry>Other</entry>
<entry>Other</entry>
</row>
<row>
<entry>numeric</entry>
<entry>Polymorphic</entry>
<entry>See <xref linkend='Polymorphic_Fonts' xrefstyle='select: title'/>.</entry>
</row>
</tbody>
</tgroup>
</informaltable>
<para>
<!-- .LP -->
The SLANT codes are for programming convenience only and usually are
converted into their equivalent human-understandable form before being
presented to a user.
</para>
</sect3>
<sect3 id='SETWIDTH_NAME_Field'>
<title>SETWIDTH_NAME Field</title>
<!-- .XS -->
<!-- (SN SETWIDTH_NAME Field -->
<!-- .XE -->
<para>
<!-- .LP -->
SETWIDTH_NAME is a string that gives the font's typographic
proportionate width, that is, the nominal width per horizontal unit of the
font, according to the FOUNDRY's judgment.
The value "0" is used to indicate a polymorphic font (see <xref linkend='Polymorphic_Fonts' xrefstyle='select: title'/>).
</para>
<para>
<!-- .LP -->
As with WEIGHT_NAME, the interpretation of this field or font property is
somewhat problematic, because the designer's judgment of setwidth has
traditionally depended on the overall design of the typeface family in
question.
For purposes of font matching or substitution,
X client applications should either use the RELATIVE_SETWIDTH font property
that gives the relative coded proportionate width or calculate
the proportionate width.
</para>
<para>
<!-- .LP -->
The following are examples of SETWIDTH_NAME:
</para>
<itemizedlist>
<listitem>
<para>
Normal
</para>
</listitem>
<listitem>
<para>
Condensed
</para>
</listitem>
<listitem>
<para>
Narrow
</para>
</listitem>
<listitem>
<para>
Double Wide
</para>
</listitem>
</itemizedlist>
</sect3>
<sect3 id='ADD_STYLE_NAME_Field'>
<title>ADD_STYLE_NAME Field</title>
<!-- .XS -->
<!-- (SN ADD_STYLE_NAME Field -->
<!-- .XE -->
<para>
<!-- .LP -->
ADD_STYLE_NAME is a string that identifies additional typographic
style information that is not captured by other fields but is needed
to identify the particular font.
The character "[" anywhere in the field is used to indicate a
polymorphic font (see <xref linkend='Polymorphic_Fonts' xrefstyle='select: title'/>).
</para>
<para>
<!-- .LP -->
ADD_STYLE_NAME is not a typeface classification field
and is only used for uniqueness.
Its use, as such, is not limited to typographic style distinctions.
</para>
<para>
<!-- .LP -->
The following are examples of ADD_STYLE_NAME:
</para>
<itemizedlist>
<listitem>
<para>
Serif
</para>
</listitem>
<listitem>
<para>
Sans Serif
</para>
</listitem>
<listitem>
<para>
Informal
</para>
</listitem>
<listitem>
<para>
Decorated
</para>
</listitem>
</itemizedlist>
</sect3>
<sect3 id='PIXEL_SIZE_Field'>
<title>PIXEL_SIZE Field</title>
<!-- .XS -->
<!-- (SN PIXEL_SIZE Field -->
<!-- .XE -->
<para>
<!-- .LP -->
PIXEL_SIZE
gives the body size of the font at a particular
POINT_SIZE and RESOLUTION_Y.
PIXEL_SIZE is either an integer-string or a string beginning
with "[". A string beginning with "[" represents a matrix
(see <xref linkend='Matrix_Transformations' xrefstyle='select: title'/>).
PIXEL_SIZE usually incorporates additional vertical spacing
that is considered part of the font design.
(Note, however, that this value is not necessarily equivalent to the height
of the font bounding box.)
Zero is used to indicate a scalable font (see <xref linkend='Scalable_Fonts' xrefstyle='select: title'/>).
</para>
<para>
<!-- .LP -->
PIXEL_SIZE usually is used by X client applications that need to
query fonts according to device-dependent size,
regardless of the point size or vertical resolution
for which the font was designed.
</para>
</sect3>
<sect3 id='SN_POINT_SIZE_Field'>
<title>SN POINT_SIZE Field</title>
<!-- .XS -->
<!-- (SN POINT_SIZE Field -->
<!-- .XE -->
<para>
<!-- .LP -->
POINT_SIZE gives the body size
for which the font was designed.
POINT_SIZE is either an integer-string or a string beginning
with "[". A string beginning with "[" represents a matrix
(see <xref linkend='Matrix_Transformations' xrefstyle='select: title'/>).
This field usually incorporates additional vertical spacing
that is considered part of the font design.
(Note, however, that POINT_SIZE is not necessarily equivalent to the height
of the font bounding box.)
POINT_SIZE is expressed in decipoints (where points are as defined
in the X protocol or 72.27 points equal 1 inch).
Zero is used to indicate a scalable font (see <xref linkend='Scalable_Fonts' xrefstyle='select: title'/>).
</para>
<para>
<!-- .LP -->
POINT_SIZE and RESOLUTION_Y are used by X clients to query fonts
according to device-independent size to maintain constant text
size on the display regardless of the PIXEL_SIZE used for the font.
</para>
</sect3>
<sect3 id='RESOLUTION_X_and_RESOLUTION_Y_Fields'>
<title>RESOLUTION_X and RESOLUTION_Y Fields</title>
<!-- .XS -->
<!-- (SN RESOLUTION_X and RESOLUTION_Y Fields -->
<!-- .XE -->
<para>
<!-- .LP -->
RESOLUTION_X and RESOLUTION_Y are unsigned integer-strings that give
the horizontal and vertical resolution,
measured in pixels or dots per inch (dpi),
for which the font was designed.
Zero is used to indicate a scalable font (see <xref linkend='Scalable_Fonts' xrefstyle='select: title'/>).
Horizontal and vertical values are required
because a separate bitmap font must be designed
for displays with very different aspect ratios
(for example, 1:1, 4:3, 2:1, and so on).
</para>
<para>
<!-- .LP -->
The separation of pixel or point size and resolution is necessary
because X allows for servers with very different video characteristics
(for example, horizontal and vertical resolution, screen and pixel size,
pixel shape, and so on) to potentially access the same font library.
The font name, for example, must differentiate between a 14-point font designed
for 75 dpi (body size of about 14 pixels) or a 14-point font designed
for 150 dpi (body size of about 28 pixels).
Further, in servers that implement some or all fonts as continuously scaled
and scan-converted outlines,
POINT_SIZE and RESOLUTION_Y will help the server to differentiate
between potentially separate font masters for text, title,
and display sizes or for other typographic considerations.
</para>
</sect3>
<sect3 id='SPACING_Field'>
<title>SPACING Field</title>
<!-- .XS -->
<!-- (SN SPACING Field -->
<!-- .XE -->
<para>
<!-- .LP -->
SPACING is a code-string that indicates the escapement class of the font,
that is, monospace (fixed pitch), proportional (variable pitch),
or charcell (a special monospaced font that conforms to the traditional
data-processing character cell font model).
The encoding is as follows:
</para>
<informaltable frame="topbot">
<tgroup cols='3' align='left' colsep='0' rowsep='0'>
<colspec colname='c1' colwidth='1.0*'/>
<colspec colname='c2' colwidth='3.0*'/>
<colspec colname='c3' colwidth='6.0*'/>
<thead>
<row rowsep='1'>
<entry>Code</entry>
<entry>English Translation</entry>
<entry>Description</entry>
</row>
</thead>
<tbody>
<row>
<entry>"P"</entry>
<entry>Proportional</entry>
<entry>
A font whose logical character widths vary for each glyph.
Note that no other restrictions are placed on the metrics
of a proportional font.
</entry>
</row>
<row>
<entry>"M"</entry>
<entry>Monospaced</entry>
<entry>
A font whose logical character widths are constant
(that is, every glyph in the font has the same logical width).
No other restrictions are placed on the metrics of a monospaced font.
</entry>
</row>
<row>
<entry>"C"</entry>
<entry>CharCell</entry>
<entry>
A monospaced font that follows the standard typewriter character cell model
(that is, the glyphs of the font can be modeled by X clients as "boxes"
of the same width and height that are imaged side-by-side
to form text strings or top-to-bottom to form text lines).
By definition,
all glyphs have the same logical character width,
and no glyphs have "ink" outside of the character cell.
There is no kerning (that is, on a per-character basis with positive metrics:
0 <= left-bearing <= right-bearing <= width;
with negative metrics: width <= left-bearing <= right-bearing <= zero).
Also, the vertical extents of the font do not exceed the vertical spacing
(that is, on a per-character basis:
ascent <= font-ascent and descent <= font-descent).
The cell height = font-descent + font-ascent, and the width = AVERAGE_WIDTH.
</entry>
</row>
</tbody>
</tgroup>
</informaltable>
</sect3>
<sect3 id='AVERAGE_WIDTH_Field'>
<title>AVERAGE_WIDTH Field</title>
<!-- .XS -->
<!-- (SN AVERAGE_WIDTH Field -->
<!-- .XE -->
<para>
<!-- .LP -->
AVERAGE_WIDTH is an integer-string typographic metric value
that gives the unweighted arithmetic mean of the absolute value of the
width of each glyph in the font
(measured in tenths of pixels), multiplied by -1 if the dominant
writing direction for the font is right-to-left.
A leading "~" (TILDE) indicates a negative value.
For monospaced and character cell fonts,
this is the width of all glyphs in the font.
Zero is used to indicate a scalable font (see <xref linkend='Scalable_Fonts' xrefstyle='select: title'/>).
</para>
</sect3>
<sect3 id='CHARSET_REGISTRY_and_CHARSET_ENCODING_Fields'>
<title>CHARSET_REGISTRY and CHARSET_ENCODING Fields</title>
<!-- .XS -->
<!-- (SN CHARSET_REGISTRY and CHARSET_ENCODING Fields -->
<!-- .XE -->
<para>
<!-- .LP -->
The character set used to encode the glyphs of the font (and implicitly
the font's glyph repertoire), as maintained by the X Consortium character
set registry.
CHARSET_REGISTRY is an x-registered-name that identifies
the registration authority that owns the specified encoding.
CHARSET_ENCODING is a registered name that identifies the coded character set
as defined by that registration authority
and, optionally, a subsetting hint.
</para>
<para>
<!-- .LP -->
Although the X protocol does not explicitly have any knowledge about
character set encodings,
it is expected that server implementors will prefer to embed knowledge
of certain proprietary or standard charsets into their font library
for reasons of performance and convenience.
The CHARSET_REGISTRY and CHARSET_ENCODING fields or properties allow
an X client font request to specify a specific charset mapping
in server environments where multiple charsets are supported.
The availability of any particular
character set is font and server implementation dependent.
</para>
<para>
<!-- .LP -->
To prevent collisions when defining character set names,
it is recommended that CHARSET_REGISTRY and CHARSET_ENCODING name pairs
be constructed according to the following conventions:
</para>
<!-- .IN "CHARSET Syntax" -->
<!-- .SM -->
<informaltable frame="none">
<tgroup cols='2' align='left' colsep='0' rowsep='0'>
<colspec colname='c1' colwidth='1.0*'/>
<colspec colname='c2' colwidth='2.0*'/>
<tbody>
<row>
<entry>CharsetRegistry ::=</entry>
<entry>StdCharsetRegistryName | PrivCharsetRegistryName</entry>
</row>
<row>
<entry>CharsetEncoding ::=</entry>
<entry>StdCharsetEncodingName | PrivCharsetEncodingName</entry>
</row>
<row>
<entry>StdCharsetRegistryName ::=</entry>
<entry>StdOrganizationId StdNumber | StdOrganizationId StdNumber Dot Year</entry>
</row>
<row>
<entry>PrivCharsetRegistryName ::=</entry>
<entry>OrganizationId STRING8</entry>
</row>
<row>
<entry>StdCharsetEncodingName ::=</entry>
<entry>STRING8-numeric part number of referenced standard</entry>
</row>
<row>
<entry>PrivCharsetEncodingName ::=</entry>
<entry>STRING8</entry>
</row>
<row>
<entry>StdOrganizationId ::=</entry>
<entry>STRING8-the registered name or acronym of the referenced standard organization</entry>
</row>
<row>
<entry>StdNumber ::=</entry>
<entry>STRING8-referenced standard number</entry>
</row>
<row>
<entry>OrganizationId ::=</entry>
<entry>STRING8-the registered name or acronym of the organization</entry>
</row>
<row>
<entry>Dot ::=</entry>
<entry>OCTET-"." (FULL STOP)</entry>
</row>
<row>
<entry>Year ::=</entry>
<entry>STRING8-numeric year (for example, 1989)</entry>
</row>
</tbody>
</tgroup>
</informaltable>
<para>
<!-- .LP -->
The X Consortium shall maintain and publish a registry
of such character set names for use in X protocol font names and properties
as specified in XLFD.
</para>
<para>
<!-- .LP -->
The ISO Latin-1 character set shall be registered by the X Consortium as the
CHARSET_REGISTRY-CHARSET_ENCODING value pair: "ISO8859-1".
</para>
<para>
<!-- .LP -->
If the CHARSET_ENCODING contains a "[" (LEFT SQUARE BRACKET),
the "[" and the characters after it up to a "]" (RIGHT SQUARE
BRACKET) are a
subsetting hint telling the font source that the client is interested
only in a subset of the characters of the font.
The font source can, optionally, return a font that
contains only those characters or any superset of those characters. The
client can expect to obtain valid glyphs and metrics only for those
characters, and not for any other characters in the font.
The font properties may optionally be calculated by considering only
the characters in the subset.
</para>
<para>
<!-- .LP -->
The BNF for the subsetting hint is
</para>
<!-- .SM -->
<informaltable frame="none">
<tgroup cols='2' align='left' colsep='0' rowsep='0'>
<colspec colname='c1' colwidth='1.0*'/>
<colspec colname='c2' colwidth='2.0*'/>
<tbody>
<row>
<entry>Subset ::=</entry>
<entry>LeftBracket RangeList RightBracket</entry>
</row>
<row>
<entry>RangeList ::=</entry>
<entry>Range | Range Space RangeList</entry>
</row>
<row>
<entry>Range ::=</entry>
<entry>Number | Number Underscore Number</entry>
</row>
<row>
<entry>Number ::=</entry>
<entry>"0x" HexNumber | DecNumber</entry>
</row>
<row>
<entry>HexNumber ::=</entry>
<entry>HexDigit | HexDigit HexNumber</entry>
</row>
<row>
<entry>DecNumber ::=</entry>
<entry>DecDigit | DecDigit DecNumber</entry>
</row>
<row>
<entry>DecDigit ::=</entry>
<entry>"0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9"</entry>
</row>
<row>
<entry>HexDigit ::=</entry>
<entry>DecDigit | "a" | "b" | "c" | "d" | "e" | "f"</entry>
</row>
<row>
<entry>LeftBracket ::=</entry>
<entry>"[" (LEFT SQUARE BRACKET)</entry>
</row>
<row>
<entry>RightBracket ::=</entry>
<entry>"]" (RIGHT SQUARE BRACKET)</entry>
</row>
<row>
<entry>Space ::=</entry>
<entry>"\0" (SPACE)</entry>
</row>
<row>
<entry>Underscore ::=</entry>
<entry>"_" (LOW LINE)</entry>
</row>
</tbody>
</tgroup>
</informaltable>
<para>
<!-- .LP -->
Each Range specifies characters that are to be part of the subset
included in the font.
A Range containing two Numbers specifies the first and last character,
inclusively, of a range of characters.
A Range that is a single Number specifies a single character to be
included in the font.
A HexNumber is interpreted as a hexadecimal number.
A DecNumber is interpreted as a decimal number.
The font consists of the union of all the Ranges in the
RangeList.
</para>
<para>
<!-- .LP -->
For example,
</para>
<!-- .br -->
<!-- .ft C -->
<!-- .SM -->
<literallayout class="monospaced">
-misc-fixed-medium-r-normal--0-0-0-0-c-0-iso8859-1[65 70 80_90]
</literallayout>
<!-- .NL -->
<!-- .ft P -->
<!-- .br -->
<para>
tells the font source that the client is interested only in characters
65, 70, and 80-90.
</para>
</sect3>
</sect2>
<sect2 id='Examples'>
<title>Examples</title>
<!-- .XS -->
<!-- (SN Examples -->
<!-- .XE -->
<para>
<!-- .LP -->
The following examples of font names are derived from the screen fonts
shipped with the X Consortium distribution.
</para>
<!-- .\" why is this table so long? I took out some fonts in v1.5 -->
<!-- .\" to make the page breaks better. -->
<!-- .SM -->
<informaltable frame="topbot">
<tgroup cols='2' align='left' colsep='0' rowsep='0'>
<colspec colname='c1' colwidth='1.0*'/>
<colspec colname='c2' colwidth='2.0*'/>
<thead>
<row rowsep='1'>
<entry>Font</entry>
<entry>X FontName</entry>
</row>
</thead>
<tbody>
<row>
<entry><function>75-dpi Fonts</function></entry>
</row>
<row>
<entry>Charter 12 pt</entry>
<entry>-Bitstream-Charter-Medium-R-Normal--12-120-75-75-P-68-ISO8859-1</entry>
</row>
<row>
<entry>Charter Bold 12 pt</entry>
<entry>-Bitstream-Charter-Bold-R-Normal--12-120-75-75-P-76-ISO8859-1</entry>
</row>
<row>
<entry>Charter Bold Italic 12 pt</entry>
<entry>-Bitstream-Charter-Bold-I-Normal--12-120-75-75-P-75-ISO8859-1</entry>
</row>
<row>
<entry>Charter Italic 12 pt</entry>
<entry>-Bitstream-Charter-Medium-I-Normal--12-120-75-75-P-66-ISO8859-1</entry>
</row>
<row>
<entry>Courier 8 pt</entry>
<entry>-Adobe-Courier-Medium-R-Normal--8-80-75-75-M-50-ISO8859-1</entry>
</row>
<row>
<entry>Courier 10 pt</entry>
<entry>-Adobe-Courier-Medium-R-Normal--10-100-75-75-M-60-ISO8859-1</entry>
</row>
<row>
<entry>Courier 12 pt</entry>
<entry>-Adobe-Courier-Medium-R-Normal--12-120-75-75-M-70-ISO8859-1</entry>
</row>
<row>
<entry>Courier 24 pt</entry>
<entry>-Adobe-Courier-Medium-R-Normal--24-240-75-75-M-150-ISO8859-1</entry>
</row>
<row>
<entry>Courier Bold 10 pt</entry>
<entry>-Adobe-Courier-Bold-R-Normal--10-100-75-75-M-60-ISO8859-1</entry>
</row>
<row>
<entry>Courier Bold Oblique 10 pt</entry>
<entry>-Adobe-Courier-Bold-O-Normal--10-100-75-75-M-60-ISO8859-1</entry>
</row>
<row>
<entry>Courier Oblique 10 pt</entry>
<entry>-Adobe-Courier-Medium-O-Normal--10-100-75-75-M-60-ISO8859-1</entry>
</row>
<row>
<entry><function>100-dpi Fonts</function></entry>
</row>
<row>
<entry>Symbol 10 pt</entry>
<entry>-Adobe-Symbol-Medium-R-Normal--14-100-100-100-P-85-Adobe-FONTSPECIFIC</entry>
</row>
<row>
<entry>Symbol 14 pt</entry>
<entry>-Adobe-Symbol-Medium-R-Normal--20-140-100-100-P-107-Adobe-FONTSPECIFIC</entry>
</row>
<row>
<entry>Symbol 18 pt</entry>
<entry>-Adobe-Symbol-Medium-R-Normal--25-180-100-100-P-142-Adobe-FONTSPECIFIC</entry>
</row>
<row>
<entry>Symbol 24 pt</entry>
<entry>-Adobe-Symbol-Medium-R-Normal--34-240-100-100-P-191-Adobe-FONTSPECIFIC</entry>
</row>
<row>
<entry>Times Bold 10 pt</entry>
<entry>-Adobe-Times-Bold-R-Normal--14-100-100-100-P-76-ISO8859-1</entry>
</row>
<row>
<entry>Times Bold Italic 10 pt</entry>
<entry>-Adobe-Times-Bold-I-Normal--14-100-100-100-P-77-ISO8859-1</entry>
</row>
<row>
<entry>Times Italic 10 pt</entry>
<entry>-Adobe-Times-Medium-I-Normal--14-100-100-100-P-73-ISO8859-1</entry>
</row>
<row>
<entry>Times Roman 10 pt</entry>
<entry>-Adobe-Times-Medium-R-Normal--14-100-100-100-P-74-ISO8859-1</entry>
</row>
</tbody>
</tgroup>
</informaltable>
</sect2>
</sect1>
<sect1 id='Font_Properties'>
<title>Font Properties</title>
<!-- .XS -->
<!-- (SN Font Properties -->
<!-- .XE -->
<para>
<!-- .LP -->
All font properties are optional but will generally include the
font name fields and, on a font-by-font basis, any other useful font
descriptive and use information that may be required to use the font
intelligently.
The XLFD specifies an extensive set of standard X font properties,
their interpretation, and fallback rules when the property is not defined
for a given font.
The goal is to provide client applications with enough font information
to be able to make automatic formatting and display decisions
with good typographic results.
</para>
<para>
<!-- .LP -->
Font property names use the ISO 8859-1 encoding.
</para>
<para>
<!-- .LP -->
Additional standard X font property definitions may be defined in the
future and private properties may exist in X fonts at any time.
Private font properties should be defined to conform to the general mechanism
defined in the X protocol to prevent overlap of name space and ambiguous
property names, that is, private font property names are of the form:
"_" (LOW LINE),
followed by the organizational identifier, followed by "_" (LOW LINE),
and terminated with the property name.
</para>
<para>
<!-- .LP -->
The Backus-Naur Form syntax description of X font properties is as follows:
</para>
<!-- .IN "Font Properties" "BNF Syntax" -->
<!-- .SM -->
<informaltable frame="none">
<?dbfo keep-together="always" ?>
<tgroup cols='2' align='left' colsep='0' rowsep='0'>
<colspec colname='c1' colwidth='1.0*'/>
<colspec colname='c2' colwidth='3.0*'/>
<tbody>
<row>
<entry>Properties ::=</entry>
<entry>OptFontPropList</entry>
</row>
<row>
<entry>OptFontPropList ::=</entry>
<entry>NULL | OptFontProp OptFontPropList</entry>
</row>
<row>
<entry>OptFontProp ::=</entry>
<entry>PrivateFontProp | XFontProp</entry>
</row>
<row>
<entry>PrivateFontProp ::=</entry>
<entry>STRING8 | Underscore OrganizationId Underscore STRING8</entry>
</row>
<row>
<entry>XFontProp ::=</entry>
<entry>
FOUNDRY | FAMILY_NAME | WEIGHT_NAME | SLANT | SETWIDTH_NAME | ADD_STYLE_NAME
| PIXEL_SIZE | POINT_SIZE | RESOLUTION_X | RESOLUTION_Y | SPACING |
AVERAGE_WIDTH | CHARSET_REGISTRY | CHARSET_ENCODING | QUAD_WIDTH |
RESOLUTION | MIN_SPACE | NORM_SPACE | MAX_SPACE | END_SPACE | SUPERSCRIPT_X |
SUPERSCRIPT_Y | SUBSCRIPT_X | SUBSCRIPT_Y | UNDERLINE_POSITION |
UNDERLINE_THICKNESS | STRIKEOUT_ASCENT | STRIKEOUT_DESCENT | ITALIC_ANGLE
| X_HEIGHT | WEIGHT | FACE_NAME |
FULL_NAME | FONT |
COPYRIGHT | AVG_CAPITAL_WIDTH |
AVG_LOWERCASE_WIDTH | RELATIVE_SETWIDTH | RELATIVE_WEIGHT | CAP_HEIGHT |
SUPERSCRIPT_ SIZE | FIGURE_WIDTH | SUBSCRIPT_SIZE | SMALL_CAP_SIZE |
NOTICE | DESTINATION
| FONT_TYPE | FONT_VERSION | RASTERIZER_NAME | RASTERIZER_VERSION |
RAW_ASCENT | RAW_DESCENT | RAW_* | AXIS_NAMES | AXIS_LIMITS |
AXIS_TYPES</entry>
</row>
<row>
<entry>Underscore ::=</entry>
<entry>OCTET-"_" (LOW LINE)</entry>
</row>
<row>
<entry>OrganizationId ::=</entry>
<entry>STRING8-the registered name of the organization</entry>
</row>
</tbody>
</tgroup>
</informaltable>
<sect2 id='FOUNDRY'>
<title>FOUNDRY</title>
<!-- .XS -->
<!-- (SN FOUNDRY -->
<!-- .XE -->
<para>
<!-- .LP -->
FOUNDRY is as defined in the
<function>FontName</function>
except that the property type is ATOM.
</para>
<para>
<!-- .LP -->
FOUNDRY cannot be calculated or defaulted if not supplied as a font property.
</para>
</sect2>
<sect2 id='FAMILY_NAME'>
<title>FAMILY_NAME</title>
<!-- .XS -->
<!-- (SN FAMILY_NAME -->
<!-- .XE -->
<para>
<!-- .LP -->
FAMILY_NAME is as defined in the
<function>FontName</function>
except that the property type is ATOM.
</para>
<para>
<!-- .LP -->
FAMILY_NAME cannot be calculated or defaulted if not supplied as a font
property.
</para>
</sect2>
<sect2 id='WEIGHT_NAME'>
<title>WEIGHT_NAME</title>
<!-- .XS -->
<!-- (SN WEIGHT_NAME -->
<!-- .XE -->
<para>
<!-- .LP -->
WEIGHT_NAME is as defined in the
<function>FontName</function>
except that the property type is ATOM.
</para>
<para>
<!-- .LP -->
WEIGHT_NAME can be defaulted if not supplied as a font property, as follows:
</para>
<literallayout class="monospaced">
if (WEIGHT_NAME undefined) then
WEIGHT_NAME = ATOM("Medium")
</literallayout>
</sect2>
<sect2 id='SLANT'>
<title>SLANT</title>
<!-- .XS -->
<!-- (SN SLANT -->
<!-- .XE -->
<para>
<!-- .LP -->
SLANT is as defined in the
<function>FontName</function>
except that the property type is ATOM.
</para>
<para>
<!-- .LP -->
SLANT can be defaulted if not supplied as a font property, as follows:
</para>
<literallayout class="monospaced">
if (SLANT undefined) then
SLANT = ATOM("R")
</literallayout>
</sect2>
<sect2 id='SETWIDTH_NAME'>
<title>SETWIDTH_NAME</title>
<!-- .XS -->
<!-- (SN SETWIDTH_NAME -->
<!-- .XE -->
<para>
<!-- .LP -->
SETWIDTH_NAME is as defined in the
<function>FontName</function>
except that the property type is ATOM.
</para>
<para>
<!-- .LP -->
SETWIDTH_NAME can be defaulted if not supplied as a font property, as follows:
</para>
<literallayout class="monospaced">
if (SETWIDTH_NAME undefined) then
SETWIDTH_NAME = ATOM("Normal")
</literallayout>
</sect2>
<sect2 id='ADD_STYLE_NAME'>
<title>ADD_STYLE_NAME</title>
<!-- .XS -->
<!-- (SN ADD_STYLE_NAME -->
<!-- .XE -->
<para>
<!-- .LP -->
ADD_STYLE_NAME is as defined in the
<function>FontName</function>
except that the property type is ATOM.
</para>
<para>
<!-- .LP -->
ADD_STYLE_NAME can be defaulted if not supplied as a font property, as follows:
</para>
<literallayout class="monospaced">
if (ADD_STYLE_NAME undefined) then
ADD_STYLE_NAME = ATOM("")
</literallayout>
</sect2>
<sect2 id='PIXEL_SIZE'>
<title>PIXEL_SIZE</title>
<!-- .XS -->
<!-- (SN PIXEL_SIZE -->
<!-- .XE -->
<para>
<!-- .LP -->
PIXEL_SIZE is as defined in the
<function>FontName</function>
except that the property type is INT32.
</para>
<para>
<!-- .LP -->
X clients requiring pixel values for the various typographic fixed
spaces (em space, en space, and thin space) can use the following
algorithm for computing these values from other properties specified
for a font:
</para>
<literallayout class="monospaced">
DeciPointsPerInch = 722.7
EMspace = ROUND ((RESOLUTION_X * POINT_SIZE) / DeciPointsPerInch)
ENspace = ROUND (EMspace / 2)
THINspace = ROUND (EMspace / 3)\fP
</literallayout>
<para>
<!-- .LP -->
where a slash (/) denotes real division,
an asterisk (*) denotes real multiplication,
and ROUND denotes a function that rounds its real argument
<emphasis remap='I'>a</emphasis> up or down
to the next integer.
This rounding is done according to X = FLOOR (
<emphasis remap='I'>a</emphasis> + 0.5),
where FLOOR is a function that rounds its real argument down to the
nearest integer.
</para>
<para>
<!-- .LP -->
PIXEL_SIZE can be approximated if not supplied as a font property,
according to the following algorithm:
</para>
<!-- <literallayout class="monospaced"> -->
<literallayout class="monospaced">
DeciPointsPerInch = 722.7
if (PIXEL_SIZE undefined) then
PIXEL_SIZE = ROUND ((RESOLUTION_Y * POINT_SIZE) / DeciPointsPerInch)
</literallayout>
</sect2>
<sect2 id='POINT_SIZE'>
<title>POINT_SIZE</title>
<!-- .XS -->
<!-- (SN POINT_SIZE -->
<!-- .XE -->
<para>
<!-- .LP -->
POINT_SIZE is as defined in the
<function>FontName</function>
except that the property type is INT32.
</para>
<para>
<!-- .LP -->
X clients requiring device-independent values for em space,
en space, and thin space can use the following algorithm:
</para>
<literallayout class="monospaced">
EMspace = ROUND (POINT_SIZE / 10)
ENspace = ROUND (POINT_SIZE / 20)
THINspace = ROUND (POINT_SIZE / 30)
</literallayout>
<para>
<!-- .LP -->
Design POINT_SIZE cannot be calculated or approximated.
</para>
</sect2>
<sect2 id='RESOLUTION_X_x'>
<title>RESOLUTION_X</title>
<!-- .XS -->
<!-- (SN RESOLUTION_X -->
<!-- .XE -->
<para>
<!-- .LP -->
RESOLUTION_X is as defined in the
<function>FontName</function>
except that the property type is CARD32.
</para>
<para>
<!-- .LP -->
RESOLUTION_X cannot be calculated or approximated.
</para>
</sect2>
<sect2 id='RESOLUTION_Y_y'>
<title>RESOLUTION_Y</title>
<!-- .XS -->
<!-- (SN RESOLUTION_Y -->
<!-- .XE -->
<para>
<!-- .LP -->
RESOLUTION_Y is as defined in the
<function>FontName</function>
except that the property type is CARD32.
</para>
<para>
<!-- .LP -->
RESOLUTION_X cannot be calculated or approximated.
</para>
</sect2>
<sect2 id='SPACING'>
<title>SPACING</title>
<!-- .XS -->
<!-- (SN SPACING -->
<!-- .XE -->
<para>
<!-- .LP -->
SPACING is as defined in the
<function>FontName</function>
except that the property type is ATOM.
</para>
<para>
<!-- .LP -->
SPACING can be calculated if not supplied as a font property,
according to the definitions given above for the
<function>FontName</function>.
</para>
</sect2>
<sect2 id='AVERAGE_WIDTH'>
<title>AVERAGE_WIDTH</title>
<!-- .XS -->
<!-- (SN AVERAGE_WIDTH -->
<!-- .XE -->
<para>
<!-- .LP -->
AVERAGE_WIDTH is as defined in the
<function>FontName</function>
except that the property type is INT32.
</para>
<para>
<!-- .LP -->
AVERAGE_WIDTH can be calculated if not provided as a font property,
according to the following algorithm:
</para>
<literallayout class="monospaced">
if (AVERAGE_WIDTH undefined) then
AVERAGE_WIDTH = ROUND (MEAN (ABS (width of each glyph in font)) * 10)
* (if (dominant writing direction L-to-R) then 1 else -1)
</literallayout>
<para>
<!-- .LP -->
where MEAN is a function that returns the arithmetic mean of its arguments.
</para>
<para>
<!-- .LP -->
X clients that require values for the number of characters per inch (pitch)
of a monospaced font can use the following algorithm using the
AVERAGE_WIDTH and RESOLUTION_X font properties:
</para>
<literallayout class="monospaced">
if (SPACING not proportional) then
CharPitch = (RESOLUTION_X * 10) / AVERAGE_WIDTH
</literallayout>
</sect2>
<sect2 id='CHARSET_REGISTRY'>
<title>CHARSET_REGISTRY</title>
<!-- .XS -->
<!-- (SN CHARSET_REGISTRY -->
<!-- .XE -->
<para>
<!-- .LP -->
CHARSET_REGISTRY is as defined in the
<function>FontName</function>
except that the property type is ATOM.
</para>
<para>
<!-- .LP -->
CHARSET_REGISTRY cannot be defaulted if not supplied as a font property.
</para>
</sect2>
<sect2 id='CHARSET_ENCODING'>
<title>CHARSET_ENCODING</title>
<!-- .XS -->
<!-- (SN CHARSET_ENCODING -->
<!-- .XE -->
<para>
<!-- .LP -->
CHARSET_ENCODING is as defined in the
<function>FontName</function>
except that the property type is ATOM.
</para>
<para>
<!-- .LP -->
CHARSET_ENCODING cannot be defaulted if not supplied as a font property.
</para>
</sect2>
<sect2 id='MIN_SPACE'>
<title>MIN_SPACE</title>
<!-- .XS -->
<!-- (SN MIN_SPACE -->
<!-- .XE -->
<para>
<!-- .LP -->
MIN_SPACE is an integer value (of type INT32)
that gives the recommended minimum word-space value to be used with this font.
</para>
<para>
<!-- .LP -->
MIN_SPACE can be approximated if not provided as a font property,
according to the following algorithm:
</para>
<literallayout class="monospaced">
if (MIN_SPACE undefined) then
MIN_SPACE = ROUND(0.75 * NORM_SPACE)
</literallayout>
</sect2>
<sect2 id='NORM_SPACE'>
<title>NORM_SPACE</title>
<!-- .XS -->
<!-- (SN NORM_SPACE -->
<!-- .XE -->
<para>
<!-- .LP -->
NORM_SPACE is an integer value (of type INT32)
that gives the recommended normal word-space value to be used with this font.
</para>
<para>
<!-- .LP -->
NORM_SPACE can be approximated if not provided as a font property,
according to the following algorithm:
</para>
<literallayout class="monospaced">
DeciPointsPerInch = 722.7
if (NORM_SPACE undefined) then
if (SPACE glyph exists) then
NORM_SPACE = width of SPACE
else NORM_SPACE = ROUND((0.33 * RESOLUTION_X * POINT_SIZE)/ DeciPointsPerInch)
</literallayout>
</sect2>
<sect2 id='MAX_SPACE'>
<title>MAX_SPACE</title>
<!-- .XS -->
<!-- (SN MAX_SPACE -->
<!-- .XE -->
<para>
<!-- .LP -->
MAX_SPACE is an integer value (of type INT32)
that gives the recommended maximum word-space value to be used with this font.
</para>
<para>
<!-- .LP -->
MAX_SPACE can be approximated if not provided as a font property,
according to the following algorithm:
</para>
<literallayout class="monospaced">
if (MAX_SPACE undefined) then
MAX_SPACE = ROUND(1.5 * NORM_SPACE)
</literallayout>
</sect2>
<sect2 id='END_SPACE'>
<title>END_SPACE</title>
<!-- .XS -->
<!-- (SN END_SPACE -->
<!-- .XE -->
<para>
<!-- .LP -->
END_SPACE is an integer value (of type INT32)
that gives the recommended spacing at the end of sentences.
</para>
<para>
<!-- .LP -->
END_SPACE can be approximated if not provided as a font property,
according to the following algorithm:
</para>
<literallayout class="monospaced">
if (END_SPACE undefined) then
END_SPACE = NORM_SPACE
</literallayout>
</sect2>
<sect2 id='AVG_CAPITAL_WIDTH'>
<title>AVG_CAPITAL_WIDTH</title>
<!-- .XS -->
<!-- (SN AVG_CAPITAL_WIDTH -->
<!-- .XE -->
<para>
<!-- .LP -->
AVG_CAPITAL_WIDTH is an integer value (of type INT32)
that gives the unweighted arithmetic mean of the absolute value of the
width of each capital glyph in the font, in tenths of pixels,
multiplied by -1 if the dominant
writing direction for the font is right-to-left.
This property applies to both Latin and non-Latin fonts.
For Latin fonts,
capitals are the glyphs A through Z.
This property is usually used for font matching or substitution.
</para>
<para>
<!-- .LP -->
AVG_CAPITAL_WIDTH can be calculated if not provided as a font property,
according to the following algorithm:
</para>
<literallayout class="monospaced">
if (AVG_CAPITAL_WIDTH undefined) then
if (capitals exist) then
AVG_CAPITAL_WIDTH = ROUND (MEAN
(ABS (width of each capital glyph)) * 10)
* (if (dominant writing direction L-to-R) then 1 else -1)
else AVG_CAPITAL_WIDTH undefined
</literallayout>
</sect2>
<sect2 id='AVG_LOWERCASE_WIDTH'>
<title>AVG_LOWERCASE_WIDTH</title>
<!-- .XS -->
<!-- (SN AVG_LOWERCASE_WIDTH -->
<!-- .XE -->
<para>
<!-- .LP -->
AVG_LOWERCASE_WIDTH is an integer value (of type INT32)
that gives the unweighted arithmetic mean width of the absolute value
of the width of each lowercase glyph in the font in tenths of pixels,
multiplied by -1 if the dominant
writing direction for the font is right-to-left.
For Latin fonts,
lowercase are the glyphs a through z.
This property is usually used for font matching or substitution.
</para>
<para>
<!-- .LP -->
Where appropriate,
AVG_LOWERCASE_WIDTH can be approximated if not provided as a font property,
according to the following algorithm:
</para>
<literallayout class="monospaced">
if (AVG_LOWERCASE_WIDTH undefined) then
if (lowercase exists) then
AVG_LOWERCASE_WIDTH = ROUND (MEAN
(ABS (width of each lowercase glyph)) * 10)
* (if (dominant writing direction L-to-R) then 1 else -1)
else AVG_LOWERCASE_WIDTH undefined
</literallayout>
</sect2>
<sect2 id='QUAD_WIDTH'>
<title>QUAD_WIDTH</title>
<!-- .XS -->
<!-- (SN QUAD_WIDTH -->
<!-- .XE -->
<para>
<!-- .LP -->
QUAD_WIDTH is an integer typographic metric (of type INT32)
that gives the width of a quad (em) space.
</para>
<note>
<para>
<!-- .NT Note -->
Because all typographic fixed spaces (em, en, and thin) are constant
for a given font size (that is, they do not vary according to setwidth),
the use of this font property has been deprecated.
X clients that require typographic fixed space values are encouraged
to discontinue use of QUAD_WIDTH and compute these values
from other font properties (for example, PIXEL_SIZE).
X clients that require a font-dependent width value should use either
the FIGURE_WIDTH or one of the average character width font properties
(AVERAGE_WIDTH, AVG_CAPITAL_WIDTH or AVG_LOWERCASE_WIDTH).
</para>
</note>
<!-- .NE -->
</sect2>
<sect2 id='FIGURE_WIDTH'>
<title>FIGURE_WIDTH</title>
<!-- .XS -->
<!-- (SN FIGURE_WIDTH -->
<!-- .XE -->
<para>
<!-- .LP -->
FIGURE_WIDTH is an integer typographic metric (of type INT32)
that gives the width of the tabular figures and the dollar sign,
if suitable for tabular setting (all widths equal).
For Latin fonts, these tabular figures are the Arabic numerals 0 through 9.
</para>
<para>
<!-- .LP -->
FIGURE_WIDTH can be approximated if not supplied as a font property,
according to the following algorithm:
</para>
<literallayout class="monospaced">
if (numerals and DOLLAR sign are defined & widths are equal) then
FIGURE_WIDTH = width of DOLLAR
else FIGURE_WIDTH property undefined
</literallayout>
</sect2>
<sect2 id='SUPERSCRIPT_X_x'>
<title>SUPERSCRIPT_X</title>
<!-- .XS -->
<!-- (SN SUPERSCRIPT_X -->
<!-- .XE -->
<para>
<!-- .LP -->
SUPERSCRIPT_X is an integer value (of type INT32)
that gives the recommended horizontal offset in pixels
from the position point to the X origin of synthetic superscript text.
If the current position point is at [X,Y],
then superscripts should begin at [X + SUPERSCRIPT_X, Y - SUPERSCRIPT_Y].
</para>
<para>
<!-- .LP -->
SUPERSCRIPT_X can be approximated if not provided as a font property,
according to the following algorithm:
</para>
<literallayout class="monospaced">
if (SUPERSCRIPT_X undefined) then
if (TANGENT(ITALIC_ANGLE) defined) then
SUPERSCRIPT_X = ROUND((0.40 * CAP_HEIGHT) / TANGENT(ITALIC_ANGLE))
else SUPERSCRIPT_X = ROUND(0.40 * CAP_HEIGHT)
</literallayout>
<para>
<!-- .LP -->
where TANGENT is a trigonometric function that returns the tangent of
its argument, which is in 1/64 degrees.
</para>
</sect2>
<sect2 id='SUPERSCRIPT_Y_y'>
<title>SUPERSCRIPT_Y</title>
<!-- .XS -->
<!-- (SN SUPERSCRIPT_Y -->
<!-- .XE -->
<para>
<!-- .LP -->
SUPERSCRIPT_Y is an integer value (of type INT32)
that gives the recommended vertical offset in pixels
from the position point to the Y origin of synthetic superscript text.
If the current position point is at [X,Y],
then superscripts should begin at [X + SUPERSCRIPT_X, Y - SUPERSCRIPT_Y].
</para>
<para>
<!-- .LP -->
SUPERSCRIPT_Y can be approximated if not provided as a font property,
according to the following algorithm:
</para>
<literallayout class="monospaced">
if (SUPERSCRIPT_Y undefined) then
SUPERSCRIPT_Y = ROUND(0.40 * CAP_HEIGHT)
</literallayout>
</sect2>
<sect2 id='SUBSCRIPT_X_x'>
<title>SUBSCRIPT_X</title>
<!-- .XS -->
<!-- (SN SUBSCRIPT_X -->
<!-- .XE -->
<para>
<!-- .LP -->
SUBSCRIPT_X is an integer value (of type INT32)
that gives the recommended horizontal offset in pixels
from the position point to the X origin of synthetic subscript text.
If the current position point is at [X,Y],
then subscripts should begin at [X + SUBSCRIPT_X, Y + SUBSCRIPT_Y].
</para>
<para>
<!-- .LP -->
SUBSCRIPT_X can be approximated if not provided as a font property,
according to the following algorithm:
</para>
<literallayout class="monospaced">
if (SUBSCRIPT_X undefined) then
if (TANGENT(ITALIC_ANGLE) defined) then
SUBSCRIPT_X = ROUND((0.40 * CAP_HEIGHT) / TANGENT(ITALIC_ANGLE))
else SUBSCRIPT_X = ROUND(0.40 * CAP_HEIGHT)
</literallayout>
</sect2>
<sect2 id='SUBSCRIPT_Y_y'>
<title>SUBSCRIPT_Y</title>
<!-- .XS -->
<!-- (SN SUBSCRIPT_Y -->
<!-- .XE -->
<para>
<!-- .LP -->
SUBSCRIPT_Y is an integer value (of type INT32)
that gives the recommended vertical offset in pixels
from the position point to the Y origin of synthetic subscript text.
If the current position point is at [X,Y],
then subscripts should begin at [X + SUBSCRIPT_X, Y + SUBSCRIPT_Y].
</para>
<para>
<!-- .LP -->
SUBSCRIPT_Y can be approximated if not provided as a font property,
according to the following algorithm:
</para>
<literallayout class="monospaced">
if (SUBSCRIPT_Y undefined) then
SUBSCRIPT_Y = ROUND(0.40 * CAP_HEIGHT)
</literallayout>
</sect2>
<sect2 id='SUPERSCRIPT_SIZE'>
<title>SUPERSCRIPT_SIZE</title>
<!-- .XS -->
<!-- (SN SUPERSCRIPT_SIZE -->
<!-- .XE -->
<para>
<!-- .LP -->
SUPERSCRIPT_SIZE is an integer value (of type INT32)
that gives the recommended body size of synthetic superscripts
to be used with this font, in pixels.
This will generally be smaller than the size of the current font;
that is, superscripts are imaged from a smaller font
offset according to SUPERSCRIPT_X and SUPERSCRIPT_Y.
</para>
<para>
<!-- .LP -->
SUPERSCRIPT_SIZE can be approximated if not provided as a font property,
according to the following algorithm:
</para>
<literallayout class="monospaced">
if (SUPERSCRIPT_SIZE undefined) then
SUPERSCRIPT_SIZE = ROUND(0.60 * PIXEL_SIZE)
</literallayout>
</sect2>
<sect2 id='SUBSCRIPT_SIZE'>
<title>SUBSCRIPT_SIZE</title>
<!-- .XS -->
<!-- (SN SUBSCRIPT_SIZE -->
<!-- .XE -->
<para>
<!-- .LP -->
SUBSCRIPT_SIZE is an integer value (of type INT32)
that gives the recommended body size of synthetic subscripts
to be used with this font, in pixels.
As with SUPERSCRIPT_SIZE,
this will generally be smaller than the size of the current font;
that is, subscripts are imaged from a smaller
font offset according to SUBSCRIPT_X and SUBSCRIPT_Y.
</para>
<para>
<!-- .LP -->
SUBSCRIPT_SIZE can be approximated if not provided as a font property,
according to the algorithm:
</para>
<literallayout class="monospaced">
if (SUBSCRIPT_SIZE undefined) then
SUBSCRIPT_SIZE = ROUND(0.60 * PIXEL_SIZE)
</literallayout>
</sect2>
<sect2 id='SMALL_CAP_SIZE'>
<title>SMALL_CAP_SIZE</title>
<!-- .XS -->
<!-- (SN SMALL_CAP_SIZE -->
<!-- .XE -->
<para>
<!-- .LP -->
SMALL_CAP_SIZE is an integer value (of type INT32)
that gives the recommended body size of synthetic small capitals
to be used with this font, in pixels.
Small capitals are generally imaged from a smaller font
of slightly more weight.
No offset [X,Y] is necessary.
</para>
<para>
<!-- .LP -->
SMALL_CAP_SIZE can be approximated if not provided as a font property,
according to the following algorithm:
</para>
<literallayout class="monospaced">
if (SMALL_CAP_SIZE undefined) then
SMALL_CAP_SIZE = ROUND(PIXEL_SIZE * ((X_HEIGHT
+ ((CAP_HEIGHT - X_HEIGHT) / 3)) / CAP_HEIGHT))
</literallayout>
</sect2>
<sect2 id='UNDERLINE_POSITION'>
<title>UNDERLINE_POSITION</title>
<!-- .XS -->
<!-- (SN UNDERLINE_POSITION -->
<!-- .XE -->
<para>
<!-- .LP -->
UNDERLINE_POSITION is an integer value (of type INT32)
that gives the recommended vertical offset in pixels
from the baseline to the top of the underline.
If the current position point is at [X,Y],
the top of the baseline is given by [X, Y + UNDERLINE_POSITION].
</para>
<para>
<!-- .LP -->
UNDERLINE_POSITION can be approximated if not provided as a font
property, according to the following algorithm:
</para>
<literallayout class="monospaced">
if (UNDERLINE_POSITION undefined) then
UNDERLINE_POSITION = ROUND((maximum descent) / 2)
</literallayout>
<para>
where <emphasis remap='I'>maximum descent</emphasis>
is the maximum descent (below the baseline)
in pixels of any glyph in the font.
</para>
</sect2>
<sect2 id='UNDERLINE_THICKNESS'>
<title>UNDERLINE_THICKNESS</title>
<!-- .XS -->
<!-- (SN UNDERLINE_THICKNESS -->
<!-- .XE -->
<para>
<!-- .LP -->
UNDERLINE_THICKNESS is an integer value (of type INT32)
that gives the recommended underline thickness, in pixels.
</para>
<para>
<!-- .LP -->
UNDERLINE_THICKNESS can be approximated if not provided as a font property,
according to the following algorithm:
</para>
<literallayout class="monospaced">
CapStemWidth = average width of the stems of capitals
if (UNDERLINE_THICKNESS undefined) then
UNDERLINE_THICKNESS = CapStemWidth
</literallayout>
</sect2>
<sect2 id='STRIKEOUT_ASCENT'>
<title>STRIKEOUT_ASCENT</title>
<!-- .XS -->
<!-- (SN STRIKEOUT_ASCENT -->
<!-- .XE -->
<para>
<!-- .LP -->
STRIKEOUT_ASCENT is an integer value (of type INT32)
that gives the vertical ascent for boxing or voiding glyphs in this font.
If the current position is at [X,Y] and the string extent is EXTENT,
the upper-left corner of the strikeout box is at [X, Y - STRIKEOUT_ASCENT]
and the lower-right corner of the box is at [X + EXTENT, Y + STRIKEOUT_DESCENT].
</para>
<para>
<!-- .LP -->
STRIKEOUT_ASCENT can be approximated if not provided as a font property,
according to the following algorithm:
</para>
<literallayout class="monospaced">
if (STRIKEOUT_ASCENT undefined)
STRIKEOUT_ASCENT = maximum ascent
</literallayout>
<para>
where <emphasis remap='I'>maximum ascent</emphasis>
is the maximum ascent (above the baseline)
in pixels of any glyph in the font.
</para>
</sect2>
<sect2 id='STRIKEOUT_DESCENT'>
<title>STRIKEOUT_DESCENT</title>
<!-- .XS -->
<!-- (SN STRIKEOUT_DESCENT -->
<!-- .XE -->
<para>
<!-- .LP -->
STRIKEOUT_DESCENT is an integer value (of type INT32)
that gives the vertical descent for boxing or voiding glyphs in this font.
If the current position is at [X,Y] and the string extent is EXTENT,
the upper-left corner of the strikeout box is at [X, Y - STRIKEOUT_ASCENT]
and the lower-right corner of the box is at
[X + EXTENT, Y + STRIKEOUT_DESCENT].
</para>
<para>
<!-- .LP -->
STRIKEOUT_DESCENT can be approximated if not provided as a font property,
according to the following algorithm:
</para>
<literallayout class="monospaced">
if (STRIKEOUT_DESCENT undefined)
STRIKEOUT_DESCENT = maximum descent
</literallayout>
<para>
where <emphasis remap='I'>maximum descent</emphasis> is the maximum
descent (below the baseline)
in pixels of any glyph in the font.
</para>
</sect2>
<sect2 id='ITALIC_ANGLE'>
<title>ITALIC_ANGLE</title>
<!-- .XS -->
<!-- (SN ITALIC_ANGLE -->
<!-- .XE -->
<para>
<!-- .LP -->
ITALIC_ANGLE is an integer value (of type INT32)
that gives the nominal posture angle of the typeface design, in 1/64 degrees,
measured from the glyph origin counterclockwise from the three o'clock position.
</para>
<para>
<!-- .LP -->
ITALIC_ANGLE can be defaulted if not provided as a font property,
according to the following algorithm:
</para>
<literallayout class="monospaced">
if (ITALIC_ANGLE undefined) then
ITALIC_ANGLE = (90 * 64)
</literallayout>
</sect2>
<sect2 id='CAP_HEIGHT'>
<title>CAP_HEIGHT</title>
<!-- .XS -->
<!-- (SN CAP_HEIGHT -->
<!-- .XE -->
<para>
<!-- .LP -->
CAP_HEIGHT is an integer value (of type INT32)
that gives the nominal height of the capital letters contained in the font,
as specified by the FOUNDRY or typeface designer.
</para>
<para>
<!-- .LP -->
Certain clients require CAP_HEIGHT to compute scale factors and
positioning offsets for synthesized glyphs where this
information or designed glyphs are not explicitly provided by the font
(for example, small capitals, superiors, inferiors, and so on).
CAP_HEIGHT is also a critical factor in font matching and substitution.
</para>
<para>
<!-- .LP -->
CAP_HEIGHT can be approximated if not provided as a font property,
according to the following algorithm:
</para>
<literallayout class="monospaced">
if (CAP_HEIGHT undefined) then
if (Latin font) then
CAP_HEIGHT = XCharStruct.ascent[glyph X]
else if (capitals exist) then
CAP_HEIGHT = XCharStruct.ascent[some unaccented capital glyph]
else CAP_HEIGHT undefined
</literallayout>
</sect2>
<sect2 id='X_HEIGHT'>
<title>X_HEIGHT</title>
<!-- .XS -->
<!-- (SN X_HEIGHT -->
<!-- .XE -->
<para>
<!-- .LP -->
X_HEIGHT is an integer value (of type INT32)
that gives the nominal height above the baseline of the lowercase glyphs
contained in the font,
as specified by the FOUNDRY or typeface designer.
</para>
<para>
<!-- .LP -->
As with CAP_HEIGHT,
X_HEIGHT is required by certain clients to compute scale factors
for synthesized small capitals where this information is not explicitly
provided by the font resource.
X_HEIGHT is a critical factor in font matching and substitution.
</para>
<para>
<!-- .LP -->
X_HEIGHT can be approximated if not provided as a font property,
according to the following algorithm:
</para>
<literallayout class="monospaced">
if (X_HEIGHT undefined) then
if (Latin font) then
X_HEIGHT = XCharStruct.ascent[glyph x]
else if (lowercase exists) then
X_HEIGHT = XCharStruct.ascent[some unaccented lc glyph without an ascender]
else X_HEIGHT undefined
</literallayout>
</sect2>
<sect2 id='RELATIVE_SETWIDTH'>
<title>RELATIVE_SETWIDTH</title>
<!-- .XS -->
<!-- (SN RELATIVE_SETWIDTH -->
<!-- .XE -->
<para>
<!-- .LP -->
RELATIVE_SETWIDTH is an unsigned integer value (of type CARD32)
that gives the coded proportionate width of the font,
relative to all known fonts of the same typeface family,
according to the type designer's or FOUNDRY's judgment.
</para>
<para>
<!-- .LP -->
RELATIVE_SETWIDTH ranges from 10 to 90 or is 0 if undefined or unknown.
The following reference values are defined:
</para>
<informaltable frame="topbot">
<tgroup cols='3' align='left' colsep='0' rowsep='0'>
<colspec colname='c1' colwidth='1.0*'/>
<colspec colname='c2' colwidth='3.0*'/>
<colspec colname='c3' colwidth='5.0*'/>
<thead>
<row rowsep='1'>
<entry>Code</entry>
<entry>English Translation</entry>
<entry>Description</entry>
</row>
</thead>
<tbody>
<row>
<entry>0</entry>
<entry>Undefined</entry>
<entry>Undefined or unknown</entry>
</row>
<row>
<entry>10</entry>
<entry>UltraCondensed</entry>
<entry>The lowest ratio of average width to height</entry>
</row>
<row>
<entry>20</entry>
<entry>ExtraCondensed</entry>
</row>
<row>
<entry>30</entry>
<entry>Condensed</entry>
<entry>Condensed, Narrow, Compressed, ...</entry>
</row>
<row>
<entry>40</entry>
<entry>SemiCondensed</entry>
</row>
<row>
<entry>50</entry>
<entry>Medium</entry>
<entry>Medium, Normal, Regular, ...</entry>
</row>
<row>
<entry>60</entry>
<entry>SemiExpanded</entry>
<entry>SemiExpanded, DemiExpanded, ...</entry>
</row>
<row>
<entry>70</entry>
<entry>Expanded</entry>
</row>
<row>
<entry>80</entry>
<entry>ExtraExpanded</entry>
<entry>ExtraExpanded, Wide, ...</entry>
</row>
<row>
<entry>90</entry>
<entry>UltraExpanded</entry>
<entry>The highest ratio of average width to height</entry>
</row>
</tbody>
</tgroup>
</informaltable>
<para>
<!-- .LP -->
RELATIVE_SETWIDTH can be defaulted if not provided as a font property,
according to the following algorithm:
</para>
<literallayout class="monospaced">
if (RELATIVE_SETWIDTH undefined) then
RELATIVE_SETWIDTH = 50
</literallayout>
<para>
<!-- .LP -->
For polymorphic fonts, RELATIVE_SETWIDTH is not necessarily a
linear function of the font's setwidth axis.
</para>
<para>
<!-- .LP -->
X clients that want to obtain a calculated proportionate width of the
font (that is, a font-independent way of identifying the proportionate
width across all fonts and all font vendors) can use the following algorithm:
</para>
<literallayout class="monospaced">
SETWIDTH = AVG_CAPITAL_WIDTH / (CAP_HEIGHT * 10)
</literallayout>
<para>
<!-- .LP -->
where SETWIDTH is a real number with zero being the narrowest
calculated setwidth.
</para>
</sect2>
<sect2 id='RELATIVE_WEIGHT'>
<title>RELATIVE_WEIGHT</title>
<!-- .XS -->
<!-- (SN RELATIVE_WEIGHT -->
<!-- .XE -->
<para>
<!-- .LP -->
RELATIVE_WEIGHT is an unsigned integer value (of type CARD32)
that gives the coded weight of the font,
relative to all known fonts of the same typeface family,
according to the type designer's or FOUNDRY's judgment.
</para>
<para>
<!-- .LP -->
RELATIVE_WEIGHT ranges from 10 to 90 or is 0 if undefined or unknown.
The following reference values are defined:
</para>
<informaltable frame="topbot">
<tgroup cols='3' align='left' colsep='0' rowsep='0'>
<colspec colname='c1' colwidth='1.0*'/>
<colspec colname='c2' colwidth='3.0*'/>
<colspec colname='c3' colwidth='6.0*'/>
<thead>
<row rowsep='1'>
<entry>Code</entry>
<entry>English Translation</entry>
<entry>Description</entry>
</row>
</thead>
<tbody>
<row>
<entry>0</entry>
<entry>Undefined</entry>
<entry>Undefined or unknown</entry>
</row>
<row>
<entry>10</entry>
<entry>UltraLight</entry>
<entry>The lowest ratio of stem width to height</entry>
</row>
<row>
<entry>20</entry>
<entry>ExtraLight</entry>
</row>
<row>
<entry>30</entry>
<entry>Light</entry>
</row>
<row>
<entry>40</entry>
<entry>SemiLight</entry>
<entry>SemiLight, Book, ...</entry>
</row>
<row>
<entry>50</entry>
<entry>Medium</entry>
<entry>Medium, Normal, Regular,...</entry>
</row>
<row>
<entry>60</entry>
<entry>SemiBold</entry>
<entry>SemiBold, DemiBold, ...</entry>
</row>
<row>
<entry>70</entry>
<entry>Bold</entry>
</row>
<row>
<entry>80</entry>
<entry>ExtraBold</entry>
<entry>ExtraBold, Heavy, ...</entry>
</row>
<row>
<entry>90</entry>
<entry>UltraBold</entry>
<entry>
UltraBold, Black, ..., the highest ratio of stem width to height
</entry>
</row>
</tbody>
</tgroup>
</informaltable>
<para>
<!-- .LP -->
RELATIVE_WEIGHT can be defaulted if not provided as a font property,
according to the following algorithm:
</para>
<literallayout class="monospaced">
if (RELATIVE_WEIGHT undefined) then
RELATIVE_WEIGHT = 50
</literallayout>
<para>
<!-- .LP -->
For polymorphic fonts, RELATIVE_WEIGHT is not necessarily a
linear function of the font's weight axis.
</para>
</sect2>
<sect2 id='WEIGHT'>
<title>WEIGHT</title>
<!-- .XS -->
<!-- (SN WEIGHT -->
<!-- .XE -->
<para>
<!-- .LP -->
Calculated WEIGHT is an unsigned integer value (of type CARD32)
that gives the calculated weight of the font,
computed as the ratio of capital stem width to CAP_HEIGHT,
in the range 0 to 1000, where 0 is the lightest weight.
</para>
<para>
<!-- .LP -->
WEIGHT can be calculated if not supplied as a font property,
according to the following algorithm:
</para>
<literallayout class="monospaced">
CapStemWidth = average width of the stems of capitals
if (WEIGHT undefined) then
WEIGHT = ROUND ((CapStemWidth * 1000) / CAP_HEIGHT)
</literallayout>
<para>
<!-- .LP -->
A calculated value for weight is necessary when matching fonts from
different families because both the RELATIVE_WEIGHT and the WEIGHT_NAME are
assigned by the typeface supplier, according to its tradition and practice,
and therefore, are somewhat subjective.
Calculated WEIGHT provides a font-independent way of identifying
the weight across all fonts and all font vendors.
</para>
</sect2>
<sect2 id='RESOLUTION'>
<title>RESOLUTION</title>
<!-- .XS -->
<!-- (SN RESOLUTION -->
<!-- .XE -->
<para>
<!-- .LP -->
RESOLUTION is an integer value (of type INT32)
that gives the resolution for which this font was created,
measured in 1/100 pixels per point.
</para>
<note><para>
<!-- .NT Note -->
As independent horizontal and vertical design resolution components
are required to accommodate displays with nonsquare aspect ratios,
the use of this font property has been deprecated,
and independent RESOLUTION_X and RESOLUTION_Y font name fields/properties
have been defined (see sections 3.1.2.9 and 3.1.2.10).
X clients are encouraged to discontinue use of the RESOLUTION property
and are encouraged to use the appropriate X,Y resolution properties,
as required.
<!-- .NE \" Note End -->
</para></note>
</sect2>
<sect2 id='Font_support'>
<title>FONT</title>
<!-- .XS -->
<!-- (SN FONT -->
<!-- .XE -->
<para>
<!-- .LP -->
FONT is a string (of type ATOM) that gives the full XLFD name of the
font-that is, the value can be used to open another
instance of the same font.
</para>
<para>
<!-- .LP -->
If not provided, the FONT property cannot be calculated.
</para>
</sect2>
<sect2 id='FACE_NAME'>
<title>FACE_NAME</title>
<!-- .XS -->
<!-- (SN FACE_NAME -->
<!-- .XE -->
<para>
<!-- .LP -->
FACE_NAME is a human-understandable string (of type ATOM)
that gives the full device-independent typeface name,
including the owner, weight, slant, set, and so on
but not the resolution, size, and so on.
This property may be used as feedback during font selection.
</para>
<para>
<!-- .LP -->
FACE_NAME cannot be calculated or approximated if not provided as a font
property.
</para>
</sect2>
<sect2 id='FULL_NAME'>
<title>FULL_NAME</title>
<!-- .XS -->
<!-- (SN FULL_NAME -->
<!-- .XE -->
<para>
<!-- .LP -->
FULL_NAME is the same as FACE_NAME.
Its use is deprecated, but it is found on some old fonts.
</para>
</sect2>
<sect2 id='COPYRIGHT'>
<title>COPYRIGHT</title>
<!-- .XS -->
<!-- (SN COPYRIGHT -->
<!-- .XE -->
<para>
<!-- .LP -->
COPYRIGHT is a human-understandable string (of type ATOM)
that gives the copyright information of the legal owner
of the digital font data.
</para>
<para>
<!-- .LP -->
This information is a required component of a font
but is independent of the particular format used to represent it
(that is, it cannot be captured as a comment that could later
be thrown away for efficiency reasons).
</para>
<para>
<!-- .LP -->
COPYRIGHT cannot be calculated or approximated if not provided as a font
property.
</para>
</sect2>
<sect2 id='NOTICE'>
<title>NOTICE</title>
<!-- .XS -->
<!-- (SN NOTICE -->
<!-- .XE -->
<para>
<!-- .LP -->
NOTICE is a human-understandable string (of type ATOM)
that gives the copyright information of the legal owner of the font design
or, if not applicable, the trademark information for the typeface FAMILY_NAME.
</para>
<para>
<!-- .LP -->
Typeface design and trademark protection laws vary from country to country,
the USA having no design copyright protection currently
while various countries in Europe offer both design and typeface family name
trademark protection.
As with COPYRIGHT,
this information is a required component of a font
but is independent of the particular format used to represent it.
</para>
<para>
<!-- .LP -->
NOTICE cannot be calculated or approximated if not provided as
a font property.
</para>
</sect2>
<sect2 id='DESTINATION'>
<title>DESTINATION</title>
<!-- .XS -->
<!-- (SN DESTINATION -->
<!-- .XE -->
<para>
<!-- .LP -->
DESTINATION is an unsigned integer code (of type CARD32)
that gives the font design destination,
that is, whether it was designed as a screen proofing font to match
printer font glyph widths (WYSIWYG), as an optimal video font (possibly with
corresponding printer font) for extended screen viewing (video text), and so on.
</para>
<para>
<!-- .LP -->
The font design considerations are very different,
and at current display resolutions,
the readability and legibility of these two kinds of screen fonts
are very different.
DESTINATION allows publishing clients that use X to model the printed page
and video text clients, such as on-line documentation browsers,
to query for X screen fonts that suit their particular requirements.
</para>
<para>
<!-- .LP -->
The encoding is as follows:
</para>
<informaltable frame="topbot">
<?dbfo keep-together="always" ?>
<tgroup cols='3' align='left' colsep='0' rowsep='0'>
<colspec colname='c1' colwidth='1.0*'/>
<colspec colname='c2' colwidth='3.0*'/>
<colspec colname='c3' colwidth='6.0*'/>
<thead>
<row rowsep='1'>
<entry>Code</entry>
<entry>English Translation</entry>
<entry>Description</entry>
</row>
</thead>
<tbody>
<row>
<entry>0</entry>
<entry>WYSIWYG</entry>
<entry>
The font is optimized to match the typographic design and metrics of an
equivalent printer font.
</entry>
</row>
<row>
<entry>1</entry>
<entry>Video text</entry>
<entry>
The font is optimized for screen legibility and readability.
</entry>
</row>
</tbody>
</tgroup>
</informaltable>
</sect2>
<sect2 id='FONT_TYPE'>
<title>FONT_TYPE</title>
<!-- .XS -->
<!-- (SN FONT_TYPE -->
<!-- .XE -->
<para>
<!-- .LP -->
FONT_TYPE is a human-understandable string (of type ATOM) that
describes the format of
the font data as they are read from permanent storage by the current font source.
It is a static attribute of the source data. It can be used
by clients to select a type of bitmap or outline font
without regard to the rasterizer used to render the font.
</para>
<para>
<!-- .LP -->
Predefined values are as follows:
</para>
<informaltable frame="topbot">
<?dbfo keep-together="always" ?>
<tgroup cols='2' align='left' colsep='0' rowsep='0'>
<colspec colname='c1' colwidth='1.0*'/>
<colspec colname='c2' colwidth='5.0*'/>
<thead>
<row rowsep='1'>
<entry>Value</entry>
<entry>When applicable</entry>
</row>
</thead>
<tbody>
<row>
<entry>"Bitmap"</entry>
<entry>
Hand-tuned bitmap fonts. Some attempt has been made to optimize the visual
appearance of the font for the requested size and resolution.
</entry>
</row>
<row>
<entry>"Prebuilt"</entry>
<entry>
All bitmap format fonts that cannot be described as "Bitmap", that is,
handtuned.
For example, a bitmap format font that was generated mechanically using
a scalable font rasterizer would be considered "Prebuilt", not "Bitmap".
</entry>
</row>
<row>
<entry>"Type 1"</entry>
<entry>Any Type 1 font.</entry>
</row>
<row>
<entry>"TrueType"</entry>
<entry>Any TrueType font.</entry>
</row>
<row>
<entry>"Speedo"</entry>
<entry>Any Speedo font.</entry>
</row>
<row>
<entry>"F3"</entry>
<entry>Any F3 font.</entry>
</row>
</tbody>
</tgroup>
</informaltable>
<para>
Other values may be registered with the X Consortium.
</para>
</sect2>
<sect2 id='FONT_VERSION'>
<title>FONT_VERSION</title>
<!-- .XS -->
<!-- (SN FONT_VERSION -->
<!-- .XE -->
<para>
<!-- .LP -->
FONT_VERSION is a human-understandable string (of type ATOM)
that describes the formal or informal version of the font.
<function>None</function> is a valid value.
</para>
</sect2>
<sect2 id='RASTERIZER_NAME'>
<title>RASTERIZER_NAME</title>
<!-- .XS -->
<!-- (SN RASTERIZER_NAME -->
<!-- .XE -->
<para>
<!-- .LP -->
RASTERIZER_NAME is a human-understandable string (of type ATOM)
that is the specific name of the
rasterizer that has performed some rasterization operation
(such as scaling from outlines) on this font.
</para>
<para>
<!-- .LP -->
To define a RASTERIZER_NAME, the following format is
recommended:
</para>
<!-- .SM -->
<informaltable frame="none">
<?dbfo keep-together="always" ?>
<tgroup cols='2' align='left' colsep='0' rowsep='0'>
<colspec colname='c1' colwidth='1.0*'/>
<colspec colname='c2' colwidth='3.0*'/>
<tbody>
<row>
<entry>RasterizerName ::=</entry>
<entry>OrganizationId Space Rasterizer</entry>
</row>
<row>
<entry>OrganizationId ::=</entry>
<entry>
STRING8—the X Registry ORGANIZATION name of the rasterizer
implementor or maintainer.
</entry>
</row>
<row>
<entry>Rasterizer ::=</entry>
<entry>
the case-sensitive, human-understandable product name of the rasterizer.
Words within this name should be separated by a single SPACE.
</entry>
</row>
<row>
<entry>Space ::=</entry>
<entry>OCTET−" " (SPACE)</entry>
</row>
</tbody>
</tgroup>
</informaltable>
<para>
<!-- .LP -->
Examples:
</para>
<literallayout class="monospaced">
X Consortium Bit Scaler
X Consortium Type 1 Rasterizer
X Consortium Speedo Rasterizer
Adobe Type Manager
Sun TypeScaler
</literallayout>
<para>
<!-- .LP -->
If RASTERIZER_NAME is not defined, or is <function>None</function>, no
rasterization operation has been applied to the FONT_TYPE.
</para>
</sect2>
<sect2 id='RASTERIZER_VERSION'>
<title>RASTERIZER_VERSION</title>
<!-- .XS -->
<!-- (SN RASTERIZER_VERSION -->
<!-- .XE -->
<para>
<!-- .LP -->
RASTERIZER_VERSION is a human-understandable string (of type
ATOM) that represents the formal or informal version of a
font rasterizer.
The RASTERIZER_VERSION should match the corresponding
product version number known to users, when applicable.
</para>
</sect2>
<sect2 id='RAW_ASCENT'>
<title>RAW_ASCENT</title>
<!-- .XS -->
<!-- (SN RAW_ASCENT -->
<!-- .XE -->
<para>
<!-- .LP -->
For a font with a transformation matrix, RAW_ASCENT is the font ascent
in 1000 pixel metrics
(see <xref linkend='Metrics_and_Font_Properties' xrefstyle='select: title'/>).
</para>
</sect2>
<sect2 id='RAW_DESCENT'>
<title>RAW_DESCENT</title>
<!-- .XS -->
<!-- (SN RAW_DESCENT -->
<!-- .XE -->
<para>
<!-- .LP -->
For a font with a transformation matrix, RAW_DESCENT is the font
descent in 1000 pixel metrics
(see <xref linkend='Metrics_and_Font_Properties' xrefstyle='select: title'/>).
</para>
</sect2>
<sect2 id='RAW_'>
<title>RAW_*</title>
<!-- .XS -->
<!-- (SN RAW_* -->
<!-- .XE -->
<para>
<!-- .LP -->
For a font with a transformation matrix,
all font properties that represent horizontal or vertical sizes or
displacements will be accompanied by a new property, named as the
original except prefixed with "RAW_", that is computed as
described in <xref linkend='Metrics_and_Font_Properties' xrefstyle='select: title' />.
</para>
</sect2>
<sect2 id='AXIS_NAMES'>
<title>AXIS_NAMES</title>
<!-- .XS -->
<!-- (SN AXIS_NAMES -->
<!-- .XE -->
<para>
<!-- .LP -->
AXIS_NAMES is a list of all the
names of the axes for a polymorphic font, separated by a null (0) byte.
These names are suitable for presentation in a user interface
(see section 6).
</para>
</sect2>
<sect2 id='AXIS_LIMITS'>
<title>AXIS_LIMITS</title>
<!-- .XS -->
<!-- (SN AXIS_LIMITS -->
<!-- .XE -->
<para>
<!-- .LP -->
AXIS_LIMITS is a list of integers, two for each axis,
giving the minimum and maximum allowable values for that axis of a
polymorphic font
(see <xref linkend='Polymorphic_Fonts' xrefstyle='select: title'/>).
</para>
</sect2>
<sect2 id='AXIS_TYPES'>
<title>AXIS_TYPES</title>
<!-- .XS -->
<!-- (SN AXIS_TYPES -->
<!-- .XE -->
<para>
<!-- .LP -->
AXIS_TYPES is like AXIS_NAMES,
but can be registered as having specific semantics
(see section 6).
</para>
</sect2>
</sect1>
<sect1 id='Built_in_Font_Property_Atoms'>
<title>Built-in Font Property Atoms</title>
<!-- .XS -->
<!-- (SN Built-in Font Property Atoms -->
<!-- .XE -->
<para>
<!-- .LP -->
The following font property atom definitions were predefined in the initial
version of the core protocol:
</para>
<informaltable frame="topbot">
<?dbfo keep-together="auto" ?>
<tgroup cols='2' align='left' colsep='0' rowsep='0'>
<colspec colname='c1' colwidth='1.0*'/>
<colspec colname='c2' colwidth='2.0*'/>
<thead>
<row rowsep='1'>
<entry>Font Property/Atom Name</entry>
<entry>Property Type</entry>
</row>
</thead>
<tbody>
<row>
<entry>MIN_SPACE</entry>
<entry>INT32</entry>
</row>
<row>
<entry>NORM_SPACE</entry>
<entry>INT32</entry>
</row>
<row>
<entry>MAX_SPACE</entry>
<entry>INT32</entry>
</row>
<row>
<entry>END_SPACE</entry>
<entry>INT32</entry>
</row>
<row>
<entry>SUPERSCRIPT_X</entry>
<entry>INT32</entry>
</row>
<row>
<entry>SUPERSCRIPT_Y</entry>
<entry>INT32</entry>
</row>
<row>
<entry>SUBSCRIPT_X</entry>
<entry>INT32</entry>
</row>
<row>
<entry>SUBSCRIPT_Y</entry>
<entry>INT32</entry>
</row>
<row>
<entry>UNDERLINE_POSITION</entry>
<entry>INT32</entry>
</row>
<row>
<entry>UNDERLINE_THICKNESS</entry>
<entry>INT32</entry>
</row>
<row>
<entry>STRIKEOUT_ASCENT</entry>
<entry>INT32</entry>
</row>
<row>
<entry>STRIKEOUT_DESCENT</entry>
<entry>INT32</entry>
</row>
<row>
<entry>FONT_ASCENT</entry>
<entry>INT32</entry>
</row>
<row>
<entry>FONT_DESCENT</entry>
<entry>INT32</entry>
</row>
<row>
<entry>ITALIC_ANGLE</entry>
<entry>INT32</entry>
</row>
<row>
<entry>X_HEIGHT</entry>
<entry>INT32</entry>
</row>
<row>
<entry>QUAD_WIDTH</entry>
<entry>INT32 −<superscript>deprecated</superscript></entry>
</row>
<row>
<entry>WEIGHT</entry>
<entry>CARD32</entry>
</row>
<row>
<entry>POINT_SIZE</entry>
<entry>INT32</entry>
</row>
<row>
<entry>RESOLUTION</entry>
<entry>CARD32 −<superscript>deprecated</superscript></entry>
</row>
<row>
<entry>COPYRIGHT</entry>
<entry>ATOM</entry>
</row>
<row>
<entry>FULL_NAME</entry>
<entry>ATOM −<superscript>deprecated</superscript></entry>
</row>
<row>
<entry>FAMILY_NAME</entry>
<entry>ATOM</entry>
</row>
<row>
<entry>DEFAULT_CHAR</entry>
<entry>CARD32</entry>
</row>
</tbody>
</tgroup>
</informaltable>
<!-- .br -->
</sect1>
</chapter>
<chapter id='Matrix_Transformations'>
<title>Matrix Transformations</title>
<!-- .XS -->
<!-- (SN Matrix Transformations -->
<!-- .XE -->
<para>
<!-- .LP -->
An XLFD name presented to the server can have the POINT_SIZE or PIXEL_SIZE
field begin with the character "[". If the first character of the field
is "[", the character must be followed with ASCII representations of
four floating point numbers and a trailing "]", with white space
separating the numbers and optional white space separating the numbers
from the "[" and "]" characters. Numbers use standard floating point
syntax but use the character "~" to represent a minus sign in the mantissa
or exponent.
</para>
<para>
<!-- .LP -->
The BNF for a matrix transformation string is as follows:
</para>
<informaltable frame="none">
<tgroup cols='2' align='left' colsep='0' rowsep='0'>
<colspec colname='c1' colwidth='1.0*'/>
<colspec colname='c2' colwidth='3.0*'/>
<tbody>
<row>
<entry>MatrixString ::=</entry>
<entry>
LeftBracket OptionalSpace Float Space Float Space
Float Space Float OptionalSpace RightBracket
</entry>
</row>
<row>
<entry>OptionalSpace ::=</entry>
<entry>"" | Space</entry>
</row>
<row>
<entry>Space ::=</entry>
<entry>SpaceChar | SpaceChar Space</entry>
</row>
<row>
<entry>Float ::=</entry>
<entry>Mantissa | Mantissa Exponent</entry>
</row>
<row>
<entry>Mantissa ::=</entry>
<entry>Sign Number | Number</entry>
</row>
<row>
<entry>Sign ::=</entry>
<entry>Plus | Tilde</entry>
</row>
<row>
<entry>Number ::=</entry>
<entry>Integer | Integer Dot Integer | Dot Integer</entry>
</row>
<row>
<entry>Integer ::=</entry>
<entry>Digit | Digit Integer</entry>
</row>
<row>
<entry>Digit ::=</entry>
<entry>
"0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9"
</entry>
</row>
<row>
<entry>Exponent ::=</entry>
<entry>"e" SignedInteger | "E" SignedInteger</entry>
</row>
<row>
<entry>SignedInteger ::=</entry>
<entry>Sign Integer | Integer</entry>
</row>
<row>
<entry>LeftBracket ::=</entry>
<entry>OCTET − "[" (LEFT SQUARE BRACKET)</entry>
</row>
<row>
<entry>RightBracket ::=</entry>
<entry>OCTET − "]" (RIGHT SQUARE BRACKET)</entry>
</row>
<row>
<entry>SpaceChar ::=</entry>
<entry>OCTET − " " (SPACE)</entry>
</row>
<row>
<entry>Tilde ::=</entry>
<entry>OCTET − "˜" (TILDE)</entry>
</row>
<row>
<entry>Plus ::=</entry>
<entry>OCTET − "+" (PLUS)</entry>
</row>
<row>
<entry>Dot ::=</entry>
<entry>OCTET − "." (FULL STOP)</entry>
</row>
</tbody>
</tgroup>
</informaltable>
<para>
<!-- .LP -->
The string "[a b c d]" represents a graphical transformation of the glyphs
in the font by the matrix
</para>
<informaltable frame="none">
<?dbfo keep-together="always" ?>
<tgroup cols='1' align='left' colsep='0' rowsep='0'>
<colspec colname='c1' colwidth='1.0*'/>
<tbody>
<row>
<entry>[ a b 0 ]</entry>
</row>
<row>
<entry>[ c d 0 ]</entry>
</row>
<row>
<entry>[ 0 0 1 ]</entry>
</row>
</tbody>
</tgroup>
</informaltable>
<para>
<!-- .LP -->
All transformations occur around the origin of the glyph. The
relationship between the current scalar values and the matrix
transformation values is that the scalar value "N" in the POINT_SIZE field
produces the same glyphs as the matrix "[N/10 0 0 N/10]" in that field,
and the scalar value "N" in the PIXEL_SIZE field produces the same glyphs
as the matrix "[N*RESOLUTION_X/RESOLUTION_Y 0 0 N]" in that field.
</para>
<para>
<!-- .LP -->
If matrices are specified for both the POINT_SIZE and PIXEL_SIZE, they
must bear the following relationship to each other within an
implementation-specific tolerance:
</para>
<blockquote>
<para>
PIXEL_SIZE_MATRIX = [Sx 0 0 Sy] * POINT_SIZE_MATRIX
</para>
</blockquote>
<para>
where
</para>
<blockquote>
<para>
Sx = RESOLUTION_X / 72.27
</para>
<para>
Sy = RESOLUTION_Y / 72.27
</para>
</blockquote>
<para>
<!-- .LP -->
If either the POINT_SIZE or PIXEL_SIZE field is unspecified (either "0" or
wildcarded), the preceding formulas can be used to compute one from the
other.
</para>
<sect1 id='Metrics_and_Font_Properties'>
<title>Metrics and Font Properties</title>
<!-- .XS -->
<!-- (SN Metrics and Font Properties -->
<!-- .XE -->
<para>
<!-- .LP -->
In this section, the phrase "1000 pixel metrics" means the
metrics that would be obtained if the rasterizer took the base untransformed
design used to generate the transformed font and scaled it linearly to a
height of 1000 pixels, with no rotation component. Note that there may be no
way for the application to actually request this font since the rasterizer
may use different outlines or rasterization techniques at that size from the
ones used to generate the transformed font.
</para>
<para>
<!-- .LP -->
Notes on properties and metrics:
</para>
<para>
<!-- .LP -->
The per-char ink metrics (lbearing, rbearing, ascent, and descent)
represent the ink extent of the transformed glyph around its origin.
</para>
<para>
<!-- .LP -->
The per-char width is the x component of the transformed character width.
</para>
<para>
<!-- .LP -->
The font ascent and descent are the y component of the transformed font
ascent or descent.
</para>
<para>
<!-- .LP -->
The FONT property returns a name reflecting the matrix being
used-that is, the name returned can be used to open another
instance of the same font. The returned name is not necessarily an
exact copy of the requested name. If, for example, the user
requests
</para>
<!-- .br -->
<!-- .ft C -->
<!-- .SM -->
<literallayout class="monospaced">
-misc-fixed-medium-r-normal--0-[2e1 0 0.0 +10.0]-72-72-c-0-iso8859-1
</literallayout>
<!-- .NL -->
<!-- .ft P -->
<!-- .br -->
<para>
the resulting FONT property might be
</para>
<!-- .br -->
<!-- .ft C -->
<!-- .SM -->
<literallayout class="monospaced">
-misc-fixed-medium-r-normal--[19.9 0 0 10]-[20 0 0 10]-72-72-c-0-iso8859-1
</literallayout>
<!-- .NL -->
<!-- .ft P -->
<!-- .br -->
<para>
The FONT property will always include matrices in both the PIXEL_SIZE
and the POINT_SIZE fields.
</para>
<para>
<!-- .LP -->
To allow accurate client positioning of transformed characters, the
attributes field of the XCharInfo contains the width of the character in
1000 pixel metrics. This attributes field should be interpreted as a signed
integer.
</para>
<para>
<!-- .LP -->
There will always be 2 new font properties defined, RAW_ASCENT and
RAW_DESCENT, that hold the ascent and descent in 1000 pixel metrics.
</para>
<para>
<!-- .LP -->
All font properties that represent horizontal widths or displacements
have as their value the x component of the transformed width or
displacement. All font properties that represent vertical heights or
displacements have as their value the y component of the transformed
height or displacement. Each such property will be accompanied by a new
property, named as the original except prefixed with "RAW_", that gives
the value of the width, height, or displacement in 1000 pixel metrics.
</para>
</sect1>
</chapter>
<chapter id='Scalable_Fonts'>
<title>Scalable Fonts</title>
<!-- .XS -->
<!-- (SN Scalable Fonts -->
<!-- .XE -->
<para>
<!-- .LP -->
The XLFD is designed to support scalable fonts. A scalable font is a
font source from which instances of arbitrary size can be derived.
A scalable font source might be one or more outlines
together with zero or more hand-tuned bitmap fonts at specific sizes and
resolutions, or it might be a programmatic description together with
zero or more bitmap fonts, or some other format
(perhaps even just a single bitmap font).
</para>
<para>
<!-- .LP -->
The following definitions are useful for discussing scalable fonts:
</para>
<para>
<!-- .LP -->
<function>Well-formed XLFD pattern</function>
</para>
<itemizedlist>
<listitem>
<para>
<emphasis role="bold">Well-formed XLFD pattern</emphasis>
</para>
<para>
A pattern string containing 14 hyphens, one of which is
the first character of the pattern. Wildcard characters are permitted
in the fields of a well-formed XLFD pattern.
</para>
</listitem>
</itemizedlist>
<itemizedlist>
<listitem>
<para>
<function>Scalable font name</function>
</para>
<para>
A well-formed XLFD pattern containing no wildcards and containing the
digit "0" in the PIXEL_SIZE, POINT_SIZE, and AVERAGE_WIDTH fields.
</para>
</listitem>
</itemizedlist>
<itemizedlist>
<listitem>
<para>
<function>Scalable fields</function>
</para>
<para>
The XLFD fields PIXEL_SIZE, POINT_SIZE, RESOLUTION_X,
RESOLUTION_Y, and AVERAGE_WIDTH.
</para>
</listitem>
</itemizedlist>
<itemizedlist>
<listitem>
<para>
<function>Derived instance</function>
</para>
<para>
The result of replacing the scalable fields of a font name
with values to yield a font name that could actually be
produced from the font source. A scaling engine is
permitted, but not required, to interpret the scalable
fields in font names to support anamorphic scaling.
</para>
</listitem>
</itemizedlist>
<itemizedlist>
<listitem>
<para>
<function>Global list</function>
</para>
<para>
The list of names that would be returned by an X server for a
<function>ListFonts</function>
protocol request on the pattern "*" if there were no protocol
restrictions on the total number of names returned.
</para>
</listitem>
</itemizedlist>
<para>
<!-- .LP -->
The global list consists of font names derived from font sources.
If a single font source can support multiple character sets (specified
in the CHARSET_REGISTRY and CHARSET_ENCODING fields), each such character
set should be used to form a separate font name in the list.
For a nonscalable font source, the simple font name
for each character set is included in the global list.
For a scalable font source, a scalable font name for each character set
is included in the list. In addition to the scalable font name,
specific derived instance names may also be included in the list.
The relative order of derived instances with respect to the scalable
font name is not constrained. Finally, font name aliases may also be included
in the list. The relative order of aliases
with respect to the real font name is not constrained.
</para>
<para>
<!-- .LP -->
The values of the RESOLUTION_X and RESOLUTION_Y fields of a scalable font name
are implementation dependent,
but to maximize backward compatibility, they
should be reasonable nonzero values, for example, a resolution close to that
provided by the screen (in a single-screen server).
Because some existing
applications rely on seeing a collection of point and pixel sizes,
server vendors are strongly encouraged in the near term to
provide a mechanism for including, for each scalable font name,
a set of specific derived instance names. For font sources that contain
a collection of hand-tuned bitmap fonts, including names of these instances
in the global list is recommended and sufficient.
</para>
<para>
<!-- .LP -->
The X protocol request
<function>OpenFont</function>
on a scalable font name returns a font corresponding to an
implementation-dependent derived instance of that font name.
</para>
<para>
<!-- .LP -->
The X protocol request
<function>ListFonts</function>
on a well-formed XLFD pattern returns the following.
Starting with the global list, if the actual pattern argument
has values containing no wildcards in scalable fields,
then substitute each such field into the corresponding
field in each scalable font name in the list. For each resulting font name,
if the remaining scalable fields cannot be replaced with values to produce a
derived instance, remove the font name from the list. Now take the modified
list, and perform a simple pattern match against the pattern argument.
<function>ListFonts</function>
returns the resulting list.
</para>
<para>
For example, given the global list:
</para>
<literallayout class="monospaced">
-Linotype-Times-Bold-I-Normal--0-0-100-100-P-0-ISO8859-1
-Linotype-Times-Bold-R-Normal--0-0-100-100-P-0-ISO8859-1
-Linotype-Times-Medium-I-Normal--0-0-100-100-P-0-ISO8859-1
-Linotype-Times-Medium-R-Normal--0-0-100-100-P-0-ISO8859-1
</literallayout>
<para>
a <function>ListFonts</function> request with the pattern:
</para>
<literallayout class="monospaced">
-*-Times-*-R-Normal--*-120-100-100-P-*-ISO8859-1
</literallayout>
<para>
would return:
</para>
<literallayout class="monospaced">
-Linotype-Times-Bold-R-Normal--0-120-100-100-P-0-ISO8859-1
-Linotype-Times-Medium-R-Normal--0-120-100-100-P-0-ISO8859-1
</literallayout>
<para>
<function>ListFonts</function>
on a pattern containing wildcards that is not a well-formed XLFD
pattern is only required to return the list obtained by performing
a simple pattern match against the global list.
X servers are permitted, but not required,
to use a more sophisticated matching algorithm.
</para>
</chapter>
<chapter id='Polymorphic_Fonts'>
<title>Polymorphic Fonts</title>
<!-- .XS -->
<!-- (SN Polymorphic Fonts -->
<!-- .XE -->
<para>
<!-- .LP -->
Fonts that can be varied in ways other than size or resolution are called
<emphasis remap='I'>polymorphic fonts.</emphasis> Multiple Master Type 1 font programs are one type of
a polymorphic font. Current examples of axes along which the fonts can be
varied are width, weight, and optical size; others might include formality
or x-height.
</para>
<para>
To support polymorphic fonts, special values indicating variability are
defined for the following XLFD fields:
</para>
<blockquote>
<para>
<!-- .nf -->
WEIGHT_NAME
</para>
<para>
SLANT
</para>
<para>
SETWIDTH_NAME
</para>
<para>
ADD_STYLE_NAME
</para>
</blockquote>
<para>
<!-- .LP -->
The string "0" is the special polymorphic value. In the
WEIGHT_NAME, SLANT, or SETWIDTH_NAME field, "0" must be the
entire field.
There may be multiple polymorphic values
in the ADD_STYLE_NAME field.
They are surrounded by "[" and "]" and separated by a Space,
as "[0\00]". The polymorphic values may coexist with
other data in the field.
It is recommended that the polymorphic values
be at the end of the ADD_STYLE_NAME field.
</para>
<para>
<!-- .LP -->
The font-matching algorithms for a font with polymorphic fields are
identical to the matching algorithms for a font with scalable fields.
</para>
<para>
<!-- .LP -->
There are three new font properties to describe the axes of variation,
AXIS_NAMES, AXIS_LIMITS, and AXIS_TYPES. AXIS_NAMES is a list of all the
names of the axes for the font, separated by a null (0) byte.
These names are suitable for presentation in
a user interface. AXIS_LIMITS is a list of integers, two for each axis,
giving the minimum and maximum allowable values for that axis.
AXIS_TYPES is like AXIS_NAMES,
but can be registered as having specific semantics.
</para>
<para>
<!-- .LP -->
The axes are listed in the properties in the same order as they
appear in the font name. They are matched with font name fields by
looking for the special polymorphic values in the font name.
</para>
<para>
<!-- .LP -->
Examples:
</para>
<para>
<!-- .LP -->
The Adobe Myriad MM font program has width and weight axes. Weight can
vary from 215 to 830, and width from 300 to 700.
</para>
<literallayout class="monospaced">
Name:
-Adobe-Myriad MM-0-R-0--0-0-0-0-P-0-ISO8859-1
AXIS_NAMES:
Weight, Width
AXIS_LIMITS:
215, 830, 300, 700
AXIS_TYPES:
Adobe-Weight, Adobe-Width
Sample derived instance:
-Adobe-Myriad MM-412-R-575--*-120-100-100-P-*-ISO8859-1
</literallayout>
<para>
The Adobe Minion MM Italic font program has width, weight, and optical
size axes.
</para>
<literallayout class="monospaced">
Name:
-Adobe-Minion MM-0-I-0-[0]-0-0-0-0-P-0-ISO8859-1
AXIS_NAMES:
Weight, Width, Optical size
AXIS_LIMITS:
345, 620, 450, 600, 6, 72
AXIS_TYPES:
Adobe-Weight, Adobe-Width, Adobe-OpticalSize
Sample derived instance:
-Adobe-Minion MM-550-I-480-[18]-*-180-100-100-P-*-ISO8859-1
</literallayout>
<para>
The Adobe Minion MM Swash Italic font program has the same axes and
values. This shows how "[0]" in the ADD_STYLE_NAME field can
coexist with other words.
</para>
<literallayout class="monospaced">
Name:
-Adobe-Minion MM-0-I-0-Swash[0]-0-0-0-0-P-0-ISO8859-1
AXIS_NAMES:
Weight, Width, Optical size
AXIS_LIMITS:
345, 620, 450, 600, 6, 72
AXIS_TYPES:
Adobe-Weight, Adobe-Width, Adobe-OpticalSize
Sample derived instance:
-Adobe-Minion MM-550-I-480-Swash[18]-*-180-100-100-P-*-ISO8859-1
</literallayout>
<para>
The XYZ Abc font, a hypothetical font, has optical size and x-height axes.
This shows how there can be more than one polymorphic value in the
ADD_STYLE_NAME field.
</para>
<literallayout class="monospaced">
Name:
-XYZ-Abc-Medium-R-Normal-[0 0]-0-0-0-0-P-0-ISO8859-1
AXIS_NAMES:
Optical size, X-height
AXIS_LIMITS:
6, 72, 400, 600
AXIS_TYPES:
XYZ-OpticalSize, XYZ-Xheight
Sample derived instance:
-XYZ-Abc-Medium-R-Normal-[14 510]-*-140-100-100-P-*-ISO8859-1
</literallayout>
<para>
If an axis allows negative values, a client requests a negative value by
using "~" (TILDE) as a minus sign.
</para>
<para>
Axis types can be registered with the X Consortium, along with their
semantics.
</para>
<para>
If a font name that contains the polymorphic value or a wildcard in a
polymorphic field is presented to a font source, the font source is free
to substitute any value that is convenient. However, font sources should
try to use a value that would be considered
<emphasis remap='I'>normal</emphasis> or
<emphasis remap='I'>medium</emphasis> for the
particular font. For example, if an optical size variable is unresolved,
the font source should provide a value appropriate to the size of the
font.
</para>
<para>
The result of specifying an out-of-range value for a polymorphic field is
undefined. The font source may treat this as a
<function>BadName</function> error, treat the
value as if it were the closest legal value, or extrapolate to try to
accommodate the value.
</para>
</chapter>
<chapter id='Affected_Elements_of_Xlib_and_the_X_Protocol'>
<title>Affected Elements of Xlib and the X Protocol</title>
<!-- .XS -->
<!-- (SN Affected Elements of Xlib and the X Protocol -->
<!-- .XE -->
<para>
<!-- .LP -->
The following X protocol requests must support the XLFD conventions:
</para>
<itemizedlist>
<listitem>
<para>
<function>OpenFont</function>
- for the name argument
</para>
</listitem>
<listitem>
<para>
<function>ListFonts</function>
- for the pattern argument
</para>
</listitem>
<listitem>
<para>
<function>ListFontsWithInfo</function>
- for the pattern argument
</para>
</listitem>
</itemizedlist>
<para>
<!-- .LP -->
In addition,
the following Xlib functions must support the XLFD conventions:
</para>
<itemizedlist>
<listitem>
<para>
<olink targetdoc='libX11' targetptr='XLoadFont'><function>XLoadFont</function></olink>
- for the name argument
</para>
</listitem>
<listitem>
<para>
<olink targetdoc='libX11' targetptr='XListFontsWithInfo'><function>XListFontsWithInfo</function></olink>
- for the pattern argument
</para>
</listitem>
<listitem>
<para>
<olink targetdoc='libX11' targetptr='XLoadQueryFont'><function>XLoadQueryFont</function></olink>
- for the name argument
</para>
</listitem>
<listitem>
<para>
<olink targetdoc='libX11' targetptr='XListFonts'><function>XListFonts</function></olink>
- for the pattern argument
</para>
</listitem>
</itemizedlist>
</chapter>
<chapter id='BDF_Conformance'>
<title>BDF Conformance</title>
<!-- .XS -->
<!-- (SN BDF Conformance -->
<!-- .XE -->
<para>
<!-- .LP -->
The bitmap font distribution and interchange format adopted by the
X Consortium (BDF V2.1) provides a general mechanism for identifying the
font name of an X font and a variable list of font properties,
but it does not mandate the syntax or semantics of the font name
or the semantics of the font properties that might be provided in a BDF font.
This section identifies the requirements for BDF fonts that conform to XLFD.
</para>
<sect1 id='XLFD_Conformance_Requirements'>
<title>XLFD Conformance Requirements</title>
<!-- .XS -->
<!-- (SN XLFD Conformance Requirements -->
<!-- .XE -->
<para>
<!-- .LP -->
A BDF font conforms to the XLFD specification if and only if the
following conditions are satisfied:
</para>
<itemizedlist>
<listitem>
<para>
The value for the BDF item <function>FONT</function> conforms to the syntax
and semantic definition of a XLFD
<function>FontName</function>
string.
</para>
</listitem>
<listitem>
<para>
The
<function>FontName</function>
begins with the X
<function>FontNameRegistry</function>
prefix: "-".
</para>
</listitem>
<listitem>
<para>
All XLFD
<function>FontName</function>
fields are defined.
</para>
</listitem>
<listitem>
<para>
Any FontProperties provided conform in name and semantics to the XLFD
<function>FontProperty</function>
definitions.
</para>
</listitem>
</itemizedlist>
<para>
<!-- .LP -->
A simple method of testing for conformance would entail verifying that the
<function>FontNameRegistry</function>
prefix is the string "-",
that the number of field delimiters in the string and coded field values
are valid,
and that each font property name either matches a standard XLFD property name
or follows the definition of a private property.
</para>
</sect1>
<sect1 id='FONT_ASCENT_FONT_DESCENT_and_DEFAULT_CHAR'>
<title>FONT_ASCENT, FONT_DESCENT, and DEFAULT_CHAR</title>
<!-- .XS -->
<!-- (SN FONT_ASCENT, FONT_DESCENT, and DEFAULT_CHAR -->
<!-- .XE -->
<para>
<!-- .LP -->
FONT_ASCENT, FONT_DESCENT, and DEFAULT_CHAR are provided in the BDF
specification as properties that are moved to the
<function>XFontStruct</function>
by the BDF font compiler in generating the X server-specific
binary font encoding.
If present,
these properties shall comply with the following semantic definitions.
</para>
<sect2 id='FONT_ASCENT'>
<title>FONT_ASCENT</title>
<!-- .XS -->
<!-- (SN FONT_ASCENT -->
<!-- .XE -->
<para>
<!-- .LP -->
FONT_ASCENT is an integer value (of type INT32)
that gives the recommended typographic ascent above the baseline
for determining interline spacing.
Specific glyphs of the font may extend beyond this.
If the current position point for line <emphasis remap='I'>n</emphasis> is at [X,Y],
then the origin of the next line <emphasis remap='I'>m = n + 1</emphasis>
(allowing for a possible font change) is
[X, Y + FONT_DESCENTn + FONT_ASCENTm].
</para>
<para>
<!-- .LP -->
FONT_ASCENT can be approximated if not provided as a font property,
according to the following algorithm:
</para>
<literallayout class="monospaced">
if (FONT_ASCENT undefined) then
FONT_ASCENT = maximum ascent
</literallayout>
<para>
where maximum ascent is the maximum ascent (above the baseline)
in pixels of any glyph in the font.
</para>
</sect2>
<sect2 id='FONT_DESCENT'>
<title>FONT_DESCENT</title>
<!-- .XS -->
<!-- (SN FONT_DESCENT -->
<!-- .XE -->
<para>
<!-- .LP -->
FONT_DESCENT is an integer value (of type INT32)
that gives the recommended typographic descent below the baseline
for determining interline spacing.
Specific glyphs of the font may extend beyond this.
If the current position point for line
<emphasis remap='I'>n</emphasis> is at [X,Y],
then the origin of the next line <emphasis remap='I'>m = n+1</emphasis>
(allowing for a possible font change) is
[X, Y + FONT_DESCENTn + FONT_ASCENTm].
</para>
<para>
The logical extent of the font is inclusive between the Y-coordinate values:
Y - FONT_ASCENT and Y + FONT_DESCENT + 1.
</para>
<para>
FONT_DESCENT can be approximated if not provided as a font property,
according to the following algorithm:
</para>
<literallayout class="monospaced">
if (FONT_DESCENT undefined) then
FONT_DESCENT = maximum descent
</literallayout>
<para>
where maximum descent is the maximum descent (below the baseline)
in pixels of any glyph in the font.
</para>
</sect2>
<sect2 id='DEFAULT_CHAR'>
<title>DEFAULT_CHAR</title>
<!-- .XS -->
<!-- (SN DEFAULT_CHAR -->
<!-- .XE -->
<para>
<!-- .LP -->
The DEFAULT_CHAR is an unsigned integer value (of type CARD32)
that specifies the index
of the default character to be used by the X server when an attempt
is made to display an undefined or nonexistent character in the font.
(For a font using a 2-byte matrix format,
the index bytes are encoded in the integer as byte1 * 65536 + byte2.)
If the DEFAULT_CHAR itself specifies an undefined or nonexistent character
in the font,
then no display is performed.
</para>
<para>
<!-- .LP -->
DEFAULT_CHAR cannot be approximated if not provided as a font property.
<!-- .\" -->
<!-- .\" print Table of Contents -->
<!-- .if o .bp \" blank page to make count even -->
<!-- .bp 1 -->
<!-- .af PN i -->
<!-- .PX -->
</para>
</sect2>
</sect1>
</chapter>
</book>
|