Changing Fonts to Century Gothic
David Mitchell
david.mitchell at gmail.com
Mon Jan 21 20:03:25 UTC 2008
If the font is Century Gothic, use a String rather than a symbol.
One of your lines converted would be:
(setButtonFontTo: 'Century Gothic' 10)
Here is how I set mine. (I added an extension to the Preferences
class, rather than a workspace script).
setDmmFonts
"Preferences setDmmFonts"
| face size selectors triplets |
face := 'Bitstream Vera Sans'.
size := 8.
selectors := #(
setSystemFontTo:
setListFontTo:
setFlapsFontTo:
setEToysFontTo:
setPaintBoxButtonFontTo:
setMenuFontTo:
setWindowTitleFontTo:
setBalloonHelpFontTo:
setCodeFontTo:
setButtonFontTo: ).
triplets := selectors collect: [:selector | Array with: selector
with: face with: size].
self setDefaultFonts: triplets
On Jan 21, 2008 12:43 PM, Giuseppe Luigi Punzi <glpunzi at lordzealon.com> wrote:
> I'm trying to make a script to personalize each of my images. First, I'm with the fonts (later will install the packages, but this is other history). I change some fonts with setSystemFontTo: but seems not to work.
>
> The Font is Century Ghotic, and I don't know if the problem is the space in the Font Name or probably I'm very stupid to see the error.
>
> I'm using the code "stolen" from a package of Diego Gómez Deck;
>
> http://www.squeaksource.com/DevEnvironment38.html
>
> The piece of code for my purposses is:
> #(
> (setButtonFontTo: #CenturyGothic 10)
> (setListFontTo: #CenturyGothic 10)
> (setMenuFontTo: #CenturyGothic 10)
> (setSystemFontTo: #CenturyGothic 10)
> (setCodeFontTo: #CenturyGothic 10)
> (setHaloLabelFontTo: #CenturyGothic 10)
> (setBalloonHelpFontTo: #CenturyGothic 10)
>
> )
> do: [:triplet |
> Preferences
> perform: triplet first
> with: (StrikeFont familyName: triplet second pointSize: triplet third)
> ].
>
> BalloonMorph setBalloonFontTo: (StrikeFont familyName: #BitstreamVeraSans pointSize: 12).
>
> The image is the latest 3.10.
>
> You can get my newb package from my MC repository:
> http://www.lordzealon.com/mc
>
> Thanks in advance.
>
> --
> Giuseppe Luigi Punzi <glpunzi at lordzealon.com>
>
>
More information about the Squeak-dev
mailing list
|