[GOODIE] X11Fonts (was RE: Adding Accufonts to the update
stream)
Cees de Groot
cg at cdegroot.com
Wed Feb 26 09:08:35 UTC 2003
Cool, Ian!
On the topic of X11 fonts I have one issue: if you use, say, Helvetica
as the flaps font, the texts are cropped. Is there an easy fix to that?
On Wed, 2003-02-26 at 01:32, Ian Piumarta wrote:
> Note that it does _not_ modify any existing fonts. (The Apple fonts
> remain installed and available.)
>
I've been through ugly code in order to get the Apple fonts GC'ed away,
like:
"necessary for NewYork and Comic"
StrikeFont allInstances do: [:font |
(font name beginsWith: 'Comic') ifTrue: [
(Smalltalk pointersTo: font) do: [:each |
(each respondsTo: #font:) ifTrue: [
each font: (StrikeFont familyName: 'Helvetica' size: 12)]]]]
TextStyle allInstances do: [:style |
(style name beginsWith: 'a TextStyle NewYork') ifTrue: [
(Smalltalk pointersTo: style) do: [:each |
(each respondsTo: #setTextStyle:) ifTrue: [
each setTextStyle: (TextStyle default)]]]]
The end result wasn't perfect, and I might have forgotten to keep a log
on some tweaks, but the end result was that the Apple fonts could be
GC'ed. And probably I got it all wrong, too (I'm a complete nitwit in
the area of Smalltalk GUI's), but I thought I'd post my code anyway -
hopefuly someone comes up with something cleaner ;-). Anyway, the code
above was purely meant to see whether I could remove the Apple fonts,
treat it as such ;-)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20030226/a442d672/attachment.pgp
More information about the Squeak-dev
mailing list
|