-
-
Notifications
You must be signed in to change notification settings - Fork 3
/
documentation.lisp
156 lines (110 loc) · 3.09 KB
/
documentation.lisp
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
(in-package #:org.shirakumo.font-discovery)
;; common.lisp
(docs:define-docs
(type font
"A representation of a system font and its font attributes.
See FILE
See FAMILY
See SLANT
See WEIGHT
See SPACING
See STRETCH")
(function file
"Returns the pathname to the font file.
This may be a TTF or OTF file.
See FONT")
(function family
"Returns the font family name.
See FONT")
(function slant
"Returns the slant of the font.
This may be one of the following keywords, in order of increasing
slant, or a system-dependent numeric value for the font's slant.
:ROMAN
:ITALIC
:OBLIQUE
See FONT")
(function weight
"Returns the weight of the font.
This may be one of the following keywords, in order of increasing
weight, or a system-dependent numeric value for the font's weight.
:THIN
:EXTRA-LIGHT
:LIGHT
:SEMI-LIGHT
:BOOK
:REGULAR
:MEDIUM
:SEMI-BOLD
:BOLD
:EXTRA-BOLD
:BLACK
:EXTRA-BLACK
See FONT")
(function spacing
"Returns the font's spacing.
This may be one of the following keywords, in order of increasing
spacing, or a system-dependent numeric value for the font's spacing.
:PROPORTIONAL
:DUALSPACE
:MONOSPACE
:CHARCELL
See FONT")
(function stretch
"Returns the font's stretch factor.
This may be one of the following keywords, in order of increasing
stretch factor, or a system-dependent numeric value for the font's
stretch factor.
:ULTRA-CONDENSED
:EXTRA-CONDENSED
:CONDENSED
:SEMI-CONDENSED
:NORMAL
:SEMI-EXPANDED
:EXPANDED
:EXTRA-EXPANDED
:ULTRA-EXPANDED
See FONT"))
;; interface
(docs:define-docs
(function init
"Initializes the library for use.
This will load foreign libraries and set up internal state if
necessary. Returns T if it did so.
It is safe to call this function multiple times.
See REFRESH
See DEINIT")
(function refresh
"Refreshes the font cache.
This should cause new system fonts to be recognised. You should call
this function whenever you think the list of system fonts might have
changed. Returns T if the cache was updated.
Doing this will automatically call INIT.
See INIT")
(function deinit
"Uninitializes the library.
This will shut down foreign libraries and deallocate cache memory.
Returns T if it did so.
It will not close the foreign libraries that were opened by INIT.
It is safe to call this function multiple times.
See INIT")
(function find-font
"Attempts to find a font with specifications that match the query as close as possible.
Returns a FONT instance, or NIL if no match can be found.
Note that on some systems the returned font may not be an exact
match, but rather a closest approximation.
For the possible values of the arguments, see the FONT class and its
reader functions.
Doing this will automatically call INIT.
See LIST-FONTS
See INIT
See FONT")
(function list-fonts
"Returns a list of fonts with specifications that match the query.
Returns a list of FONT instances that match the query.
For the possible values of the arguments, see the FONT class and its
reader functions.
Doing this will automatically call INIT.
See FIND-FONT
See INIT
See FONT"))