author | Claus Gittinger <cg@exept.de> |
Thu, 27 Jan 2011 11:48:21 +0100 | |
changeset 5689 | 474d50f11653 |
parent 5644 | 664ce01f38f5 |
child 5894 | 27858a4e6457 |
permissions | -rw-r--r-- |
52 | 1 |
" |
2 |
COPYRIGHT (c) 1994 by Claus Gittinger |
|
89 | 3 |
All Rights Reserved |
52 | 4 |
|
5 |
This software is furnished under a license and may be used |
|
6 |
only in accordance with the terms of that license and with the |
|
7 |
inclusion of the above copyright notice. This software may not |
|
8 |
be provided or otherwise made available to, or used by, any |
|
9 |
other person. No title to or ownership of the software is |
|
10 |
hereby transferred. |
|
11 |
" |
|
3246 | 12 |
"{ Package: 'stx:libview' }" |
13 |
||
52 | 14 |
Object subclass:#FontDescription |
1275 | 15 |
instanceVariableNames:'family face style size encoding manufacturer name flags masks |
5185 | 16 |
sizeUnit pixelSize' |
1265
c8030e99f941
added ST-80 compatible instVars (currently ignored, though)
Claus Gittinger <cg@exept.de>
parents:
1071
diff
changeset
|
17 |
classVariableNames:'BoldnessMask FixedFlag ItalicFlag OutlineFlag SerifFlag |
5511
bc18d5eb3527
Support a list of replacement fonts and try each in order
Stefan Vogel <sv@exept.de>
parents:
5441
diff
changeset
|
18 |
ShadowFlag StrikeoutFlag UnderlineFlag GenericFlag GenericFonts |
5644 | 19 |
CharacterSetToFontMapping CharacterEncodingToCharacterSetMapping |
20 |
IsTrueTypeFlag OverlappingCharactersFlag' |
|
437
a81ce3a8038b
return dummy default encoding & fullNames
Claus Gittinger <cg@exept.de>
parents:
229
diff
changeset
|
21 |
poolDictionaries:'' |
a81ce3a8038b
return dummy default encoding & fullNames
Claus Gittinger <cg@exept.de>
parents:
229
diff
changeset
|
22 |
category:'Graphics-Support' |
52 | 23 |
! |
24 |
||
1275 | 25 |
!FontDescription class methodsFor:'documentation'! |
52 | 26 |
|
27 |
copyright |
|
28 |
" |
|
29 |
COPYRIGHT (c) 1994 by Claus Gittinger |
|
89 | 30 |
All Rights Reserved |
52 | 31 |
|
32 |
This software is furnished under a license and may be used |
|
33 |
only in accordance with the terms of that license and with the |
|
34 |
inclusion of the above copyright notice. This software may not |
|
35 |
be provided or otherwise made available to, or used by, any |
|
36 |
other person. No title to or ownership of the software is |
|
37 |
hereby transferred. |
|
38 |
" |
|
39 |
! |
|
40 |
||
41 |
documentation |
|
42 |
" |
|
43 |
FontDescription is just a place-holder for scanned font names. |
|
44 |
||
611 | 45 |
[Instance variables:] |
46 |
family <String> the fonts family ('courier', 'helvetica' etc) |
|
47 |
face <String> the fonts face ('bold', 'medium' etc) |
|
48 |
style <String> the fonts style ('roman', 'italic', 'oblique') |
|
49 |
size <String> the fonts size (not in pixels) |
|
3991 | 50 |
encoding <Symbol> the fonts encoding (usually #iso8859-1) |
611 | 51 |
|
3991 | 52 |
manufacturer <nil|String|Array> |
53 |
the fonts origin - if known |
|
54 |
name <nil|String|Array> |
|
55 |
the platform specific name |
|
1265
c8030e99f941
added ST-80 compatible instVars (currently ignored, though)
Claus Gittinger <cg@exept.de>
parents:
1071
diff
changeset
|
56 |
|
3991 | 57 |
flags <SmallInteger> holds serif/italic etc. as flag bits |
58 |
masks <SmallInteger> currently dummy; to allow ST-80 compatible subclassing |
|
59 |
pixelSize <SmallInteger> currently dummy; to allow ST-80 compatible subclassing |
|
1265
c8030e99f941
added ST-80 compatible instVars (currently ignored, though)
Claus Gittinger <cg@exept.de>
parents:
1071
diff
changeset
|
60 |
|
c8030e99f941
added ST-80 compatible instVars (currently ignored, though)
Claus Gittinger <cg@exept.de>
parents:
1071
diff
changeset
|
61 |
[class variables:] |
3991 | 62 |
BoldnessMask currently dummy; to allow ST-80 compatible subclassing |
63 |
FixedFlag currently dummy; to allow ST-80 compatible subclassing |
|
64 |
ItalicFlag currently dummy; to allow ST-80 compatible subclassing |
|
65 |
OutlineFlag currently dummy; to allow ST-80 compatible subclassing |
|
66 |
SerifFlag currently dummy; to allow ST-80 compatible subclassing |
|
67 |
ShadowFlag currently dummy; to allow ST-80 compatible subclassing |
|
68 |
StrikeoutFlag currently dummy; to allow ST-80 compatible subclassing |
|
69 |
UnderlineFlag currently dummy; to allow ST-80 compatible subclassing |
|
1265
c8030e99f941
added ST-80 compatible instVars (currently ignored, though)
Claus Gittinger <cg@exept.de>
parents:
1071
diff
changeset
|
70 |
|
611 | 71 |
[author:] |
72 |
Claus Gittinger |
|
629 | 73 |
|
74 |
[see also:] |
|
75 |
Font |
|
76 |
FontPanel |
|
77 |
GraphicsContext |
|
78 |
( introduction to view programming :html: programming/viewintro.html#FONTS ) |
|
52 | 79 |
" |
80 |
! ! |
|
81 |
||
1265
c8030e99f941
added ST-80 compatible instVars (currently ignored, though)
Claus Gittinger <cg@exept.de>
parents:
1071
diff
changeset
|
82 |
!FontDescription class methodsFor:'initialization'! |
c8030e99f941
added ST-80 compatible instVars (currently ignored, though)
Claus Gittinger <cg@exept.de>
parents:
1071
diff
changeset
|
83 |
|
c8030e99f941
added ST-80 compatible instVars (currently ignored, though)
Claus Gittinger <cg@exept.de>
parents:
1071
diff
changeset
|
84 |
initialize |
c8030e99f941
added ST-80 compatible instVars (currently ignored, though)
Claus Gittinger <cg@exept.de>
parents:
1071
diff
changeset
|
85 |
"initialize class variables" |
c8030e99f941
added ST-80 compatible instVars (currently ignored, though)
Claus Gittinger <cg@exept.de>
parents:
1071
diff
changeset
|
86 |
|
5644 | 87 |
BoldnessMask := 2r000000000111. "/ allows for 8 boldnesses to be encoded |
88 |
FixedFlag := 2r000000001000. |
|
89 |
ItalicFlag := 2r000000010000. |
|
90 |
OutlineFlag := 2r000000100000. |
|
91 |
SerifFlag := 2r000001000000. |
|
92 |
ShadowFlag := 2r000010000000. |
|
93 |
StrikeoutFlag := 2r000100000000. |
|
94 |
UnderlineFlag := 2r001000000000. |
|
95 |
GenericFlag := 2r010000000000. "/ This is a pseudo font |
|
96 |
OverlappingCharactersFlag := 2r100000000000. "/ special for windows |
|
3827
3390983893a2
font stuff moved from MIMETypes
Claus Gittinger <cg@exept.de>
parents:
3785
diff
changeset
|
97 |
|
5511
bc18d5eb3527
Support a list of replacement fonts and try each in order
Stefan Vogel <sv@exept.de>
parents:
5441
diff
changeset
|
98 |
self initializeGenericFonts. |
3987 | 99 |
self initializeCharacterEncodingToCharacterSetMapping. |
3827
3390983893a2
font stuff moved from MIMETypes
Claus Gittinger <cg@exept.de>
parents:
3785
diff
changeset
|
100 |
self initializeCharacterSetToFontMapping. |
5644 | 101 |
|
102 |
"Modified: / 08-11-2010 / 13:12:08 / cg" |
|
3827
3390983893a2
font stuff moved from MIMETypes
Claus Gittinger <cg@exept.de>
parents:
3785
diff
changeset
|
103 |
! |
3390983893a2
font stuff moved from MIMETypes
Claus Gittinger <cg@exept.de>
parents:
3785
diff
changeset
|
104 |
|
3987 | 105 |
initializeCharacterEncodingToCharacterSetMapping |
106 |
"character encoding" |
|
107 |
||
108 |
CharacterEncodingToCharacterSetMapping isNil ifTrue:[ |
|
5511
bc18d5eb3527
Support a list of replacement fonts and try each in order
Stefan Vogel <sv@exept.de>
parents:
5441
diff
changeset
|
109 |
CharacterEncodingToCharacterSetMapping := Dictionary withKeysAndValues:#( |
bc18d5eb3527
Support a list of replacement fonts and try each in order
Stefan Vogel <sv@exept.de>
parents:
5441
diff
changeset
|
110 |
utf7 unicode |
bc18d5eb3527
Support a list of replacement fonts and try each in order
Stefan Vogel <sv@exept.de>
parents:
5441
diff
changeset
|
111 |
#'utf-7' unicode |
bc18d5eb3527
Support a list of replacement fonts and try each in order
Stefan Vogel <sv@exept.de>
parents:
5441
diff
changeset
|
112 |
utf8 unicode |
bc18d5eb3527
Support a list of replacement fonts and try each in order
Stefan Vogel <sv@exept.de>
parents:
5441
diff
changeset
|
113 |
#'utf-8' unicode |
bc18d5eb3527
Support a list of replacement fonts and try each in order
Stefan Vogel <sv@exept.de>
parents:
5441
diff
changeset
|
114 |
). |
3987 | 115 |
]. |
116 |
! |
|
117 |
||
3827
3390983893a2
font stuff moved from MIMETypes
Claus Gittinger <cg@exept.de>
parents:
3785
diff
changeset
|
118 |
initializeCharacterSetToFontMapping |
3390983893a2
font stuff moved from MIMETypes
Claus Gittinger <cg@exept.de>
parents:
3785
diff
changeset
|
119 |
"character sets" |
3390983893a2
font stuff moved from MIMETypes
Claus Gittinger <cg@exept.de>
parents:
3785
diff
changeset
|
120 |
|
3390983893a2
font stuff moved from MIMETypes
Claus Gittinger <cg@exept.de>
parents:
3785
diff
changeset
|
121 |
CharacterSetToFontMapping isNil ifTrue:[ |
5511
bc18d5eb3527
Support a list of replacement fonts and try each in order
Stefan Vogel <sv@exept.de>
parents:
5441
diff
changeset
|
122 |
CharacterSetToFontMapping := Dictionary withKeysAndValues: #( |
bc18d5eb3527
Support a list of replacement fonts and try each in order
Stefan Vogel <sv@exept.de>
parents:
5441
diff
changeset
|
123 |
unicode 'iso10646-*' |
bc18d5eb3527
Support a list of replacement fonts and try each in order
Stefan Vogel <sv@exept.de>
parents:
5441
diff
changeset
|
124 |
|
bc18d5eb3527
Support a list of replacement fonts and try each in order
Stefan Vogel <sv@exept.de>
parents:
5441
diff
changeset
|
125 |
'koi8-r' 'iso8859-5' |
3827
3390983893a2
font stuff moved from MIMETypes
Claus Gittinger <cg@exept.de>
parents:
3785
diff
changeset
|
126 |
|
5511
bc18d5eb3527
Support a list of replacement fonts and try each in order
Stefan Vogel <sv@exept.de>
parents:
5441
diff
changeset
|
127 |
'iso2022-jp' 'jis*0208*' |
bc18d5eb3527
Support a list of replacement fonts and try each in order
Stefan Vogel <sv@exept.de>
parents:
5441
diff
changeset
|
128 |
'x-iso2022-jp' 'jis*0208*' |
bc18d5eb3527
Support a list of replacement fonts and try each in order
Stefan Vogel <sv@exept.de>
parents:
5441
diff
changeset
|
129 |
'x-euc-jp' 'jis*0208*' |
bc18d5eb3527
Support a list of replacement fonts and try each in order
Stefan Vogel <sv@exept.de>
parents:
5441
diff
changeset
|
130 |
'x-shift-jis' 'jis*0208*' |
bc18d5eb3527
Support a list of replacement fonts and try each in order
Stefan Vogel <sv@exept.de>
parents:
5441
diff
changeset
|
131 |
'x-sjis' 'jis*0208*' |
bc18d5eb3527
Support a list of replacement fonts and try each in order
Stefan Vogel <sv@exept.de>
parents:
5441
diff
changeset
|
132 |
'x-jis7' 'jis*0208*' |
bc18d5eb3527
Support a list of replacement fonts and try each in order
Stefan Vogel <sv@exept.de>
parents:
5441
diff
changeset
|
133 |
'jis7' 'jis*0208*' |
bc18d5eb3527
Support a list of replacement fonts and try each in order
Stefan Vogel <sv@exept.de>
parents:
5441
diff
changeset
|
134 |
'euc' 'jis*0208*' |
bc18d5eb3527
Support a list of replacement fonts and try each in order
Stefan Vogel <sv@exept.de>
parents:
5441
diff
changeset
|
135 |
'euc-jp' 'jis*0208*' |
bc18d5eb3527
Support a list of replacement fonts and try each in order
Stefan Vogel <sv@exept.de>
parents:
5441
diff
changeset
|
136 |
'sjis' 'jis*0208*' |
3987 | 137 |
|
5511
bc18d5eb3527
Support a list of replacement fonts and try each in order
Stefan Vogel <sv@exept.de>
parents:
5441
diff
changeset
|
138 |
'big5' 'big5*' |
3987 | 139 |
|
5511
bc18d5eb3527
Support a list of replacement fonts and try each in order
Stefan Vogel <sv@exept.de>
parents:
5441
diff
changeset
|
140 |
'gb2312' 'gb*' |
bc18d5eb3527
Support a list of replacement fonts and try each in order
Stefan Vogel <sv@exept.de>
parents:
5441
diff
changeset
|
141 |
'hz-gb-2312' 'gb*' |
bc18d5eb3527
Support a list of replacement fonts and try each in order
Stefan Vogel <sv@exept.de>
parents:
5441
diff
changeset
|
142 |
'x-gbk' 'gb*' |
bc18d5eb3527
Support a list of replacement fonts and try each in order
Stefan Vogel <sv@exept.de>
parents:
5441
diff
changeset
|
143 |
|
bc18d5eb3527
Support a list of replacement fonts and try each in order
Stefan Vogel <sv@exept.de>
parents:
5441
diff
changeset
|
144 |
'iso2022-kr' 'ksc*' |
bc18d5eb3527
Support a list of replacement fonts and try each in order
Stefan Vogel <sv@exept.de>
parents:
5441
diff
changeset
|
145 |
'x-euc-kr' 'ksc*' |
bc18d5eb3527
Support a list of replacement fonts and try each in order
Stefan Vogel <sv@exept.de>
parents:
5441
diff
changeset
|
146 |
). |
bc18d5eb3527
Support a list of replacement fonts and try each in order
Stefan Vogel <sv@exept.de>
parents:
5441
diff
changeset
|
147 |
]. |
bc18d5eb3527
Support a list of replacement fonts and try each in order
Stefan Vogel <sv@exept.de>
parents:
5441
diff
changeset
|
148 |
! |
3827
3390983893a2
font stuff moved from MIMETypes
Claus Gittinger <cg@exept.de>
parents:
3785
diff
changeset
|
149 |
|
5511
bc18d5eb3527
Support a list of replacement fonts and try each in order
Stefan Vogel <sv@exept.de>
parents:
5441
diff
changeset
|
150 |
initializeGenericFonts |
bc18d5eb3527
Support a list of replacement fonts and try each in order
Stefan Vogel <sv@exept.de>
parents:
5441
diff
changeset
|
151 |
"generic fonts, that do not exist as a device fonts and are |
bc18d5eb3527
Support a list of replacement fonts and try each in order
Stefan Vogel <sv@exept.de>
parents:
5441
diff
changeset
|
152 |
replaced by a real font" |
3827
3390983893a2
font stuff moved from MIMETypes
Claus Gittinger <cg@exept.de>
parents:
3785
diff
changeset
|
153 |
|
5511
bc18d5eb3527
Support a list of replacement fonts and try each in order
Stefan Vogel <sv@exept.de>
parents:
5441
diff
changeset
|
154 |
GenericFonts isNil ifTrue:[ |
bc18d5eb3527
Support a list of replacement fonts and try each in order
Stefan Vogel <sv@exept.de>
parents:
5441
diff
changeset
|
155 |
GenericFonts := OrderedCollection new. |
bc18d5eb3527
Support a list of replacement fonts and try each in order
Stefan Vogel <sv@exept.de>
parents:
5441
diff
changeset
|
156 |
GenericFonts add:((self family:#serif face:nil style:nil size:0 sizeUnit:#pt encoding:nil) isGenericFont:true). |
bc18d5eb3527
Support a list of replacement fonts and try each in order
Stefan Vogel <sv@exept.de>
parents:
5441
diff
changeset
|
157 |
GenericFonts add:((self family:#'sans-serif' face:nil style:nil size:0 sizeUnit:#pt encoding:nil) isGenericFont:true). |
bc18d5eb3527
Support a list of replacement fonts and try each in order
Stefan Vogel <sv@exept.de>
parents:
5441
diff
changeset
|
158 |
GenericFonts add:((self family:#monospace face:nil style:nil size:0 sizeUnit:#pt encoding:nil) isGenericFont:true). |
3827
3390983893a2
font stuff moved from MIMETypes
Claus Gittinger <cg@exept.de>
parents:
3785
diff
changeset
|
159 |
]. |
1265
c8030e99f941
added ST-80 compatible instVars (currently ignored, though)
Claus Gittinger <cg@exept.de>
parents:
1071
diff
changeset
|
160 |
! ! |
c8030e99f941
added ST-80 compatible instVars (currently ignored, though)
Claus Gittinger <cg@exept.de>
parents:
1071
diff
changeset
|
161 |
|
1275 | 162 |
!FontDescription class methodsFor:'instance creation'! |
52 | 163 |
|
153 | 164 |
family:familyString |
165 |
"returns a font for given family and default (12pt) size |
|
3996 | 166 |
with default encoding. |
629 | 167 |
The new fonts face defaults `medium', its style to `roman'. |
153 | 168 |
The returned font is not associated to a specific device" |
169 |
||
5169 | 170 |
^ self |
171 |
family:familyString |
|
172 |
face:(self defaultFace) |
|
173 |
style:(self defaultStyle) |
|
174 |
size:(self defaultSize) |
|
5185 | 175 |
sizeUnit:#pt |
5169 | 176 |
encoding:(self defaultEncoding) |
153 | 177 |
|
178 |
" |
|
179 |
Font family:'helvetica' |
|
180 |
Font family:'courier' |
|
181 |
" |
|
629 | 182 |
|
183 |
"Modified: 30.4.1996 / 17:20:44 / cg" |
|
153 | 184 |
! |
185 |
||
109 | 186 |
family:familyString face:faceString size:sizeNum |
3996 | 187 |
"returns a font for given family and size with default encoding. |
629 | 188 |
The new fonts style defaults to `roman'. |
109 | 189 |
The returned font is not associated to a specific device" |
190 |
||
5169 | 191 |
^ self |
192 |
family:familyString |
|
193 |
face:faceString |
|
194 |
style:(self defaultStyle) |
|
195 |
size:sizeNum |
|
5185 | 196 |
sizeUnit:#pt |
5169 | 197 |
encoding:(self defaultEncoding) |
109 | 198 |
|
199 |
" |
|
200 |
Font family:'helvetica' face:'medium' size:10 |
|
201 |
Font family:'helvetica' face:'bold' size:10 |
|
202 |
Font family:'courier' face:'bold' size:10 |
|
203 |
" |
|
629 | 204 |
|
205 |
"Modified: 30.4.1996 / 17:21:07 / cg" |
|
109 | 206 |
! |
207 |
||
208 |
family:familyString face:faceString style:styleString size:sizeNum |
|
3996 | 209 |
"returns a font for given family, face, style and size with default encoding. |
109 | 210 |
The returned font is not associated to a specific device" |
211 |
||
5169 | 212 |
^ self |
213 |
family:familyString |
|
214 |
face:faceString |
|
215 |
style:styleString |
|
216 |
size:sizeNum |
|
5185 | 217 |
sizeUnit:#pt |
5169 | 218 |
encoding:(self defaultEncoding) |
109 | 219 |
|
220 |
" |
|
221 |
Font family:'helvetica' face:'medium' style:'roman' size:10 |
|
222 |
Font family:'helvetica' face:'medium' style:'italic' size:10 |
|
223 |
Font family:'helvetica' face:'bold' style:'roman' size:10 |
|
224 |
Font family:'courier' face:'bold' style:'italic' size:10 |
|
225 |
" |
|
226 |
! |
|
227 |
||
3993
7fc0939208e2
defaultEncoding is now 8859-1
Claus Gittinger <cg@exept.de>
parents:
3991
diff
changeset
|
228 |
family:familyString face:faceString style:styleString size:sizeNum encoding:encoding |
3996 | 229 |
"returns a font for given family, face, style, size and the specified encoding. |
576 | 230 |
The returned font is not associated to a specific device" |
231 |
||
5169 | 232 |
^ self |
233 |
family:familyString |
|
234 |
face:faceString |
|
235 |
style:styleString |
|
236 |
size:sizeNum |
|
5185 | 237 |
sizeUnit:#pt |
5169 | 238 |
encoding:encoding |
239 |
||
240 |
"Modified: 20.4.1996 / 23:19:04 / cg" |
|
241 |
! |
|
242 |
||
5185 | 243 |
family:familyString face:faceString style:styleString size:size sizeUnit:sizeUnit encoding:encoding |
5169 | 244 |
"returns a font for given family, face, style, size and the specified encoding. |
245 |
The returned font is not associated to a specific device" |
|
246 |
||
52 | 247 |
^ self new |
576 | 248 |
family:familyString |
249 |
face:faceString |
|
250 |
style:styleString |
|
5185 | 251 |
size:size |
252 |
sizeUnit:sizeUnit |
|
3993
7fc0939208e2
defaultEncoding is now 8859-1
Claus Gittinger <cg@exept.de>
parents:
3991
diff
changeset
|
253 |
encoding:encoding |
576 | 254 |
|
255 |
"Modified: 20.4.1996 / 23:19:04 / cg" |
|
437
a81ce3a8038b
return dummy default encoding & fullNames
Claus Gittinger <cg@exept.de>
parents:
229
diff
changeset
|
256 |
! |
a81ce3a8038b
return dummy default encoding & fullNames
Claus Gittinger <cg@exept.de>
parents:
229
diff
changeset
|
257 |
|
5169 | 258 |
family:familyString pixelSize:sizeNum |
259 |
"returns a font for given family and pixelSize with default encoding. |
|
260 |
The new fonts face defaults to `medium', its style to `roman'. |
|
261 |
Notice: the returned font will typically only be usable on a screen, |
|
262 |
and will not scale as to the devices resolution. |
|
263 |
Use #family:size: for resolution-independent sizing." |
|
264 |
||
265 |
^ self |
|
266 |
family:familyString |
|
267 |
face:(self defaultFace) |
|
268 |
style:(self defaultStyle) |
|
5185 | 269 |
size:sizeNum |
270 |
sizeUnit:#px |
|
5169 | 271 |
encoding:(self defaultEncoding) |
272 |
||
273 |
" |
|
274 |
(Font family:'helvetica' size:10) onDevice:Screen current |
|
275 |
(Font family:'helvetica' pixelSize:10) onDevice:Screen current |
|
276 |
" |
|
277 |
! |
|
278 |
||
437
a81ce3a8038b
return dummy default encoding & fullNames
Claus Gittinger <cg@exept.de>
parents:
229
diff
changeset
|
279 |
family:familyString size:sizeNum |
3996 | 280 |
"returns a font for given family and size with default encoding. |
629 | 281 |
The new fonts face defaults to `medium', its style to `roman'. |
437
a81ce3a8038b
return dummy default encoding & fullNames
Claus Gittinger <cg@exept.de>
parents:
229
diff
changeset
|
282 |
The returned font is not associated to a specific device" |
a81ce3a8038b
return dummy default encoding & fullNames
Claus Gittinger <cg@exept.de>
parents:
229
diff
changeset
|
283 |
|
5169 | 284 |
^ self |
285 |
family:familyString |
|
286 |
face:(self defaultFace) |
|
287 |
style:(self defaultStyle) |
|
288 |
size:sizeNum |
|
5185 | 289 |
sizeUnit:#pt |
5169 | 290 |
encoding:(self defaultEncoding) |
437
a81ce3a8038b
return dummy default encoding & fullNames
Claus Gittinger <cg@exept.de>
parents:
229
diff
changeset
|
291 |
|
a81ce3a8038b
return dummy default encoding & fullNames
Claus Gittinger <cg@exept.de>
parents:
229
diff
changeset
|
292 |
" |
a81ce3a8038b
return dummy default encoding & fullNames
Claus Gittinger <cg@exept.de>
parents:
229
diff
changeset
|
293 |
Font family:'helvetica' size:10 |
a81ce3a8038b
return dummy default encoding & fullNames
Claus Gittinger <cg@exept.de>
parents:
229
diff
changeset
|
294 |
Font family:'courier' size:10 |
a81ce3a8038b
return dummy default encoding & fullNames
Claus Gittinger <cg@exept.de>
parents:
229
diff
changeset
|
295 |
" |
629 | 296 |
|
297 |
"Modified: 30.4.1996 / 17:21:40 / cg" |
|
437
a81ce3a8038b
return dummy default encoding & fullNames
Claus Gittinger <cg@exept.de>
parents:
229
diff
changeset
|
298 |
! |
a81ce3a8038b
return dummy default encoding & fullNames
Claus Gittinger <cg@exept.de>
parents:
229
diff
changeset
|
299 |
|
4005 | 300 |
family:familyString size:sizeNum encoding:encoding |
301 |
"returns a font for given family and size with default encoding. |
|
302 |
The new fonts face defaults to `medium', its style to `roman'. |
|
303 |
The returned font is not associated to a specific device" |
|
304 |
||
5169 | 305 |
^ self |
306 |
family:familyString |
|
307 |
face:(self defaultFace) |
|
308 |
style:(self defaultStyle) |
|
309 |
size:sizeNum |
|
5185 | 310 |
sizeUnit:#pt |
5169 | 311 |
encoding:encoding |
4005 | 312 |
|
313 |
" |
|
314 |
Font family:'helvetica' size:10 encoding:#'iso8859-1' |
|
315 |
Font family:'courier' size:10 encoding:#'iso8859-1' |
|
316 |
" |
|
317 |
||
318 |
"Modified: 30.4.1996 / 17:21:40 / cg" |
|
319 |
! |
|
320 |
||
1071 | 321 |
family:familyString style:aStyle size:sizeNum |
3996 | 322 |
"returns a font for given family and size with default encoding. |
1071 | 323 |
The new fonts face defaults to `medium', its style to `roman'. |
324 |
The returned font is not associated to a specific device" |
|
325 |
||
5169 | 326 |
^ self |
327 |
family:familyString |
|
328 |
face:(self defaultFace) |
|
329 |
style:aStyle |
|
330 |
size:sizeNum |
|
5185 | 331 |
sizeUnit:#pt |
5169 | 332 |
encoding:(self defaultEncoding) |
1071 | 333 |
|
334 |
" |
|
335 |
Font family:'helvetica' style:#roman size:48 |
|
336 |
Font family:'courier' style:#roman size:10 |
|
337 |
" |
|
338 |
||
339 |
"Modified: 30.4.1996 / 17:21:40 / cg" |
|
340 |
"Created: 8.10.1996 / 18:33:55 / cg" |
|
341 |
! |
|
342 |
||
437
a81ce3a8038b
return dummy default encoding & fullNames
Claus Gittinger <cg@exept.de>
parents:
229
diff
changeset
|
343 |
name:aFontName |
a81ce3a8038b
return dummy default encoding & fullNames
Claus Gittinger <cg@exept.de>
parents:
229
diff
changeset
|
344 |
"returns a font with the given explicit name. |
629 | 345 |
WARNING: |
346 |
You shuld not use explicit naming, since font names vary |
|
347 |
with operatingSystems, devices and architecture. |
|
348 |
||
437
a81ce3a8038b
return dummy default encoding & fullNames
Claus Gittinger <cg@exept.de>
parents:
229
diff
changeset
|
349 |
This interface is provided for special purposes only. |
a81ce3a8038b
return dummy default encoding & fullNames
Claus Gittinger <cg@exept.de>
parents:
229
diff
changeset
|
350 |
On X, the name given should be according the X fontname conventions; |
629 | 351 |
i.e. something like: '-*-times-bold-r-normal-*-*-240-*-*-*-*-iso8859-1'. |
352 |
||
353 |
On other devices, font naming may be completely different." |
|
437
a81ce3a8038b
return dummy default encoding & fullNames
Claus Gittinger <cg@exept.de>
parents:
229
diff
changeset
|
354 |
|
5169 | 355 |
^ self |
356 |
family:aFontName |
|
357 |
face:nil |
|
358 |
style:nil |
|
359 |
size:nil |
|
5185 | 360 |
sizeUnit:#px |
5169 | 361 |
encoding:nil |
437
a81ce3a8038b
return dummy default encoding & fullNames
Claus Gittinger <cg@exept.de>
parents:
229
diff
changeset
|
362 |
|
a81ce3a8038b
return dummy default encoding & fullNames
Claus Gittinger <cg@exept.de>
parents:
229
diff
changeset
|
363 |
" |
a81ce3a8038b
return dummy default encoding & fullNames
Claus Gittinger <cg@exept.de>
parents:
229
diff
changeset
|
364 |
Font name:'-*-times-bold-r-normal-*-*-240-*-*-*-*-iso8859-1' |
629 | 365 |
Font name:'6x10' |
366 |
Font name:'k14' |
|
367 |
((Font name:'k14') on:Display) encoding |
|
437
a81ce3a8038b
return dummy default encoding & fullNames
Claus Gittinger <cg@exept.de>
parents:
229
diff
changeset
|
368 |
" |
629 | 369 |
|
370 |
"Modified: 30.4.1996 / 17:23:09 / cg" |
|
52 | 371 |
! ! |
372 |
||
5511
bc18d5eb3527
Support a list of replacement fonts and try each in order
Stefan Vogel <sv@exept.de>
parents:
5441
diff
changeset
|
373 |
!FontDescription class methodsFor:'accessing'! |
bc18d5eb3527
Support a list of replacement fonts and try each in order
Stefan Vogel <sv@exept.de>
parents:
5441
diff
changeset
|
374 |
|
bc18d5eb3527
Support a list of replacement fonts and try each in order
Stefan Vogel <sv@exept.de>
parents:
5441
diff
changeset
|
375 |
genericFonts |
bc18d5eb3527
Support a list of replacement fonts and try each in order
Stefan Vogel <sv@exept.de>
parents:
5441
diff
changeset
|
376 |
^ GenericFonts |
bc18d5eb3527
Support a list of replacement fonts and try each in order
Stefan Vogel <sv@exept.de>
parents:
5441
diff
changeset
|
377 |
! ! |
bc18d5eb3527
Support a list of replacement fonts and try each in order
Stefan Vogel <sv@exept.de>
parents:
5441
diff
changeset
|
378 |
|
3993
7fc0939208e2
defaultEncoding is now 8859-1
Claus Gittinger <cg@exept.de>
parents:
3991
diff
changeset
|
379 |
!FontDescription class methodsFor:'defaults'! |
7fc0939208e2
defaultEncoding is now 8859-1
Claus Gittinger <cg@exept.de>
parents:
3991
diff
changeset
|
380 |
|
7fc0939208e2
defaultEncoding is now 8859-1
Claus Gittinger <cg@exept.de>
parents:
3991
diff
changeset
|
381 |
defaultEncoding |
7fc0939208e2
defaultEncoding is now 8859-1
Claus Gittinger <cg@exept.de>
parents:
3991
diff
changeset
|
382 |
^ #'iso8859-1' |
3996 | 383 |
! |
384 |
||
385 |
defaultFace |
|
386 |
^ 'medium' |
|
387 |
! |
|
388 |
||
389 |
defaultSize |
|
390 |
^ 12 |
|
391 |
! |
|
392 |
||
393 |
defaultStyle |
|
394 |
^ 'roman' |
|
3993
7fc0939208e2
defaultEncoding is now 8859-1
Claus Gittinger <cg@exept.de>
parents:
3991
diff
changeset
|
395 |
! ! |
7fc0939208e2
defaultEncoding is now 8859-1
Claus Gittinger <cg@exept.de>
parents:
3991
diff
changeset
|
396 |
|
3827
3390983893a2
font stuff moved from MIMETypes
Claus Gittinger <cg@exept.de>
parents:
3785
diff
changeset
|
397 |
!FontDescription class methodsFor:'queries'! |
3390983893a2
font stuff moved from MIMETypes
Claus Gittinger <cg@exept.de>
parents:
3785
diff
changeset
|
398 |
|
3987 | 399 |
characterSetForCharacterEncoding:encodingName |
400 |
"return the font-encoding for a character encoding" |
|
401 |
||
4018 | 402 |
^ CharacterEncodingToCharacterSetMapping at:encodingName ifAbsent:encodingName |
3987 | 403 |
|
404 |
" |
|
4018 | 405 |
FontDescription characterSetForCharacterEncoding:'utf8' |
406 |
FontDescription characterSetForCharacterEncoding:'koi8-r' |
|
407 |
FontDescription characterSetForCharacterEncoding:'unicode' |
|
3987 | 408 |
" |
409 |
! |
|
410 |
||
3827
3390983893a2
font stuff moved from MIMETypes
Claus Gittinger <cg@exept.de>
parents:
3785
diff
changeset
|
411 |
fontNamePatternForCharset:aCharSetName |
3390983893a2
font stuff moved from MIMETypes
Claus Gittinger <cg@exept.de>
parents:
3785
diff
changeset
|
412 |
"return the font-encoding for an iso-charset" |
3390983893a2
font stuff moved from MIMETypes
Claus Gittinger <cg@exept.de>
parents:
3785
diff
changeset
|
413 |
|
3390983893a2
font stuff moved from MIMETypes
Claus Gittinger <cg@exept.de>
parents:
3785
diff
changeset
|
414 |
^ CharacterSetToFontMapping at:aCharSetName ifAbsent:nil |
3390983893a2
font stuff moved from MIMETypes
Claus Gittinger <cg@exept.de>
parents:
3785
diff
changeset
|
415 |
|
3390983893a2
font stuff moved from MIMETypes
Claus Gittinger <cg@exept.de>
parents:
3785
diff
changeset
|
416 |
" |
3390983893a2
font stuff moved from MIMETypes
Claus Gittinger <cg@exept.de>
parents:
3785
diff
changeset
|
417 |
FontDescription fontNamePatternForCharset:'iso2022-jp' |
3390983893a2
font stuff moved from MIMETypes
Claus Gittinger <cg@exept.de>
parents:
3785
diff
changeset
|
418 |
FontDescription fontNamePatternForCharset:'euc-jp' |
3390983893a2
font stuff moved from MIMETypes
Claus Gittinger <cg@exept.de>
parents:
3785
diff
changeset
|
419 |
" |
4010
7f899eceaf2d
preferredFontEncodingFor moved from FileBrowser
Claus Gittinger <cg@exept.de>
parents:
4005
diff
changeset
|
420 |
! |
7f899eceaf2d
preferredFontEncodingFor moved from FileBrowser
Claus Gittinger <cg@exept.de>
parents:
4005
diff
changeset
|
421 |
|
7f899eceaf2d
preferredFontEncodingFor moved from FileBrowser
Claus Gittinger <cg@exept.de>
parents:
4005
diff
changeset
|
422 |
preferredFontEncodingFor:fileEncoding |
7f899eceaf2d
preferredFontEncodingFor moved from FileBrowser
Claus Gittinger <cg@exept.de>
parents:
4005
diff
changeset
|
423 |
"given a file encoding, return a corresponding match pattern for a preferred fontEncoding" |
7f899eceaf2d
preferredFontEncodingFor moved from FileBrowser
Claus Gittinger <cg@exept.de>
parents:
4005
diff
changeset
|
424 |
|
7f899eceaf2d
preferredFontEncodingFor moved from FileBrowser
Claus Gittinger <cg@exept.de>
parents:
4005
diff
changeset
|
425 |
|ce fe| |
7f899eceaf2d
preferredFontEncodingFor moved from FileBrowser
Claus Gittinger <cg@exept.de>
parents:
4005
diff
changeset
|
426 |
|
7f899eceaf2d
preferredFontEncodingFor moved from FileBrowser
Claus Gittinger <cg@exept.de>
parents:
4005
diff
changeset
|
427 |
ce := FontDescription characterSetForCharacterEncoding:fileEncoding. |
7f899eceaf2d
preferredFontEncodingFor moved from FileBrowser
Claus Gittinger <cg@exept.de>
parents:
4005
diff
changeset
|
428 |
ce isNil ifTrue:[ |
7f899eceaf2d
preferredFontEncodingFor moved from FileBrowser
Claus Gittinger <cg@exept.de>
parents:
4005
diff
changeset
|
429 |
ce := fileEncoding. |
7f899eceaf2d
preferredFontEncodingFor moved from FileBrowser
Claus Gittinger <cg@exept.de>
parents:
4005
diff
changeset
|
430 |
]. |
7f899eceaf2d
preferredFontEncodingFor moved from FileBrowser
Claus Gittinger <cg@exept.de>
parents:
4005
diff
changeset
|
431 |
|
7f899eceaf2d
preferredFontEncodingFor moved from FileBrowser
Claus Gittinger <cg@exept.de>
parents:
4005
diff
changeset
|
432 |
fe := FontDescription fontNamePatternForCharset:ce. |
7f899eceaf2d
preferredFontEncodingFor moved from FileBrowser
Claus Gittinger <cg@exept.de>
parents:
4005
diff
changeset
|
433 |
fe notNil ifTrue:[^ fe]. |
7f899eceaf2d
preferredFontEncodingFor moved from FileBrowser
Claus Gittinger <cg@exept.de>
parents:
4005
diff
changeset
|
434 |
^ ce ? 'iso8859*' |
3827
3390983893a2
font stuff moved from MIMETypes
Claus Gittinger <cg@exept.de>
parents:
3785
diff
changeset
|
435 |
! ! |
3390983893a2
font stuff moved from MIMETypes
Claus Gittinger <cg@exept.de>
parents:
3785
diff
changeset
|
436 |
|
3880 | 437 |
!FontDescription methodsFor:'Compatibility-ST80'! |
1277 | 438 |
|
439 |
boldness:aNumber |
|
440 |
"added for ST-80 compatibility; actually ignored currently" |
|
441 |
||
442 |
|val| |
|
443 |
||
444 |
flags isNil ifTrue:[ |
|
445 |
flags := masks := 0 |
|
446 |
]. |
|
447 |
||
448 |
"/ scale from 0..1 to 0..BoldnessMask |
|
449 |
val := (aNumber max:0.0) min:1.0. |
|
450 |
val := (BoldnessMask * val) rounded. |
|
451 |
||
452 |
flags := flags bitOr:val. |
|
453 |
masks := masks bitOr:BoldnessMask |
|
454 |
||
455 |
"Created: 25.1.1997 / 03:20:05 / cg" |
|
456 |
"Modified: 25.1.1997 / 03:20:47 / cg" |
|
457 |
! |
|
458 |
||
459 |
color:aColor |
|
460 |
"added for ST-80 compatibility; actually ignored currently" |
|
461 |
||
462 |
"Created: 25.1.1997 / 03:21:28 / cg" |
|
463 |
! |
|
464 |
||
1760
ccd221469891
more ST80 compatibility (partially dummy)
Claus Gittinger <cg@exept.de>
parents:
1740
diff
changeset
|
465 |
encodings:aCollectionOfEncodings |
ccd221469891
more ST80 compatibility (partially dummy)
Claus Gittinger <cg@exept.de>
parents:
1740
diff
changeset
|
466 |
"added for ST-80 compatibility; actually ignored currently" |
ccd221469891
more ST80 compatibility (partially dummy)
Claus Gittinger <cg@exept.de>
parents:
1740
diff
changeset
|
467 |
|
ccd221469891
more ST80 compatibility (partially dummy)
Claus Gittinger <cg@exept.de>
parents:
1740
diff
changeset
|
468 |
"Created: 20.6.1997 / 09:52:46 / cg" |
ccd221469891
more ST80 compatibility (partially dummy)
Claus Gittinger <cg@exept.de>
parents:
1740
diff
changeset
|
469 |
! |
ccd221469891
more ST80 compatibility (partially dummy)
Claus Gittinger <cg@exept.de>
parents:
1740
diff
changeset
|
470 |
|
1277 | 471 |
fixedWidth:aBoolean |
472 |
"added for ST-80 compatibility; actually ignored currently" |
|
473 |
||
474 |
flags isNil ifTrue:[ |
|
475 |
flags := masks := 0 |
|
476 |
]. |
|
5511
bc18d5eb3527
Support a list of replacement fonts and try each in order
Stefan Vogel <sv@exept.de>
parents:
5441
diff
changeset
|
477 |
aBoolean ifTrue:[ |
bc18d5eb3527
Support a list of replacement fonts and try each in order
Stefan Vogel <sv@exept.de>
parents:
5441
diff
changeset
|
478 |
flags := flags bitOr:FixedFlag. |
bc18d5eb3527
Support a list of replacement fonts and try each in order
Stefan Vogel <sv@exept.de>
parents:
5441
diff
changeset
|
479 |
masks := masks bitOr:FixedFlag |
bc18d5eb3527
Support a list of replacement fonts and try each in order
Stefan Vogel <sv@exept.de>
parents:
5441
diff
changeset
|
480 |
] ifFalse:[ |
bc18d5eb3527
Support a list of replacement fonts and try each in order
Stefan Vogel <sv@exept.de>
parents:
5441
diff
changeset
|
481 |
flags := flags bitClear:FixedFlag. |
bc18d5eb3527
Support a list of replacement fonts and try each in order
Stefan Vogel <sv@exept.de>
parents:
5441
diff
changeset
|
482 |
masks := masks bitClear:FixedFlag. |
bc18d5eb3527
Support a list of replacement fonts and try each in order
Stefan Vogel <sv@exept.de>
parents:
5441
diff
changeset
|
483 |
]. |
1277 | 484 |
|
485 |
"Created: 25.1.1997 / 03:14:06 / cg" |
|
486 |
"Modified: 25.1.1997 / 03:21:03 / cg" |
|
487 |
! |
|
488 |
||
489 |
italic:aBoolean |
|
490 |
"added for ST-80 compatibility; actually ignored currently" |
|
491 |
||
492 |
flags isNil ifTrue:[ |
|
493 |
flags := masks := 0 |
|
494 |
]. |
|
5511
bc18d5eb3527
Support a list of replacement fonts and try each in order
Stefan Vogel <sv@exept.de>
parents:
5441
diff
changeset
|
495 |
aBoolean ifTrue:[ |
bc18d5eb3527
Support a list of replacement fonts and try each in order
Stefan Vogel <sv@exept.de>
parents:
5441
diff
changeset
|
496 |
flags := flags bitOr:ItalicFlag. |
bc18d5eb3527
Support a list of replacement fonts and try each in order
Stefan Vogel <sv@exept.de>
parents:
5441
diff
changeset
|
497 |
masks := masks bitOr:ItalicFlag |
bc18d5eb3527
Support a list of replacement fonts and try each in order
Stefan Vogel <sv@exept.de>
parents:
5441
diff
changeset
|
498 |
] ifFalse:[ |
bc18d5eb3527
Support a list of replacement fonts and try each in order
Stefan Vogel <sv@exept.de>
parents:
5441
diff
changeset
|
499 |
flags := flags bitClear:ItalicFlag. |
bc18d5eb3527
Support a list of replacement fonts and try each in order
Stefan Vogel <sv@exept.de>
parents:
5441
diff
changeset
|
500 |
masks := masks bitClear:ItalicFlag. |
bc18d5eb3527
Support a list of replacement fonts and try each in order
Stefan Vogel <sv@exept.de>
parents:
5441
diff
changeset
|
501 |
]. |
1277 | 502 |
|
503 |
"Created: 25.1.1997 / 03:15:37 / cg" |
|
504 |
"Modified: 25.1.1997 / 03:20:55 / cg" |
|
505 |
! |
|
506 |
||
1760
ccd221469891
more ST80 compatibility (partially dummy)
Claus Gittinger <cg@exept.de>
parents:
1740
diff
changeset
|
507 |
outline:aBoolean |
ccd221469891
more ST80 compatibility (partially dummy)
Claus Gittinger <cg@exept.de>
parents:
1740
diff
changeset
|
508 |
"added for ST-80 compatibility; actually ignored currently" |
ccd221469891
more ST80 compatibility (partially dummy)
Claus Gittinger <cg@exept.de>
parents:
1740
diff
changeset
|
509 |
|
ccd221469891
more ST80 compatibility (partially dummy)
Claus Gittinger <cg@exept.de>
parents:
1740
diff
changeset
|
510 |
flags isNil ifTrue:[ |
ccd221469891
more ST80 compatibility (partially dummy)
Claus Gittinger <cg@exept.de>
parents:
1740
diff
changeset
|
511 |
flags := masks := 0 |
ccd221469891
more ST80 compatibility (partially dummy)
Claus Gittinger <cg@exept.de>
parents:
1740
diff
changeset
|
512 |
]. |
5511
bc18d5eb3527
Support a list of replacement fonts and try each in order
Stefan Vogel <sv@exept.de>
parents:
5441
diff
changeset
|
513 |
aBoolean ifTrue:[ |
bc18d5eb3527
Support a list of replacement fonts and try each in order
Stefan Vogel <sv@exept.de>
parents:
5441
diff
changeset
|
514 |
flags := flags bitOr:OutlineFlag. |
bc18d5eb3527
Support a list of replacement fonts and try each in order
Stefan Vogel <sv@exept.de>
parents:
5441
diff
changeset
|
515 |
masks := masks bitOr:OutlineFlag |
bc18d5eb3527
Support a list of replacement fonts and try each in order
Stefan Vogel <sv@exept.de>
parents:
5441
diff
changeset
|
516 |
] ifFalse:[ |
bc18d5eb3527
Support a list of replacement fonts and try each in order
Stefan Vogel <sv@exept.de>
parents:
5441
diff
changeset
|
517 |
flags := flags bitClear:OutlineFlag. |
bc18d5eb3527
Support a list of replacement fonts and try each in order
Stefan Vogel <sv@exept.de>
parents:
5441
diff
changeset
|
518 |
masks := masks bitClear:OutlineFlag. |
bc18d5eb3527
Support a list of replacement fonts and try each in order
Stefan Vogel <sv@exept.de>
parents:
5441
diff
changeset
|
519 |
]. |
1760
ccd221469891
more ST80 compatibility (partially dummy)
Claus Gittinger <cg@exept.de>
parents:
1740
diff
changeset
|
520 |
|
ccd221469891
more ST80 compatibility (partially dummy)
Claus Gittinger <cg@exept.de>
parents:
1740
diff
changeset
|
521 |
"Modified: 25.1.1997 / 03:20:55 / cg" |
ccd221469891
more ST80 compatibility (partially dummy)
Claus Gittinger <cg@exept.de>
parents:
1740
diff
changeset
|
522 |
"Created: 20.6.1997 / 09:50:06 / cg" |
ccd221469891
more ST80 compatibility (partially dummy)
Claus Gittinger <cg@exept.de>
parents:
1740
diff
changeset
|
523 |
! |
ccd221469891
more ST80 compatibility (partially dummy)
Claus Gittinger <cg@exept.de>
parents:
1740
diff
changeset
|
524 |
|
5165 | 525 |
pixelSize |
526 |
^ pixelSize |
|
527 |
! |
|
528 |
||
1277 | 529 |
pixelSize:aNumber |
5185 | 530 |
"if specified, the size is ignored, and a pixel-sized font is chosen." |
1277 | 531 |
|
5185 | 532 |
pixelSize := aNumber. |
533 |
sizeUnit := #px. |
|
1277 | 534 |
! |
535 |
||
536 |
serif:aBoolean |
|
537 |
"added for ST-80 compatibility; actually ignored currently" |
|
538 |
||
539 |
flags isNil ifTrue:[ |
|
540 |
flags := masks := 0 |
|
541 |
]. |
|
5511
bc18d5eb3527
Support a list of replacement fonts and try each in order
Stefan Vogel <sv@exept.de>
parents:
5441
diff
changeset
|
542 |
aBoolean ifTrue:[ |
bc18d5eb3527
Support a list of replacement fonts and try each in order
Stefan Vogel <sv@exept.de>
parents:
5441
diff
changeset
|
543 |
flags := flags bitOr:SerifFlag. |
bc18d5eb3527
Support a list of replacement fonts and try each in order
Stefan Vogel <sv@exept.de>
parents:
5441
diff
changeset
|
544 |
masks := masks bitOr:SerifFlag |
bc18d5eb3527
Support a list of replacement fonts and try each in order
Stefan Vogel <sv@exept.de>
parents:
5441
diff
changeset
|
545 |
] ifFalse:[ |
bc18d5eb3527
Support a list of replacement fonts and try each in order
Stefan Vogel <sv@exept.de>
parents:
5441
diff
changeset
|
546 |
flags := flags bitClear:SerifFlag. |
bc18d5eb3527
Support a list of replacement fonts and try each in order
Stefan Vogel <sv@exept.de>
parents:
5441
diff
changeset
|
547 |
masks := masks bitClear:SerifFlag. |
bc18d5eb3527
Support a list of replacement fonts and try each in order
Stefan Vogel <sv@exept.de>
parents:
5441
diff
changeset
|
548 |
]. |
1277 | 549 |
|
550 |
"Created: 25.1.1997 / 03:15:17 / cg" |
|
551 |
"Modified: 25.1.1997 / 03:20:59 / cg" |
|
1760
ccd221469891
more ST80 compatibility (partially dummy)
Claus Gittinger <cg@exept.de>
parents:
1740
diff
changeset
|
552 |
! |
ccd221469891
more ST80 compatibility (partially dummy)
Claus Gittinger <cg@exept.de>
parents:
1740
diff
changeset
|
553 |
|
5196 | 554 |
setPixelSize:aNumber |
555 |
pixelSize := aNumber. |
|
556 |
! |
|
557 |
||
1760
ccd221469891
more ST80 compatibility (partially dummy)
Claus Gittinger <cg@exept.de>
parents:
1740
diff
changeset
|
558 |
shadow:aBoolean |
ccd221469891
more ST80 compatibility (partially dummy)
Claus Gittinger <cg@exept.de>
parents:
1740
diff
changeset
|
559 |
"added for ST-80 compatibility; actually ignored currently" |
ccd221469891
more ST80 compatibility (partially dummy)
Claus Gittinger <cg@exept.de>
parents:
1740
diff
changeset
|
560 |
|
ccd221469891
more ST80 compatibility (partially dummy)
Claus Gittinger <cg@exept.de>
parents:
1740
diff
changeset
|
561 |
flags isNil ifTrue:[ |
ccd221469891
more ST80 compatibility (partially dummy)
Claus Gittinger <cg@exept.de>
parents:
1740
diff
changeset
|
562 |
flags := masks := 0 |
ccd221469891
more ST80 compatibility (partially dummy)
Claus Gittinger <cg@exept.de>
parents:
1740
diff
changeset
|
563 |
]. |
5511
bc18d5eb3527
Support a list of replacement fonts and try each in order
Stefan Vogel <sv@exept.de>
parents:
5441
diff
changeset
|
564 |
aBoolean ifTrue:[ |
bc18d5eb3527
Support a list of replacement fonts and try each in order
Stefan Vogel <sv@exept.de>
parents:
5441
diff
changeset
|
565 |
flags := flags bitOr:ShadowFlag. |
bc18d5eb3527
Support a list of replacement fonts and try each in order
Stefan Vogel <sv@exept.de>
parents:
5441
diff
changeset
|
566 |
masks := masks bitOr:ShadowFlag |
bc18d5eb3527
Support a list of replacement fonts and try each in order
Stefan Vogel <sv@exept.de>
parents:
5441
diff
changeset
|
567 |
] ifFalse:[ |
bc18d5eb3527
Support a list of replacement fonts and try each in order
Stefan Vogel <sv@exept.de>
parents:
5441
diff
changeset
|
568 |
flags := flags bitClear:ShadowFlag. |
bc18d5eb3527
Support a list of replacement fonts and try each in order
Stefan Vogel <sv@exept.de>
parents:
5441
diff
changeset
|
569 |
masks := masks bitClear:ShadowFlag. |
bc18d5eb3527
Support a list of replacement fonts and try each in order
Stefan Vogel <sv@exept.de>
parents:
5441
diff
changeset
|
570 |
]. |
1760
ccd221469891
more ST80 compatibility (partially dummy)
Claus Gittinger <cg@exept.de>
parents:
1740
diff
changeset
|
571 |
|
ccd221469891
more ST80 compatibility (partially dummy)
Claus Gittinger <cg@exept.de>
parents:
1740
diff
changeset
|
572 |
"Modified: 25.1.1997 / 03:20:55 / cg" |
ccd221469891
more ST80 compatibility (partially dummy)
Claus Gittinger <cg@exept.de>
parents:
1740
diff
changeset
|
573 |
"Created: 20.6.1997 / 09:51:03 / cg" |
ccd221469891
more ST80 compatibility (partially dummy)
Claus Gittinger <cg@exept.de>
parents:
1740
diff
changeset
|
574 |
! |
ccd221469891
more ST80 compatibility (partially dummy)
Claus Gittinger <cg@exept.de>
parents:
1740
diff
changeset
|
575 |
|
ccd221469891
more ST80 compatibility (partially dummy)
Claus Gittinger <cg@exept.de>
parents:
1740
diff
changeset
|
576 |
strikeout:aBoolean |
ccd221469891
more ST80 compatibility (partially dummy)
Claus Gittinger <cg@exept.de>
parents:
1740
diff
changeset
|
577 |
"added for ST-80 compatibility; actually ignored currently" |
ccd221469891
more ST80 compatibility (partially dummy)
Claus Gittinger <cg@exept.de>
parents:
1740
diff
changeset
|
578 |
|
ccd221469891
more ST80 compatibility (partially dummy)
Claus Gittinger <cg@exept.de>
parents:
1740
diff
changeset
|
579 |
flags isNil ifTrue:[ |
ccd221469891
more ST80 compatibility (partially dummy)
Claus Gittinger <cg@exept.de>
parents:
1740
diff
changeset
|
580 |
flags := masks := 0 |
ccd221469891
more ST80 compatibility (partially dummy)
Claus Gittinger <cg@exept.de>
parents:
1740
diff
changeset
|
581 |
]. |
5511
bc18d5eb3527
Support a list of replacement fonts and try each in order
Stefan Vogel <sv@exept.de>
parents:
5441
diff
changeset
|
582 |
aBoolean ifTrue:[ |
bc18d5eb3527
Support a list of replacement fonts and try each in order
Stefan Vogel <sv@exept.de>
parents:
5441
diff
changeset
|
583 |
flags := flags bitOr:StrikeoutFlag. |
bc18d5eb3527
Support a list of replacement fonts and try each in order
Stefan Vogel <sv@exept.de>
parents:
5441
diff
changeset
|
584 |
masks := masks bitOr:StrikeoutFlag |
bc18d5eb3527
Support a list of replacement fonts and try each in order
Stefan Vogel <sv@exept.de>
parents:
5441
diff
changeset
|
585 |
] ifFalse:[ |
bc18d5eb3527
Support a list of replacement fonts and try each in order
Stefan Vogel <sv@exept.de>
parents:
5441
diff
changeset
|
586 |
flags := flags bitClear:StrikeoutFlag. |
bc18d5eb3527
Support a list of replacement fonts and try each in order
Stefan Vogel <sv@exept.de>
parents:
5441
diff
changeset
|
587 |
masks := masks bitClear:StrikeoutFlag. |
bc18d5eb3527
Support a list of replacement fonts and try each in order
Stefan Vogel <sv@exept.de>
parents:
5441
diff
changeset
|
588 |
]. |
1760
ccd221469891
more ST80 compatibility (partially dummy)
Claus Gittinger <cg@exept.de>
parents:
1740
diff
changeset
|
589 |
|
ccd221469891
more ST80 compatibility (partially dummy)
Claus Gittinger <cg@exept.de>
parents:
1740
diff
changeset
|
590 |
"Modified: 25.1.1997 / 03:20:55 / cg" |
ccd221469891
more ST80 compatibility (partially dummy)
Claus Gittinger <cg@exept.de>
parents:
1740
diff
changeset
|
591 |
"Created: 20.6.1997 / 09:51:36 / cg" |
ccd221469891
more ST80 compatibility (partially dummy)
Claus Gittinger <cg@exept.de>
parents:
1740
diff
changeset
|
592 |
! |
ccd221469891
more ST80 compatibility (partially dummy)
Claus Gittinger <cg@exept.de>
parents:
1740
diff
changeset
|
593 |
|
ccd221469891
more ST80 compatibility (partially dummy)
Claus Gittinger <cg@exept.de>
parents:
1740
diff
changeset
|
594 |
underline:aBoolean |
ccd221469891
more ST80 compatibility (partially dummy)
Claus Gittinger <cg@exept.de>
parents:
1740
diff
changeset
|
595 |
"added for ST-80 compatibility; actually ignored currently" |
ccd221469891
more ST80 compatibility (partially dummy)
Claus Gittinger <cg@exept.de>
parents:
1740
diff
changeset
|
596 |
|
ccd221469891
more ST80 compatibility (partially dummy)
Claus Gittinger <cg@exept.de>
parents:
1740
diff
changeset
|
597 |
flags isNil ifTrue:[ |
ccd221469891
more ST80 compatibility (partially dummy)
Claus Gittinger <cg@exept.de>
parents:
1740
diff
changeset
|
598 |
flags := masks := 0 |
ccd221469891
more ST80 compatibility (partially dummy)
Claus Gittinger <cg@exept.de>
parents:
1740
diff
changeset
|
599 |
]. |
5511
bc18d5eb3527
Support a list of replacement fonts and try each in order
Stefan Vogel <sv@exept.de>
parents:
5441
diff
changeset
|
600 |
aBoolean ifTrue:[ |
bc18d5eb3527
Support a list of replacement fonts and try each in order
Stefan Vogel <sv@exept.de>
parents:
5441
diff
changeset
|
601 |
flags := flags bitOr:UnderlineFlag. |
bc18d5eb3527
Support a list of replacement fonts and try each in order
Stefan Vogel <sv@exept.de>
parents:
5441
diff
changeset
|
602 |
masks := masks bitOr:UnderlineFlag |
bc18d5eb3527
Support a list of replacement fonts and try each in order
Stefan Vogel <sv@exept.de>
parents:
5441
diff
changeset
|
603 |
] ifFalse:[ |
bc18d5eb3527
Support a list of replacement fonts and try each in order
Stefan Vogel <sv@exept.de>
parents:
5441
diff
changeset
|
604 |
flags := flags bitClear:UnderlineFlag. |
bc18d5eb3527
Support a list of replacement fonts and try each in order
Stefan Vogel <sv@exept.de>
parents:
5441
diff
changeset
|
605 |
masks := masks bitClear:UnderlineFlag. |
bc18d5eb3527
Support a list of replacement fonts and try each in order
Stefan Vogel <sv@exept.de>
parents:
5441
diff
changeset
|
606 |
]. |
1760
ccd221469891
more ST80 compatibility (partially dummy)
Claus Gittinger <cg@exept.de>
parents:
1740
diff
changeset
|
607 |
|
ccd221469891
more ST80 compatibility (partially dummy)
Claus Gittinger <cg@exept.de>
parents:
1740
diff
changeset
|
608 |
"Modified: 25.1.1997 / 03:20:55 / cg" |
ccd221469891
more ST80 compatibility (partially dummy)
Claus Gittinger <cg@exept.de>
parents:
1740
diff
changeset
|
609 |
"Created: 20.6.1997 / 09:51:18 / cg" |
1277 | 610 |
! ! |
611 |
||
52 | 612 |
!FontDescription methodsFor:'accessing'! |
613 |
||
2544 | 614 |
device |
615 |
"return the device I am on" |
|
616 |
||
4146 | 617 |
<resource:#obsolete> |
618 |
||
3661 | 619 |
self obsoleteMethodWarning:'use #graphicsDevice'. |
620 |
^ self graphicsDevice |
|
2544 | 621 |
! |
622 |
||
437
a81ce3a8038b
return dummy default encoding & fullNames
Claus Gittinger <cg@exept.de>
parents:
229
diff
changeset
|
623 |
encoding |
575 | 624 |
"return the fonts encoding, as a symbol |
456 | 625 |
such as #'iso8859', #'jis0208.1983' or #ascii. |
626 |
If the fonts encoding is not known, return nil; |
|
627 |
You should assume ascii-encoding then." |
|
437
a81ce3a8038b
return dummy default encoding & fullNames
Claus Gittinger <cg@exept.de>
parents:
229
diff
changeset
|
628 |
|
a81ce3a8038b
return dummy default encoding & fullNames
Claus Gittinger <cg@exept.de>
parents:
229
diff
changeset
|
629 |
^ encoding |
a81ce3a8038b
return dummy default encoding & fullNames
Claus Gittinger <cg@exept.de>
parents:
229
diff
changeset
|
630 |
|
575 | 631 |
"Modified: 20.4.1996 / 23:14:36 / cg" |
437
a81ce3a8038b
return dummy default encoding & fullNames
Claus Gittinger <cg@exept.de>
parents:
229
diff
changeset
|
632 |
! |
a81ce3a8038b
return dummy default encoding & fullNames
Claus Gittinger <cg@exept.de>
parents:
229
diff
changeset
|
633 |
|
a81ce3a8038b
return dummy default encoding & fullNames
Claus Gittinger <cg@exept.de>
parents:
229
diff
changeset
|
634 |
face |
a81ce3a8038b
return dummy default encoding & fullNames
Claus Gittinger <cg@exept.de>
parents:
229
diff
changeset
|
635 |
"return the face, a string" |
a81ce3a8038b
return dummy default encoding & fullNames
Claus Gittinger <cg@exept.de>
parents:
229
diff
changeset
|
636 |
|
a81ce3a8038b
return dummy default encoding & fullNames
Claus Gittinger <cg@exept.de>
parents:
229
diff
changeset
|
637 |
^ face |
a81ce3a8038b
return dummy default encoding & fullNames
Claus Gittinger <cg@exept.de>
parents:
229
diff
changeset
|
638 |
! |
a81ce3a8038b
return dummy default encoding & fullNames
Claus Gittinger <cg@exept.de>
parents:
229
diff
changeset
|
639 |
|
4892
9b15605f58ff
check: bad change of attributes of a REAL font
Claus Gittinger <cg@exept.de>
parents:
4627
diff
changeset
|
640 |
face:aString |
9b15605f58ff
check: bad change of attributes of a REAL font
Claus Gittinger <cg@exept.de>
parents:
4627
diff
changeset
|
641 |
"set the face, a string such as 'bold'" |
9b15605f58ff
check: bad change of attributes of a REAL font
Claus Gittinger <cg@exept.de>
parents:
4627
diff
changeset
|
642 |
|
9b15605f58ff
check: bad change of attributes of a REAL font
Claus Gittinger <cg@exept.de>
parents:
4627
diff
changeset
|
643 |
self assert:(self fontId isNil). "/ cannot change an instanciated font |
9b15605f58ff
check: bad change of attributes of a REAL font
Claus Gittinger <cg@exept.de>
parents:
4627
diff
changeset
|
644 |
face := aString |
9b15605f58ff
check: bad change of attributes of a REAL font
Claus Gittinger <cg@exept.de>
parents:
4627
diff
changeset
|
645 |
|
9b15605f58ff
check: bad change of attributes of a REAL font
Claus Gittinger <cg@exept.de>
parents:
4627
diff
changeset
|
646 |
"Created: 25.1.1997 / 03:12:12 / cg" |
9b15605f58ff
check: bad change of attributes of a REAL font
Claus Gittinger <cg@exept.de>
parents:
4627
diff
changeset
|
647 |
! |
9b15605f58ff
check: bad change of attributes of a REAL font
Claus Gittinger <cg@exept.de>
parents:
4627
diff
changeset
|
648 |
|
437
a81ce3a8038b
return dummy default encoding & fullNames
Claus Gittinger <cg@exept.de>
parents:
229
diff
changeset
|
649 |
family |
a81ce3a8038b
return dummy default encoding & fullNames
Claus Gittinger <cg@exept.de>
parents:
229
diff
changeset
|
650 |
"return the family, a string" |
a81ce3a8038b
return dummy default encoding & fullNames
Claus Gittinger <cg@exept.de>
parents:
229
diff
changeset
|
651 |
|
a81ce3a8038b
return dummy default encoding & fullNames
Claus Gittinger <cg@exept.de>
parents:
229
diff
changeset
|
652 |
^ family |
a81ce3a8038b
return dummy default encoding & fullNames
Claus Gittinger <cg@exept.de>
parents:
229
diff
changeset
|
653 |
! |
a81ce3a8038b
return dummy default encoding & fullNames
Claus Gittinger <cg@exept.de>
parents:
229
diff
changeset
|
654 |
|
1277 | 655 |
family:aString |
656 |
"set the family, a string" |
|
657 |
||
4892
9b15605f58ff
check: bad change of attributes of a REAL font
Claus Gittinger <cg@exept.de>
parents:
4627
diff
changeset
|
658 |
self assert:(self fontId isNil). "/ cannot change an instanciated font |
1277 | 659 |
family := aString |
660 |
||
661 |
"Created: 25.1.1997 / 03:12:12 / cg" |
|
662 |
! |
|
663 |
||
89 | 664 |
family:familyString face:faceString style:styleString size:sizeNum encoding:encodingString |
5169 | 665 |
<resource: #obsolete> |
666 |
"set the instance values" |
|
667 |
||
668 |
self |
|
669 |
family:familyString |
|
670 |
face:faceString |
|
671 |
style:styleString |
|
672 |
size:sizeNum |
|
5185 | 673 |
sizeUnit:#pt |
5169 | 674 |
encoding:encodingString |
675 |
! |
|
676 |
||
5185 | 677 |
family:familyString face:faceString style:styleString size:sizeArg sizeUnit:sizeUnitArg encoding:encodingString |
576 | 678 |
"set the instance values" |
679 |
||
4892
9b15605f58ff
check: bad change of attributes of a REAL font
Claus Gittinger <cg@exept.de>
parents:
4627
diff
changeset
|
680 |
self assert:(self fontId isNil). "/ cannot change an instanciated font |
5185 | 681 |
|
89 | 682 |
family := familyString asSymbol. |
229
099543e5d779
handle empty family/style/encoding strings
Claus Gittinger <cg@exept.de>
parents:
219
diff
changeset
|
683 |
(faceString notNil and:[faceString notEmpty]) ifTrue:[ |
576 | 684 |
face := faceString asSymbol. |
89 | 685 |
]. |
229
099543e5d779
handle empty family/style/encoding strings
Claus Gittinger <cg@exept.de>
parents:
219
diff
changeset
|
686 |
(styleString notNil and:[styleString notEmpty]) ifTrue:[ |
576 | 687 |
style := styleString asSymbol. |
89 | 688 |
]. |
5185 | 689 |
sizeUnit := sizeUnitArg. |
690 |
sizeUnit == #px ifTrue:[ |
|
691 |
pixelSize := sizeArg. |
|
692 |
] ifFalse:[ |
|
693 |
size := sizeArg. |
|
694 |
]. |
|
229
099543e5d779
handle empty family/style/encoding strings
Claus Gittinger <cg@exept.de>
parents:
219
diff
changeset
|
695 |
(encodingString notNil and:[encodingString notEmpty]) ifTrue:[ |
576 | 696 |
encoding := encodingString asSymbol. |
89 | 697 |
] |
229
099543e5d779
handle empty family/style/encoding strings
Claus Gittinger <cg@exept.de>
parents:
219
diff
changeset
|
698 |
|
576 | 699 |
"Modified: 20.4.1996 / 23:19:25 / cg" |
52 | 700 |
! |
701 |
||
5511
bc18d5eb3527
Support a list of replacement fonts and try each in order
Stefan Vogel <sv@exept.de>
parents:
5441
diff
changeset
|
702 |
flags |
bc18d5eb3527
Support a list of replacement fonts and try each in order
Stefan Vogel <sv@exept.de>
parents:
5441
diff
changeset
|
703 |
^ flags |
bc18d5eb3527
Support a list of replacement fonts and try each in order
Stefan Vogel <sv@exept.de>
parents:
5441
diff
changeset
|
704 |
! |
bc18d5eb3527
Support a list of replacement fonts and try each in order
Stefan Vogel <sv@exept.de>
parents:
5441
diff
changeset
|
705 |
|
bc18d5eb3527
Support a list of replacement fonts and try each in order
Stefan Vogel <sv@exept.de>
parents:
5441
diff
changeset
|
706 |
flags:something |
bc18d5eb3527
Support a list of replacement fonts and try each in order
Stefan Vogel <sv@exept.de>
parents:
5441
diff
changeset
|
707 |
flags := something. |
bc18d5eb3527
Support a list of replacement fonts and try each in order
Stefan Vogel <sv@exept.de>
parents:
5441
diff
changeset
|
708 |
! |
bc18d5eb3527
Support a list of replacement fonts and try each in order
Stefan Vogel <sv@exept.de>
parents:
5441
diff
changeset
|
709 |
|
2544 | 710 |
fontId |
711 |
"return the device-dependent font-id" |
|
712 |
||
713 |
^ nil |
|
714 |
||
715 |
||
716 |
! |
|
717 |
||
3661 | 718 |
graphicsDevice |
719 |
"return the device I am on" |
|
720 |
||
721 |
^ nil |
|
722 |
! |
|
723 |
||
5644 | 724 |
hasOverlappingCharacters:aBoolean |
725 |
"set wether this has overlapping chars (for windows cleartype drawing only)" |
|
726 |
||
727 |
flags := (flags ? 0) changeMask:OverlappingCharactersFlag to:aBoolean |
|
728 |
||
729 |
"Created: / 08-11-2010 / 13:16:23 / cg" |
|
730 |
! |
|
731 |
||
5511
bc18d5eb3527
Support a list of replacement fonts and try each in order
Stefan Vogel <sv@exept.de>
parents:
5441
diff
changeset
|
732 |
isGenericFont:aBoolean |
bc18d5eb3527
Support a list of replacement fonts and try each in order
Stefan Vogel <sv@exept.de>
parents:
5441
diff
changeset
|
733 |
"set wether this is a pseudo font" |
bc18d5eb3527
Support a list of replacement fonts and try each in order
Stefan Vogel <sv@exept.de>
parents:
5441
diff
changeset
|
734 |
|
5644 | 735 |
flags := (flags ? 0) changeMask:GenericFlag to:aBoolean |
736 |
||
737 |
"Modified: / 08-11-2010 / 12:58:03 / cg" |
|
5511
bc18d5eb3527
Support a list of replacement fonts and try each in order
Stefan Vogel <sv@exept.de>
parents:
5441
diff
changeset
|
738 |
! |
bc18d5eb3527
Support a list of replacement fonts and try each in order
Stefan Vogel <sv@exept.de>
parents:
5441
diff
changeset
|
739 |
|
1277 | 740 |
manufacturer |
741 |
"return the value of the instance variable 'manufacturer' (automatically generated)" |
|
742 |
||
743 |
^ manufacturer |
|
744 |
||
745 |
"Created: 25.1.1997 / 03:12:43 / cg" |
|
746 |
! |
|
747 |
||
748 |
manufacturer:something |
|
749 |
"set the value of the instance variable 'manufacturer' (automatically generated)" |
|
750 |
||
751 |
manufacturer := something. |
|
752 |
||
753 |
"Created: 25.1.1997 / 03:12:43 / cg" |
|
754 |
! |
|
755 |
||
5511
bc18d5eb3527
Support a list of replacement fonts and try each in order
Stefan Vogel <sv@exept.de>
parents:
5441
diff
changeset
|
756 |
masks |
bc18d5eb3527
Support a list of replacement fonts and try each in order
Stefan Vogel <sv@exept.de>
parents:
5441
diff
changeset
|
757 |
^ masks |
bc18d5eb3527
Support a list of replacement fonts and try each in order
Stefan Vogel <sv@exept.de>
parents:
5441
diff
changeset
|
758 |
! |
bc18d5eb3527
Support a list of replacement fonts and try each in order
Stefan Vogel <sv@exept.de>
parents:
5441
diff
changeset
|
759 |
|
bc18d5eb3527
Support a list of replacement fonts and try each in order
Stefan Vogel <sv@exept.de>
parents:
5441
diff
changeset
|
760 |
masks:something |
bc18d5eb3527
Support a list of replacement fonts and try each in order
Stefan Vogel <sv@exept.de>
parents:
5441
diff
changeset
|
761 |
masks := something. |
bc18d5eb3527
Support a list of replacement fonts and try each in order
Stefan Vogel <sv@exept.de>
parents:
5441
diff
changeset
|
762 |
! |
bc18d5eb3527
Support a list of replacement fonts and try each in order
Stefan Vogel <sv@exept.de>
parents:
5441
diff
changeset
|
763 |
|
5185 | 764 |
sizeUnit |
765 |
"currently returns one of #pt or #px (internal use only)" |
|
766 |
||
767 |
^ sizeUnit ? #pt |
|
768 |
! |
|
769 |
||
437
a81ce3a8038b
return dummy default encoding & fullNames
Claus Gittinger <cg@exept.de>
parents:
229
diff
changeset
|
770 |
style |
a81ce3a8038b
return dummy default encoding & fullNames
Claus Gittinger <cg@exept.de>
parents:
229
diff
changeset
|
771 |
"return the style, a string" |
109 | 772 |
|
437
a81ce3a8038b
return dummy default encoding & fullNames
Claus Gittinger <cg@exept.de>
parents:
229
diff
changeset
|
773 |
^ style |
109 | 774 |
! ! |
775 |
||
776 |
!FontDescription methodsFor:'comparing'! |
|
777 |
||
778 |
= aFont |
|
779 |
"two fonts are considered equal, if the font-name components are; |
|
780 |
independent of the device, the font is on" |
|
781 |
||
782 |
(aFont species == self species) ifTrue:[ |
|
783 |
(size == aFont size) ifTrue:[ |
|
784 |
(family = aFont family) ifTrue:[ |
|
785 |
(face = aFont face) ifTrue:[ |
|
786 |
(style = aFont style) ifTrue:[ |
|
787 |
(encoding == aFont encoding) ifTrue:[ |
|
788 |
^ true |
|
789 |
] |
|
790 |
] |
|
791 |
] |
|
792 |
] |
|
793 |
] |
|
794 |
]. |
|
795 |
^ false |
|
2160 | 796 |
! |
797 |
||
798 |
hash |
|
799 |
"return a number for hashing - req'd since = is redefined." |
|
800 |
||
2771
25c96682a2f3
really avoid LargeInteger arithmetic
Claus Gittinger <cg@exept.de>
parents:
2770
diff
changeset
|
801 |
^ ( (family hash bitAnd:16r1FFFFFFF) |
25c96682a2f3
really avoid LargeInteger arithmetic
Claus Gittinger <cg@exept.de>
parents:
2770
diff
changeset
|
802 |
+ (face hash bitAnd:16r1FFFFFFF) |
25c96682a2f3
really avoid LargeInteger arithmetic
Claus Gittinger <cg@exept.de>
parents:
2770
diff
changeset
|
803 |
+ (style hash bitAnd:16r1FFFFFFF) |
3019
6dc6821c111c
oops - care for fractional size in #hash
Claus Gittinger <cg@exept.de>
parents:
2980
diff
changeset
|
804 |
+ (size ? 0) asInteger) bitAnd:16r3FFFFFFF |
2160 | 805 |
|
806 |
"Created: / 19.6.1998 / 04:19:06 / cg" |
|
2164 | 807 |
"Modified: / 20.6.1998 / 17:04:00 / cg" |
5166 | 808 |
! |
809 |
||
810 |
sameDeviceFontAs:aFont |
|
811 |
(family = aFont family) ifFalse:[ ^ false ]. |
|
812 |
(face = aFont face) ifFalse:[ ^ false ]. |
|
813 |
((style = aFont style) |
|
814 |
or:[ (style = 'italic' and:[aFont style = 'oblique']) |
|
815 |
or:[ style = 'oblique' and:[aFont style = 'italic']]]) ifFalse:[ ^ false ]. |
|
5441 | 816 |
|
5166 | 817 |
(encoding isNil or:[encoding = aFont encoding]) ifFalse:[ ^ false ]. |
5185 | 818 |
(sizeUnit ? #pt) = aFont sizeUnit ifFalse:[ ^ false ]. |
5191 | 819 |
(sizeUnit ? #pt) == #pt ifTrue:[ |
820 |
(size = aFont size) ifFalse:[ ^ false ]. |
|
821 |
] ifFalse:[ |
|
822 |
(pixelSize = aFont pixelSize) ifFalse:[ ^ false ]. |
|
823 |
]. |
|
5166 | 824 |
^ true |
109 | 825 |
! ! |
826 |
||
827 |
!FontDescription methodsFor:'converting'! |
|
828 |
||
829 |
asBold |
|
830 |
"return the bold font corresponding to the receiver" |
|
831 |
||
5511
bc18d5eb3527
Support a list of replacement fonts and try each in order
Stefan Vogel <sv@exept.de>
parents:
5441
diff
changeset
|
832 |
^ self asFace:#bold |
4627
c3992b15969c
asBold / asItalic return device fonts, if the receiver is one.
Claus Gittinger <cg@exept.de>
parents:
4626
diff
changeset
|
833 |
! |
c3992b15969c
asBold / asItalic return device fonts, if the receiver is one.
Claus Gittinger <cg@exept.de>
parents:
4626
diff
changeset
|
834 |
|
5169 | 835 |
asFace:anotherFace |
4894 | 836 |
"return the bold font corresponding to the receiver" |
837 |
||
5511
bc18d5eb3527
Support a list of replacement fonts and try each in order
Stefan Vogel <sv@exept.de>
parents:
5441
diff
changeset
|
838 |
|newFont| |
bc18d5eb3527
Support a list of replacement fonts and try each in order
Stefan Vogel <sv@exept.de>
parents:
5441
diff
changeset
|
839 |
|
4894 | 840 |
family isNil ifTrue:[ |
841 |
"CompoundFonts do not have a family" |
|
842 |
^ self |
|
843 |
]. |
|
5511
bc18d5eb3527
Support a list of replacement fonts and try each in order
Stefan Vogel <sv@exept.de>
parents:
5441
diff
changeset
|
844 |
newFont := self class |
bc18d5eb3527
Support a list of replacement fonts and try each in order
Stefan Vogel <sv@exept.de>
parents:
5441
diff
changeset
|
845 |
family:family |
bc18d5eb3527
Support a list of replacement fonts and try each in order
Stefan Vogel <sv@exept.de>
parents:
5441
diff
changeset
|
846 |
face:anotherFace |
bc18d5eb3527
Support a list of replacement fonts and try each in order
Stefan Vogel <sv@exept.de>
parents:
5441
diff
changeset
|
847 |
style:style |
bc18d5eb3527
Support a list of replacement fonts and try each in order
Stefan Vogel <sv@exept.de>
parents:
5441
diff
changeset
|
848 |
size:(sizeUnit == #px ifTrue:[pixelSize] ifFalse:[size]) |
bc18d5eb3527
Support a list of replacement fonts and try each in order
Stefan Vogel <sv@exept.de>
parents:
5441
diff
changeset
|
849 |
sizeUnit:sizeUnit |
bc18d5eb3527
Support a list of replacement fonts and try each in order
Stefan Vogel <sv@exept.de>
parents:
5441
diff
changeset
|
850 |
encoding:encoding. |
bc18d5eb3527
Support a list of replacement fonts and try each in order
Stefan Vogel <sv@exept.de>
parents:
5441
diff
changeset
|
851 |
newFont isGenericFont:self isGenericFont. |
bc18d5eb3527
Support a list of replacement fonts and try each in order
Stefan Vogel <sv@exept.de>
parents:
5441
diff
changeset
|
852 |
|
bc18d5eb3527
Support a list of replacement fonts and try each in order
Stefan Vogel <sv@exept.de>
parents:
5441
diff
changeset
|
853 |
^ newFont onDevice:self graphicsDevice. |
4894 | 854 |
! |
855 |
||
5169 | 856 |
asFamily:anotherFamily |
4894 | 857 |
"return another font corresponding to the receiver face, style and size but |
858 |
with another family" |
|
859 |
||
860 |
family isNil ifTrue:[ |
|
861 |
"CompoundFonts do not have a family" |
|
862 |
^ self |
|
863 |
]. |
|
864 |
^ (self class |
|
5169 | 865 |
family:anotherFamily |
4894 | 866 |
face:face |
867 |
style:style |
|
5185 | 868 |
size:(sizeUnit == #px ifTrue:[pixelSize] ifFalse:[size]) |
869 |
sizeUnit:sizeUnit |
|
4894 | 870 |
encoding:encoding) onDevice:self graphicsDevice. |
871 |
! |
|
872 |
||
5560 | 873 |
asFontDescription |
874 |
^ self |
|
875 |
! |
|
876 |
||
5196 | 877 |
asFontWithPixelSize:anotherSize |
5185 | 878 |
"return another font corresponding to the receivers family, face and style but |
879 |
with another pixel size" |
|
880 |
||
5511
bc18d5eb3527
Support a list of replacement fonts and try each in order
Stefan Vogel <sv@exept.de>
parents:
5441
diff
changeset
|
881 |
|newFont| |
bc18d5eb3527
Support a list of replacement fonts and try each in order
Stefan Vogel <sv@exept.de>
parents:
5441
diff
changeset
|
882 |
|
5185 | 883 |
family isNil ifTrue:[ |
884 |
"CompoundFonts do not have a family" |
|
885 |
^ self |
|
886 |
]. |
|
5511
bc18d5eb3527
Support a list of replacement fonts and try each in order
Stefan Vogel <sv@exept.de>
parents:
5441
diff
changeset
|
887 |
newFont := self class |
5185 | 888 |
family:family |
889 |
face:face |
|
890 |
style:style |
|
891 |
size:anotherSize |
|
892 |
sizeUnit:#px |
|
5511
bc18d5eb3527
Support a list of replacement fonts and try each in order
Stefan Vogel <sv@exept.de>
parents:
5441
diff
changeset
|
893 |
encoding:encoding. |
bc18d5eb3527
Support a list of replacement fonts and try each in order
Stefan Vogel <sv@exept.de>
parents:
5441
diff
changeset
|
894 |
|
bc18d5eb3527
Support a list of replacement fonts and try each in order
Stefan Vogel <sv@exept.de>
parents:
5441
diff
changeset
|
895 |
newFont isGenericFont:self isGenericFont. |
bc18d5eb3527
Support a list of replacement fonts and try each in order
Stefan Vogel <sv@exept.de>
parents:
5441
diff
changeset
|
896 |
|
bc18d5eb3527
Support a list of replacement fonts and try each in order
Stefan Vogel <sv@exept.de>
parents:
5441
diff
changeset
|
897 |
^ newFont onDevice:self graphicsDevice. |
5185 | 898 |
! |
899 |
||
5196 | 900 |
asItalic |
901 |
"return the italic font corresponding to the receiver" |
|
902 |
||
5511
bc18d5eb3527
Support a list of replacement fonts and try each in order
Stefan Vogel <sv@exept.de>
parents:
5441
diff
changeset
|
903 |
^ self asStyle:#oblique |
5196 | 904 |
! |
905 |
||
5169 | 906 |
asSize:anotherSize |
4894 | 907 |
"return another font corresponding to the receivers family, face and style but |
908 |
with another size" |
|
909 |
||
5511
bc18d5eb3527
Support a list of replacement fonts and try each in order
Stefan Vogel <sv@exept.de>
parents:
5441
diff
changeset
|
910 |
|newFont| |
bc18d5eb3527
Support a list of replacement fonts and try each in order
Stefan Vogel <sv@exept.de>
parents:
5441
diff
changeset
|
911 |
|
4894 | 912 |
family isNil ifTrue:[ |
913 |
"CompoundFonts do not have a family" |
|
914 |
^ self |
|
915 |
]. |
|
5511
bc18d5eb3527
Support a list of replacement fonts and try each in order
Stefan Vogel <sv@exept.de>
parents:
5441
diff
changeset
|
916 |
newFont := self class |
4894 | 917 |
family:family |
918 |
face:face |
|
919 |
style:style |
|
5169 | 920 |
size:anotherSize |
5185 | 921 |
sizeUnit:#pt |
5511
bc18d5eb3527
Support a list of replacement fonts and try each in order
Stefan Vogel <sv@exept.de>
parents:
5441
diff
changeset
|
922 |
encoding:encoding. |
bc18d5eb3527
Support a list of replacement fonts and try each in order
Stefan Vogel <sv@exept.de>
parents:
5441
diff
changeset
|
923 |
|
bc18d5eb3527
Support a list of replacement fonts and try each in order
Stefan Vogel <sv@exept.de>
parents:
5441
diff
changeset
|
924 |
newFont isGenericFont:self isGenericFont. |
bc18d5eb3527
Support a list of replacement fonts and try each in order
Stefan Vogel <sv@exept.de>
parents:
5441
diff
changeset
|
925 |
|
bc18d5eb3527
Support a list of replacement fonts and try each in order
Stefan Vogel <sv@exept.de>
parents:
5441
diff
changeset
|
926 |
^ newFont onDevice:self graphicsDevice. |
4894 | 927 |
! |
928 |
||
5169 | 929 |
asStyle:anotherStyle |
5511
bc18d5eb3527
Support a list of replacement fonts and try each in order
Stefan Vogel <sv@exept.de>
parents:
5441
diff
changeset
|
930 |
|newFont| |
bc18d5eb3527
Support a list of replacement fonts and try each in order
Stefan Vogel <sv@exept.de>
parents:
5441
diff
changeset
|
931 |
|
4894 | 932 |
family isNil ifTrue:[ |
933 |
"CompoundFonts do not have a family" |
|
934 |
^ self |
|
935 |
]. |
|
5511
bc18d5eb3527
Support a list of replacement fonts and try each in order
Stefan Vogel <sv@exept.de>
parents:
5441
diff
changeset
|
936 |
newFont := self class |
4894 | 937 |
family:family |
938 |
face:face |
|
5169 | 939 |
style:anotherStyle |
5185 | 940 |
size:(sizeUnit == #px ifTrue:[pixelSize] ifFalse:[size]) |
941 |
sizeUnit:sizeUnit |
|
5511
bc18d5eb3527
Support a list of replacement fonts and try each in order
Stefan Vogel <sv@exept.de>
parents:
5441
diff
changeset
|
942 |
encoding:encoding. |
4894 | 943 |
|
5511
bc18d5eb3527
Support a list of replacement fonts and try each in order
Stefan Vogel <sv@exept.de>
parents:
5441
diff
changeset
|
944 |
newFont isGenericFont:self isGenericFont. |
bc18d5eb3527
Support a list of replacement fonts and try each in order
Stefan Vogel <sv@exept.de>
parents:
5441
diff
changeset
|
945 |
|
bc18d5eb3527
Support a list of replacement fonts and try each in order
Stefan Vogel <sv@exept.de>
parents:
5441
diff
changeset
|
946 |
^ newFont onDevice:self graphicsDevice. |
4894 | 947 |
"Modified: / 27-09-2006 / 13:08:11 / cg" |
948 |
! |
|
949 |
||
4297
10b461a37e26
added encoding to literal vector
Claus Gittinger <cg@exept.de>
parents:
4146
diff
changeset
|
950 |
fromLiteralArrayEncoding:literalEncoding |
2436 | 951 |
"read my contents from a aLiteralEncodedArray. |
952 |
Must match to what is generated in #literalArrayEncoding" |
|
1740 | 953 |
|
4297
10b461a37e26
added encoding to literal vector
Claus Gittinger <cg@exept.de>
parents:
4146
diff
changeset
|
954 |
family := literalEncoding at:2. |
10b461a37e26
added encoding to literal vector
Claus Gittinger <cg@exept.de>
parents:
4146
diff
changeset
|
955 |
face := literalEncoding at:3. |
10b461a37e26
added encoding to literal vector
Claus Gittinger <cg@exept.de>
parents:
4146
diff
changeset
|
956 |
style := literalEncoding at:4. |
10b461a37e26
added encoding to literal vector
Claus Gittinger <cg@exept.de>
parents:
4146
diff
changeset
|
957 |
size := literalEncoding at:5. |
5169 | 958 |
"/ the following kludge is for backward compatibility |
959 |
"/ do not cleanup !! |
|
4297
10b461a37e26
added encoding to literal vector
Claus Gittinger <cg@exept.de>
parents:
4146
diff
changeset
|
960 |
literalEncoding size > 5 ifTrue:[ |
5169 | 961 |
literalEncoding size > 6 ifTrue:[ |
5185 | 962 |
sizeUnit := literalEncoding at:7. |
963 |
literalEncoding size > 7 ifTrue:[ |
|
964 |
pixelSize := literalEncoding at:8. |
|
965 |
]. |
|
5169 | 966 |
]. |
4297
10b461a37e26
added encoding to literal vector
Claus Gittinger <cg@exept.de>
parents:
4146
diff
changeset
|
967 |
encoding := literalEncoding at:6 |
4298 | 968 |
] ifFalse:[ |
969 |
encoding := #'iso8859-1' |
|
4297
10b461a37e26
added encoding to literal vector
Claus Gittinger <cg@exept.de>
parents:
4146
diff
changeset
|
970 |
]. |
1740 | 971 |
! |
972 |
||
973 |
literalArrayEncoding |
|
2436 | 974 |
"return myself encoded as a literal array. |
975 |
Must match to what is expected in #fromLiteralArrayEncoding:" |
|
1740 | 976 |
|
4298 | 977 |
|myName| |
978 |
||
4532 | 979 |
myName := self class name. |
5169 | 980 |
"/ see comment in #fromLiteralArrayEncoding |
981 |
"/ do not cleanup !! |
|
982 |
(pixelSize isNil |
|
983 |
and:[ encoding == #'iso8859-1' ]) ifTrue:[ |
|
4298 | 984 |
^ Array |
985 |
with:myName |
|
986 |
with:family |
|
987 |
with:face |
|
988 |
with:style |
|
989 |
with:size |
|
990 |
]. |
|
5185 | 991 |
(pixelSize isNil and:[self sizeUnit == #pt]) ifTrue:[ |
5169 | 992 |
^ Array |
993 |
with:myName |
|
994 |
with:family |
|
995 |
with:face |
|
996 |
with:style |
|
997 |
with:size |
|
998 |
with:encoding |
|
999 |
]. |
|
1740 | 1000 |
^ Array |
4298 | 1001 |
with:myName |
1740 | 1002 |
with:family |
1003 |
with:face |
|
1004 |
with:style |
|
1005 |
with:size |
|
4297
10b461a37e26
added encoding to literal vector
Claus Gittinger <cg@exept.de>
parents:
4146
diff
changeset
|
1006 |
with:encoding |
5185 | 1007 |
with:sizeUnit |
5169 | 1008 |
with:pixelSize |
1740 | 1009 |
! |
1010 |
||
437
a81ce3a8038b
return dummy default encoding & fullNames
Claus Gittinger <cg@exept.de>
parents:
229
diff
changeset
|
1011 |
on:aDevice |
a81ce3a8038b
return dummy default encoding & fullNames
Claus Gittinger <cg@exept.de>
parents:
229
diff
changeset
|
1012 |
"given the receiver, return a device Font" |
a81ce3a8038b
return dummy default encoding & fullNames
Claus Gittinger <cg@exept.de>
parents:
229
diff
changeset
|
1013 |
|
3623 | 1014 |
"/ send out a warning: #on: is typically used to create views |
1015 |
"/ operating on a model. |
|
1016 |
"/ Please use #onDevice: to avoid confusion. |
|
1017 |
||
1018 |
<resource:#obsolete> |
|
1019 |
||
1020 |
self obsoleteMethodWarning:'use #onDevice:'. |
|
3629 | 1021 |
^ self onDevice:aDevice. |
437
a81ce3a8038b
return dummy default encoding & fullNames
Claus Gittinger <cg@exept.de>
parents:
229
diff
changeset
|
1022 |
! |
a81ce3a8038b
return dummy default encoding & fullNames
Claus Gittinger <cg@exept.de>
parents:
229
diff
changeset
|
1023 |
|
1497
697ac9b15962
added #onDevice: for protocol completeness.
Claus Gittinger <cg@exept.de>
parents:
1277
diff
changeset
|
1024 |
onDevice:aDevice |
697ac9b15962
added #onDevice: for protocol completeness.
Claus Gittinger <cg@exept.de>
parents:
1277
diff
changeset
|
1025 |
"given the receiver, return a device Font" |
697ac9b15962
added #onDevice: for protocol completeness.
Claus Gittinger <cg@exept.de>
parents:
1277
diff
changeset
|
1026 |
|
5511
bc18d5eb3527
Support a list of replacement fonts and try each in order
Stefan Vogel <sv@exept.de>
parents:
5441
diff
changeset
|
1027 |
|newFont| |
bc18d5eb3527
Support a list of replacement fonts and try each in order
Stefan Vogel <sv@exept.de>
parents:
5441
diff
changeset
|
1028 |
|
2980
409e9547a45c
ignore nil device in #onDevice:
Claus Gittinger <cg@exept.de>
parents:
2934
diff
changeset
|
1029 |
aDevice isNil ifTrue:[^ self]. |
5511
bc18d5eb3527
Support a list of replacement fonts and try each in order
Stefan Vogel <sv@exept.de>
parents:
5441
diff
changeset
|
1030 |
newFont := Font |
3629 | 1031 |
family:family |
1032 |
face:face |
|
1033 |
style:style |
|
5185 | 1034 |
size:(sizeUnit == #px ifTrue:[pixelSize] ifFalse:[size]) |
1035 |
sizeUnit:sizeUnit |
|
5511
bc18d5eb3527
Support a list of replacement fonts and try each in order
Stefan Vogel <sv@exept.de>
parents:
5441
diff
changeset
|
1036 |
encoding:encoding. |
bc18d5eb3527
Support a list of replacement fonts and try each in order
Stefan Vogel <sv@exept.de>
parents:
5441
diff
changeset
|
1037 |
|
bc18d5eb3527
Support a list of replacement fonts and try each in order
Stefan Vogel <sv@exept.de>
parents:
5441
diff
changeset
|
1038 |
newFont flags:flags. |
1497
697ac9b15962
added #onDevice: for protocol completeness.
Claus Gittinger <cg@exept.de>
parents:
1277
diff
changeset
|
1039 |
|
5535 | 1040 |
"SR: |
1041 |
old code is commented below, |
|
1042 |
someone has forgotten to set the incoming argument device, |
|
1043 |
why using the device from the old font??? is this a mistake??? |
|
1044 |
at least the naming of this method wants a new font on given device...." |
|
1045 |
^ newFont onDevice:aDevice. |
|
1046 |
"/ ^ newFont onDevice:self graphicsDevice. |
|
5511
bc18d5eb3527
Support a list of replacement fonts and try each in order
Stefan Vogel <sv@exept.de>
parents:
5441
diff
changeset
|
1047 |
|
bc18d5eb3527
Support a list of replacement fonts and try each in order
Stefan Vogel <sv@exept.de>
parents:
5441
diff
changeset
|
1048 |
"Created: 28.3.1997 / 16:09:30 / cg" |
1497
697ac9b15962
added #onDevice: for protocol completeness.
Claus Gittinger <cg@exept.de>
parents:
1277
diff
changeset
|
1049 |
! |
697ac9b15962
added #onDevice: for protocol completeness.
Claus Gittinger <cg@exept.de>
parents:
1277
diff
changeset
|
1050 |
|
5169 | 1051 |
size:anotherSize |
1052 |
<resource: #obsolete> |
|
1053 |
||
109 | 1054 |
"return a font corresponding to the receiver, but with different size." |
1055 |
||
5169 | 1056 |
self obsoleteMethodWarning:'use #asSize:'. |
1057 |
||
109 | 1058 |
^ self class |
5169 | 1059 |
family:family |
1060 |
face:face |
|
1061 |
style:style |
|
5185 | 1062 |
size:anotherSize |
1063 |
sizeUnit:#pt |
|
5169 | 1064 |
encoding:encoding |
109 | 1065 |
! ! |
1066 |
||
2544 | 1067 |
!FontDescription methodsFor:'displaying'! |
1068 |
||
1069 |
displayOpaqueString:aString from:index1 to:index2 x:x y:y in:aGC |
|
3663 | 1070 |
"display a partial string at some position in aGC. |
1071 |
- display part of a string, drawing both fore- and background pixels" |
|
2544 | 1072 |
|
3663 | 1073 |
self displayString:aString from:index1 to:index2 x:x y:y in:aGC opaque:true |
2544 | 1074 |
! |
1075 |
||
1076 |
displayOpaqueString:aString x:x y:y in:aGC |
|
1077 |
"display a string at some position in aGC." |
|
1078 |
||
1079 |
self displayOpaqueString:aString from:1 to:aString size x:x y:y in:aGC |
|
1080 |
! |
|
1081 |
||
1082 |
displayString:aString from:index1 to:index2 x:x y:y in:aGC |
|
1083 |
"display a partial string at some position in aGC." |
|
1084 |
||
3663 | 1085 |
self displayString:aString from:index1 to:index2 x:x y:y in:aGC opaque:false |
1086 |
! |
|
1087 |
||
1088 |
displayString:aString from:index1 to:index2 x:x y:y in:aGC opaque:opaque |
|
1089 |
"display a partial string at some position in aGC." |
|
1090 |
||
2544 | 1091 |
self subclassResponsibility |
1092 |
! |
|
1093 |
||
1094 |
displayString:aString x:x y:y in:aGC |
|
1095 |
"display a string at some position in aGC." |
|
1096 |
||
1097 |
self displayString:aString from:1 to:aString size x:x y:y in:aGC |
|
1098 |
||
1099 |
! ! |
|
1100 |
||
437
a81ce3a8038b
return dummy default encoding & fullNames
Claus Gittinger <cg@exept.de>
parents:
229
diff
changeset
|
1101 |
!FontDescription methodsFor:'errors'! |
109 | 1102 |
|
437
a81ce3a8038b
return dummy default encoding & fullNames
Claus Gittinger <cg@exept.de>
parents:
229
diff
changeset
|
1103 |
errorNoDevice |
a81ce3a8038b
return dummy default encoding & fullNames
Claus Gittinger <cg@exept.de>
parents:
229
diff
changeset
|
1104 |
"a query was made for device-specific info" |
109 | 1105 |
|
437
a81ce3a8038b
return dummy default encoding & fullNames
Claus Gittinger <cg@exept.de>
parents:
229
diff
changeset
|
1106 |
" |
a81ce3a8038b
return dummy default encoding & fullNames
Claus Gittinger <cg@exept.de>
parents:
229
diff
changeset
|
1107 |
this happens, when you ask a font for its height or width, |
a81ce3a8038b
return dummy default encoding & fullNames
Claus Gittinger <cg@exept.de>
parents:
229
diff
changeset
|
1108 |
ascent or any other dimension which depends on the device on |
a81ce3a8038b
return dummy default encoding & fullNames
Claus Gittinger <cg@exept.de>
parents:
229
diff
changeset
|
1109 |
which the font is rendered, AND the receiver font is not (yet) |
a81ce3a8038b
return dummy default encoding & fullNames
Claus Gittinger <cg@exept.de>
parents:
229
diff
changeset
|
1110 |
associated to a device. |
a81ce3a8038b
return dummy default encoding & fullNames
Claus Gittinger <cg@exept.de>
parents:
229
diff
changeset
|
1111 |
You should always use |
3159 | 1112 |
font := font on:someDevice |
437
a81ce3a8038b
return dummy default encoding & fullNames
Claus Gittinger <cg@exept.de>
parents:
229
diff
changeset
|
1113 |
to get a device font, before asking for device specifics. |
a81ce3a8038b
return dummy default encoding & fullNames
Claus Gittinger <cg@exept.de>
parents:
229
diff
changeset
|
1114 |
" |
3159 | 1115 |
self error:'query device independent font for device specific info' |
1116 |
||
1117 |
"Modified: / 27.1.2000 / 16:55:05 / stefan" |
|
437
a81ce3a8038b
return dummy default encoding & fullNames
Claus Gittinger <cg@exept.de>
parents:
229
diff
changeset
|
1118 |
! ! |
a81ce3a8038b
return dummy default encoding & fullNames
Claus Gittinger <cg@exept.de>
parents:
229
diff
changeset
|
1119 |
|
3785 | 1120 |
!FontDescription methodsFor:'getting a device font'! |
1121 |
||
1122 |
onDevice:aDevice ifAbsent:exceptionBlock |
|
1123 |
"create a new Font representing the same font as |
|
1124 |
myself on aDevice. This does NOT try to look for existing |
|
1125 |
or replacement fonts (i.e. can be used to get physical fonts)." |
|
1126 |
||
1127 |
|newFont id| |
|
1128 |
||
1129 |
"ask that device for the font" |
|
5166 | 1130 |
id := aDevice |
1131 |
getFontWithFamily:family |
|
1132 |
face:face |
|
1133 |
style:style |
|
5185 | 1134 |
size:(sizeUnit == #px ifTrue:[pixelSize] ifFalse:[size]) |
1135 |
sizeUnit:sizeUnit |
|
5166 | 1136 |
encoding:encoding. |
3785 | 1137 |
id isNil ifTrue:[ |
1138 |
"oops did not work - (device has no such font)" |
|
1139 |
||
1140 |
^ exceptionBlock value |
|
1141 |
]. |
|
1142 |
||
1143 |
newFont := (Font basicNew) |
|
1144 |
setFamily:family |
|
1145 |
face:face |
|
1146 |
style:style |
|
5185 | 1147 |
size:(sizeUnit == #px ifTrue:[pixelSize] ifFalse:[size]) |
1148 |
sizeUnit:sizeUnit |
|
3785 | 1149 |
encoding:encoding |
1150 |
device:aDevice. |
|
1151 |
newFont setFontId:id. |
|
1152 |
newFont getFontInfos. |
|
1153 |
aDevice registerFont:newFont. |
|
1154 |
^ newFont |
|
1155 |
! ! |
|
1156 |
||
1618 | 1157 |
!FontDescription methodsFor:'printing & storing'! |
1158 |
||
3991 | 1159 |
printOn:aStream |
1160 |
"append a user-friendly representation of the receiver to aStream" |
|
1161 |
||
1162 |
aStream nextPutAll:self userFriendlyName |
|
1163 |
! |
|
1164 |
||
1618 | 1165 |
userFriendlyName |
1166 |
"return a user-friendly printed representation of the receiver" |
|
1167 |
||
1168 |
|nm| |
|
1169 |
||
1170 |
nm := family. |
|
1171 |
face notNil ifTrue:[ |
|
1172 |
nm := nm , '-', face. |
|
1173 |
]. |
|
1174 |
style notNil ifTrue:[ |
|
1175 |
nm := nm , '-', style. |
|
1176 |
]. |
|
1177 |
size notNil ifTrue:[ |
|
1178 |
nm := nm , '-', size printString. |
|
1179 |
]. |
|
1180 |
encoding notNil ifTrue:[ |
|
3991 | 1181 |
nm := nm , '(', encoding , ')'. |
1618 | 1182 |
]. |
1183 |
^ nm |
|
1184 |
||
1185 |
" |
|
1186 |
View defaultFont userFriendlyName |
|
1187 |
Button defaultFont userFriendlyName |
|
1188 |
" |
|
1189 |
||
1190 |
"Modified: 20.4.1996 / 23:25:36 / cg" |
|
1191 |
"Created: 19.4.1997 / 18:09:25 / cg" |
|
1192 |
! ! |
|
1193 |
||
437
a81ce3a8038b
return dummy default encoding & fullNames
Claus Gittinger <cg@exept.de>
parents:
229
diff
changeset
|
1194 |
!FontDescription methodsFor:'queries'! |
a81ce3a8038b
return dummy default encoding & fullNames
Claus Gittinger <cg@exept.de>
parents:
229
diff
changeset
|
1195 |
|
a81ce3a8038b
return dummy default encoding & fullNames
Claus Gittinger <cg@exept.de>
parents:
229
diff
changeset
|
1196 |
bold |
a81ce3a8038b
return dummy default encoding & fullNames
Claus Gittinger <cg@exept.de>
parents:
229
diff
changeset
|
1197 |
"return true, if the receiver is a bold font - |
1585 | 1198 |
Added for st-80 compatibility." |
1199 |
||
1200 |
"/ Currently, this implementation is a dirty hack and will be changed soon. |
|
437
a81ce3a8038b
return dummy default encoding & fullNames
Claus Gittinger <cg@exept.de>
parents:
229
diff
changeset
|
1201 |
|
1275 | 1202 |
^ face = 'bold' |
1203 |
||
1585 | 1204 |
"Modified: 11.4.1997 / 21:31:25 / cg" |
437
a81ce3a8038b
return dummy default encoding & fullNames
Claus Gittinger <cg@exept.de>
parents:
229
diff
changeset
|
1205 |
! |
a81ce3a8038b
return dummy default encoding & fullNames
Claus Gittinger <cg@exept.de>
parents:
229
diff
changeset
|
1206 |
|
a81ce3a8038b
return dummy default encoding & fullNames
Claus Gittinger <cg@exept.de>
parents:
229
diff
changeset
|
1207 |
boldness |
a81ce3a8038b
return dummy default encoding & fullNames
Claus Gittinger <cg@exept.de>
parents:
229
diff
changeset
|
1208 |
"return the boldness of the characters in this font 0 .. 1 - |
1275 | 1209 |
Added for st-80 compatibility" |
437
a81ce3a8038b
return dummy default encoding & fullNames
Claus Gittinger <cg@exept.de>
parents:
229
diff
changeset
|
1210 |
|
1585 | 1211 |
"/ Currently, this implementation is a dirty hack and will be changed soon. |
1212 |
||
1213 |
face = 'roman' ifTrue:[^ 0.5]. |
|
1214 |
face = 'normal' ifTrue:[^ 0.5]. |
|
1215 |
face = 'bold' ifTrue:[^ 0.75]. |
|
1216 |
face = 'light' ifTrue:[^ 0.25]. |
|
437
a81ce3a8038b
return dummy default encoding & fullNames
Claus Gittinger <cg@exept.de>
parents:
229
diff
changeset
|
1217 |
^ 0.5 |
1275 | 1218 |
|
1585 | 1219 |
"Modified: 11.4.1997 / 21:31:31 / cg" |
1275 | 1220 |
! |
1221 |
||
1222 |
color |
|
1223 |
"return the default color in which this font is to be rendered. |
|
1224 |
Added for st-80 compatibility. |
|
1225 |
For now always black." |
|
1226 |
||
1227 |
^ Color black |
|
1228 |
||
1229 |
"Created: 25.1.1997 / 02:59:15 / cg" |
|
1230 |
"Modified: 25.1.1997 / 03:02:14 / cg" |
|
437
a81ce3a8038b
return dummy default encoding & fullNames
Claus Gittinger <cg@exept.de>
parents:
229
diff
changeset
|
1231 |
! |
a81ce3a8038b
return dummy default encoding & fullNames
Claus Gittinger <cg@exept.de>
parents:
229
diff
changeset
|
1232 |
|
2544 | 1233 |
existsOn:aDevice |
1234 |
"return true, if the recevier is available on aDevice; |
|
1235 |
false otherwise. This is a kludge method; its better to |
|
1236 |
ask a device for its available fonts and use this info ... |
|
1237 |
Notice, that if you simply use a font by name, the system |
|
1238 |
will automatically take a replacement font." |
|
1239 |
||
3629 | 1240 |
^ ((Font |
1241 |
family:family |
|
1242 |
face:face |
|
1243 |
style:style |
|
5185 | 1244 |
size:(sizeUnit == #px ifTrue:[pixelSize] ifFalse:[size]) |
1245 |
sizeUnit:sizeUnit |
|
3629 | 1246 |
encoding:encoding) onDevice:aDevice ifAbsent:nil) notNil |
2544 | 1247 |
! |
1248 |
||
437
a81ce3a8038b
return dummy default encoding & fullNames
Claus Gittinger <cg@exept.de>
parents:
229
diff
changeset
|
1249 |
fullName |
a81ce3a8038b
return dummy default encoding & fullNames
Claus Gittinger <cg@exept.de>
parents:
229
diff
changeset
|
1250 |
^ nil |
a81ce3a8038b
return dummy default encoding & fullNames
Claus Gittinger <cg@exept.de>
parents:
229
diff
changeset
|
1251 |
|
a81ce3a8038b
return dummy default encoding & fullNames
Claus Gittinger <cg@exept.de>
parents:
229
diff
changeset
|
1252 |
"Created: 23.2.1996 / 00:45:45 / cg" |
a81ce3a8038b
return dummy default encoding & fullNames
Claus Gittinger <cg@exept.de>
parents:
229
diff
changeset
|
1253 |
! |
a81ce3a8038b
return dummy default encoding & fullNames
Claus Gittinger <cg@exept.de>
parents:
229
diff
changeset
|
1254 |
|
5644 | 1255 |
hasOverlappingCharacters |
1256 |
"answer true, if this is a windows font where characters overlap" |
|
1257 |
||
1258 |
^ flags notNil and:[ flags bitTest:OverlappingCharactersFlag ]. |
|
1259 |
||
1260 |
"Created: / 08-11-2010 / 13:16:51 / cg" |
|
1261 |
! |
|
1262 |
||
5511
bc18d5eb3527
Support a list of replacement fonts and try each in order
Stefan Vogel <sv@exept.de>
parents:
5441
diff
changeset
|
1263 |
isGenericFont |
bc18d5eb3527
Support a list of replacement fonts and try each in order
Stefan Vogel <sv@exept.de>
parents:
5441
diff
changeset
|
1264 |
"answer true, if this is a pseudo font" |
bc18d5eb3527
Support a list of replacement fonts and try each in order
Stefan Vogel <sv@exept.de>
parents:
5441
diff
changeset
|
1265 |
|
bc18d5eb3527
Support a list of replacement fonts and try each in order
Stefan Vogel <sv@exept.de>
parents:
5441
diff
changeset
|
1266 |
^ flags notNil and:[ flags bitTest:GenericFlag ]. |
bc18d5eb3527
Support a list of replacement fonts and try each in order
Stefan Vogel <sv@exept.de>
parents:
5441
diff
changeset
|
1267 |
! |
bc18d5eb3527
Support a list of replacement fonts and try each in order
Stefan Vogel <sv@exept.de>
parents:
5441
diff
changeset
|
1268 |
|
bc18d5eb3527
Support a list of replacement fonts and try each in order
Stefan Vogel <sv@exept.de>
parents:
5441
diff
changeset
|
1269 |
isScaledFont |
bc18d5eb3527
Support a list of replacement fonts and try each in order
Stefan Vogel <sv@exept.de>
parents:
5441
diff
changeset
|
1270 |
^ size = 0 |
bc18d5eb3527
Support a list of replacement fonts and try each in order
Stefan Vogel <sv@exept.de>
parents:
5441
diff
changeset
|
1271 |
! |
bc18d5eb3527
Support a list of replacement fonts and try each in order
Stefan Vogel <sv@exept.de>
parents:
5441
diff
changeset
|
1272 |
|
437
a81ce3a8038b
return dummy default encoding & fullNames
Claus Gittinger <cg@exept.de>
parents:
229
diff
changeset
|
1273 |
italic |
a81ce3a8038b
return dummy default encoding & fullNames
Claus Gittinger <cg@exept.de>
parents:
229
diff
changeset
|
1274 |
"return true if this is an italic font - |
1585 | 1275 |
Added for st-80 compatibility" |
437
a81ce3a8038b
return dummy default encoding & fullNames
Claus Gittinger <cg@exept.de>
parents:
229
diff
changeset
|
1276 |
|
1585 | 1277 |
"/ Currently, this implementation is a dirty hack and will be changed soon. |
1278 |
||
1279 |
style = 'italic' ifTrue:[^ true]. |
|
3246 | 1280 |
style = 'oblique' ifTrue:[^ true]. |
437
a81ce3a8038b
return dummy default encoding & fullNames
Claus Gittinger <cg@exept.de>
parents:
229
diff
changeset
|
1281 |
^ false |
1275 | 1282 |
|
1585 | 1283 |
"Modified: 11.4.1997 / 21:31:42 / cg" |
437
a81ce3a8038b
return dummy default encoding & fullNames
Claus Gittinger <cg@exept.de>
parents:
229
diff
changeset
|
1284 |
! |
a81ce3a8038b
return dummy default encoding & fullNames
Claus Gittinger <cg@exept.de>
parents:
229
diff
changeset
|
1285 |
|
a81ce3a8038b
return dummy default encoding & fullNames
Claus Gittinger <cg@exept.de>
parents:
229
diff
changeset
|
1286 |
serif |
1275 | 1287 |
"return true, if this font has serifs. |
1585 | 1288 |
Added for st-80 compatibility" |
437
a81ce3a8038b
return dummy default encoding & fullNames
Claus Gittinger <cg@exept.de>
parents:
229
diff
changeset
|
1289 |
|
1585 | 1290 |
"/ Currently, this implementation is a dirty hack and will be changed soon. |
437
a81ce3a8038b
return dummy default encoding & fullNames
Claus Gittinger <cg@exept.de>
parents:
229
diff
changeset
|
1291 |
|
a81ce3a8038b
return dummy default encoding & fullNames
Claus Gittinger <cg@exept.de>
parents:
229
diff
changeset
|
1292 |
family = 'Times' ifTrue:[^ true]. |
a81ce3a8038b
return dummy default encoding & fullNames
Claus Gittinger <cg@exept.de>
parents:
229
diff
changeset
|
1293 |
family = 'times' ifTrue:[^ true]. |
a81ce3a8038b
return dummy default encoding & fullNames
Claus Gittinger <cg@exept.de>
parents:
229
diff
changeset
|
1294 |
^ false. |
1275 | 1295 |
|
1585 | 1296 |
"Modified: 11.4.1997 / 21:31:51 / cg" |
437
a81ce3a8038b
return dummy default encoding & fullNames
Claus Gittinger <cg@exept.de>
parents:
229
diff
changeset
|
1297 |
! |
a81ce3a8038b
return dummy default encoding & fullNames
Claus Gittinger <cg@exept.de>
parents:
229
diff
changeset
|
1298 |
|
3265 | 1299 |
size |
1300 |
"return the size, a number" |
|
1301 |
||
1302 |
^ size |
|
1303 |
! |
|
1304 |
||
437
a81ce3a8038b
return dummy default encoding & fullNames
Claus Gittinger <cg@exept.de>
parents:
229
diff
changeset
|
1305 |
species |
a81ce3a8038b
return dummy default encoding & fullNames
Claus Gittinger <cg@exept.de>
parents:
229
diff
changeset
|
1306 |
^ Font |
1275 | 1307 |
! |
1308 |
||
1309 |
underline |
|
1310 |
"return true if this is an underlined font - |
|
1311 |
Added for st-80 compatibility |
|
1312 |
(always false here)" |
|
1313 |
||
1314 |
^ false |
|
1315 |
||
1316 |
"Created: 25.1.1997 / 02:58:30 / cg" |
|
1317 |
"Modified: 25.1.1997 / 03:01:12 / cg" |
|
437
a81ce3a8038b
return dummy default encoding & fullNames
Claus Gittinger <cg@exept.de>
parents:
229
diff
changeset
|
1318 |
! ! |
a81ce3a8038b
return dummy default encoding & fullNames
Claus Gittinger <cg@exept.de>
parents:
229
diff
changeset
|
1319 |
|
2544 | 1320 |
!FontDescription methodsFor:'queries-dimensions'! |
1321 |
||
1322 |
ascent |
|
1323 |
"return the ascent - the number of pixels above the baseLine." |
|
1324 |
||
1325 |
^ self subclassResponsibility |
|
1326 |
! |
|
1327 |
||
1328 |
ascentOn:aDevice |
|
1329 |
"return the ascent - the number of pixels above the baseLine." |
|
1330 |
||
1331 |
^ (self onDevice:aDevice) ascent |
|
1332 |
! |
|
1333 |
||
1334 |
descent |
|
1335 |
"return the descent - the number of pixels below the baseLine." |
|
1336 |
||
1337 |
^ self subclassResponsibility |
|
1338 |
! |
|
1339 |
||
1340 |
descentOn:aDevice |
|
1341 |
"return the ascent - the number of pixels above the baseLine." |
|
1342 |
||
1343 |
^ (self onDevice:aDevice) descent |
|
1344 |
||
1345 |
||
1346 |
! |
|
1347 |
||
1348 |
height |
|
1349 |
"return the height - the number of pixels above plus below the baseLine." |
|
1350 |
||
1351 |
^ self subclassResponsibility |
|
1352 |
! |
|
1353 |
||
1354 |
heightOf:aString |
|
1355 |
"return the height of the given string. |
|
1356 |
Here, assume the characters are of constant height" |
|
1357 |
||
1358 |
^ self height |
|
1359 |
! |
|
1360 |
||
1361 |
heightOf:aString on:aDevice |
|
1362 |
"return the height of the given string on the given device." |
|
1363 |
||
1364 |
^ (self onDevice:aDevice) heightOf:aString |
|
1365 |
! |
|
1366 |
||
1367 |
heightOn:aDevice |
|
1368 |
"return the height - the number of pixels above PLUS below the baseLine." |
|
1369 |
||
1370 |
^ (self onDevice:aDevice) height |
|
1371 |
! |
|
1372 |
||
1373 |
isFixedWidth |
|
1374 |
"return true, if this is a fixed pitch font (i.e. all characters |
|
1375 |
are of the same width)" |
|
1376 |
||
1377 |
self subclassResponsibility |
|
1378 |
! |
|
1379 |
||
1380 |
maxAscent |
|
1381 |
"return the fonts maximum-ascent (i.e. the maximum of all characters); |
|
1382 |
That is the number of units (usually pixels) above the baseline." |
|
1383 |
||
1384 |
^ self subclassResponsibility |
|
1385 |
||
1386 |
! |
|
1387 |
||
1388 |
maxDescent |
|
1389 |
"return the fonts maximum-descent (i.e. the maximum of all characters); |
|
1390 |
That is the number of units (usually pixels) below the baseline." |
|
1391 |
||
1392 |
^ self subclassResponsibility |
|
1393 |
||
1394 |
! |
|
1395 |
||
1396 |
maxHeight |
|
1397 |
"return the fonts characters maximum height; |
|
1398 |
That is the number of units (usually pixels)." |
|
1399 |
||
1400 |
^ self maxAscent + self maxDescent |
|
1401 |
||
1402 |
! |
|
1403 |
||
1404 |
maxWidth |
|
1405 |
"return the fonts maximum-width character (i.e. the maximum of all characters); |
|
1406 |
That is a number of units (usually pixels)." |
|
1407 |
||
1408 |
^ self subclassResponsibility |
|
1409 |
||
1410 |
! |
|
1411 |
||
1412 |
width |
|
1413 |
"return the fonts characters width; |
|
1414 |
That is a number of units (usually pixels). |
|
1415 |
For variable pitch fonts, the width of the space character is returned. |
|
1416 |
For fixed fonts, this is the same as minWidth or maxWidth (or any character). |
|
1417 |
The receiver must be associated to a device, for this query to be legal." |
|
1418 |
||
1419 |
^ self widthOf:' ' |
|
1420 |
||
1421 |
"Modified: 30.4.1996 / 16:43:45 / cg" |
|
1422 |
||
1423 |
||
1424 |
! |
|
1425 |
||
1426 |
widthOf:aString |
|
1427 |
"return the width of a string" |
|
1428 |
||
3667 | 1429 |
^ self widthOf:aString string from:1 to:aString size |
2544 | 1430 |
|
1431 |
||
1432 |
! |
|
1433 |
||
1434 |
widthOf:aString from:start to:stop |
|
1435 |
"return the width of a sub string" |
|
1436 |
||
1437 |
^ self subclassResponsibility |
|
1438 |
||
1439 |
||
1440 |
! |
|
1441 |
||
1442 |
widthOf:aString from:start to:stop on:aDevice |
|
1443 |
"return the width of a sub string. |
|
1444 |
Here, assume that this fonts width is device independent." |
|
1445 |
||
1446 |
^ (self onDevice:aDevice) widthOf:aString from:start to:stop |
|
1447 |
||
1448 |
||
1449 |
! |
|
1450 |
||
1451 |
widthOf:aString on:aDevice |
|
1452 |
"return the width of a string" |
|
1453 |
||
1454 |
^ (self onDevice:aDevice) widthOf:aString |
|
1455 |
||
1456 |
||
1457 |
||
1458 |
||
1459 |
||
1460 |
! |
|
1461 |
||
1462 |
widthOn:aDevice |
|
1463 |
"return the width on some device; that is the width of the space character |
|
1464 |
(which is the width of any character iff the font is a fixed pitch font)" |
|
1465 |
||
1466 |
^ (self onDevice:aDevice) width |
|
1467 |
! ! |
|
1468 |
||
456 | 1469 |
!FontDescription methodsFor:'queries-encoding'! |
1470 |
||
1471 |
isASCII |
|
576 | 1472 |
"return true, if the receivers encoding is |
1473 |
compatible with ascii (i.e. its ascii or iso8859)" |
|
1474 |
||
456 | 1475 |
^ (encoding == #iso8859) or:[encoding == #ascii] |
1476 |
||
1477 |
"Created: 24.2.1996 / 22:47:30 / cg" |
|
576 | 1478 |
"Modified: 20.4.1996 / 23:20:01 / cg" |
456 | 1479 |
! |
1480 |
||
1481 |
isISO8859 |
|
576 | 1482 |
"return true, if the receivers encoding is |
1483 |
compatible with iso8859 (i.e. iso8859)" |
|
1484 |
||
456 | 1485 |
^ encoding == #iso8859 |
1486 |
||
1487 |
"Created: 24.2.1996 / 22:47:12 / cg" |
|
576 | 1488 |
"Modified: 20.4.1996 / 23:20:13 / cg" |
456 | 1489 |
! |
1490 |
||
1491 |
isJIS |
|
576 | 1492 |
"return true, if the receivers encoding is |
1493 |
compatible with jis (i.e. jisXXX)" |
|
1494 |
||
456 | 1495 |
^ (encoding startsWith:'jis') |
1496 |
||
1497 |
"Created: 24.2.1996 / 22:47:47 / cg" |
|
576 | 1498 |
"Modified: 20.4.1996 / 23:20:30 / cg" |
456 | 1499 |
! ! |
1500 |
||
1275 | 1501 |
!FontDescription class methodsFor:'documentation'! |
437
a81ce3a8038b
return dummy default encoding & fullNames
Claus Gittinger <cg@exept.de>
parents:
229
diff
changeset
|
1502 |
|
a81ce3a8038b
return dummy default encoding & fullNames
Claus Gittinger <cg@exept.de>
parents:
229
diff
changeset
|
1503 |
version |
5644 | 1504 |
^ '$Header: /cvs/stx/stx/libview/FontDescription.st,v 1.76 2010-11-08 13:46:15 cg Exp $' |
5441 | 1505 |
! |
1506 |
||
1507 |
version_CVS |
|
5644 | 1508 |
^ '$Header: /cvs/stx/stx/libview/FontDescription.st,v 1.76 2010-11-08 13:46:15 cg Exp $' |
437
a81ce3a8038b
return dummy default encoding & fullNames
Claus Gittinger <cg@exept.de>
parents:
229
diff
changeset
|
1509 |
! ! |
3785 | 1510 |
|
1275 | 1511 |
FontDescription initialize! |