9 other person. No title to or ownership of the software is |
9 other person. No title to or ownership of the software is |
10 hereby transferred. |
10 hereby transferred. |
11 " |
11 " |
12 |
12 |
13 Object subclass:#FontDescription |
13 Object subclass:#FontDescription |
14 instanceVariableNames:'family face style size encoding |
14 instanceVariableNames:'family face style size encoding manufacturer name flags masks |
15 manufacturer name |
15 pixelSize' |
16 flags masks pixelSize' |
|
17 classVariableNames:'BoldnessMask FixedFlag ItalicFlag OutlineFlag SerifFlag |
16 classVariableNames:'BoldnessMask FixedFlag ItalicFlag OutlineFlag SerifFlag |
18 ShadowFlag StrikeoutFlag UnderlineFlag' |
17 ShadowFlag StrikeoutFlag UnderlineFlag' |
19 poolDictionaries:'' |
18 poolDictionaries:'' |
20 category:'Graphics-Support' |
19 category:'Graphics-Support' |
21 ! |
20 ! |
22 |
21 |
23 !FontDescription class methodsFor:'documentation'! |
22 !FontDescription class methodsFor:'documentation'! |
24 |
23 |
25 copyright |
24 copyright |
26 " |
25 " |
27 COPYRIGHT (c) 1994 by Claus Gittinger |
26 COPYRIGHT (c) 1994 by Claus Gittinger |
28 All Rights Reserved |
27 All Rights Reserved |
90 ShadowFlag := 2r0010000000. |
89 ShadowFlag := 2r0010000000. |
91 StrikeoutFlag := 2r0100000000. |
90 StrikeoutFlag := 2r0100000000. |
92 UnderlineFlag := 2r1000000000. |
91 UnderlineFlag := 2r1000000000. |
93 ! ! |
92 ! ! |
94 |
93 |
95 !FontDescription class methodsFor:'instance creation'! |
94 !FontDescription class methodsFor:'instance creation'! |
96 |
95 |
97 family:familyString |
96 family:familyString |
98 "returns a font for given family and default (12pt) size |
97 "returns a font for given family and default (12pt) size |
99 with unspecified encoding. |
98 with unspecified encoding. |
100 The new fonts face defaults `medium', its style to `roman'. |
99 The new fonts face defaults `medium', its style to `roman'. |
379 |
378 |
380 !FontDescription methodsFor:'queries'! |
379 !FontDescription methodsFor:'queries'! |
381 |
380 |
382 bold |
381 bold |
383 "return true, if the receiver is a bold font - |
382 "return true, if the receiver is a bold font - |
384 for st-80 compatibility" |
383 Added for st-80 compatibility" |
385 |
384 |
386 ^ face = 'bold' |
385 ^ face = 'bold' |
|
386 |
|
387 "Modified: 25.1.1997 / 03:02:25 / cg" |
387 ! |
388 ! |
388 |
389 |
389 boldness |
390 boldness |
390 "return the boldness of the characters in this font 0 .. 1 - |
391 "return the boldness of the characters in this font 0 .. 1 - |
391 for st-80 compatibility" |
392 Added for st-80 compatibility" |
392 |
393 |
393 style = 'roman' ifTrue:[^ 0.5]. |
394 style = 'roman' ifTrue:[^ 0.5]. |
394 style = 'normal' ifTrue:[^ 0.5]. |
395 style = 'normal' ifTrue:[^ 0.5]. |
395 style = 'bold' ifTrue:[^ 0.75]. |
396 style = 'bold' ifTrue:[^ 0.75]. |
396 style = 'light' ifTrue:[^ 0.25]. |
397 style = 'light' ifTrue:[^ 0.25]. |
397 ^ 0.5 |
398 ^ 0.5 |
|
399 |
|
400 "Modified: 25.1.1997 / 03:02:19 / cg" |
|
401 ! |
|
402 |
|
403 color |
|
404 "return the default color in which this font is to be rendered. |
|
405 Added for st-80 compatibility. |
|
406 For now always black." |
|
407 |
|
408 ^ Color black |
|
409 |
|
410 "Created: 25.1.1997 / 02:59:15 / cg" |
|
411 "Modified: 25.1.1997 / 03:02:14 / cg" |
398 ! |
412 ! |
399 |
413 |
400 fullName |
414 fullName |
401 ^ nil |
415 ^ nil |
402 |
416 |
403 "Created: 23.2.1996 / 00:45:45 / cg" |
417 "Created: 23.2.1996 / 00:45:45 / cg" |
404 ! |
418 ! |
405 |
419 |
406 italic |
420 italic |
407 "return true if this is an italic font - |
421 "return true if this is an italic font - |
408 for st-80 compatibility" |
422 Added for st-80 compatibility |
|
423 Mostly false here" |
409 |
424 |
410 face = 'italic' ifTrue:[^ true]. |
425 face = 'italic' ifTrue:[^ true]. |
411 face = 'obligue' ifTrue:[^ true]. |
426 face = 'obligue' ifTrue:[^ true]. |
412 ^ false |
427 ^ false |
|
428 |
|
429 "Modified: 25.1.1997 / 03:01:57 / cg" |
413 ! |
430 ! |
414 |
431 |
415 serif |
432 serif |
416 "return true, if this font has serifs" |
433 "return true, if this font has serifs. |
417 |
434 Added for st-80 compatibility |
418 "this should be done in a better way ..." |
435 Mostly false returned here." |
|
436 |
|
437 "/ this should be done in a better way ... |
419 |
438 |
420 family = 'Times' ifTrue:[^ true]. |
439 family = 'Times' ifTrue:[^ true]. |
421 family = 'times' ifTrue:[^ true]. |
440 family = 'times' ifTrue:[^ true]. |
422 ^ false. |
441 ^ false. |
|
442 |
|
443 "Modified: 25.1.1997 / 03:01:40 / cg" |
423 ! |
444 ! |
424 |
445 |
425 species |
446 species |
426 ^ Font |
447 ^ Font |
|
448 ! |
|
449 |
|
450 underline |
|
451 "return true if this is an underlined font - |
|
452 Added for st-80 compatibility |
|
453 (always false here)" |
|
454 |
|
455 ^ false |
|
456 |
|
457 "Created: 25.1.1997 / 02:58:30 / cg" |
|
458 "Modified: 25.1.1997 / 03:01:12 / cg" |
427 ! ! |
459 ! ! |
428 |
460 |
429 !FontDescription methodsFor:'queries-encoding'! |
461 !FontDescription methodsFor:'queries-encoding'! |
430 |
462 |
431 isASCII |
463 isASCII |