Changing Fonts to Century Gothic

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Changing Fonts to Century Gothic

Giuseppe
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 <[hidden email]>

Reply | Threaded
Open this post in threaded view
|

Re: Changing Fonts to Century Gothic

David Mitchell-10
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 <[hidden email]> 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 <[hidden email]>
>
>

Reply | Threaded
Open this post in threaded view
|

Re: Changing Fonts to Century Gothic

Giuseppe
Hi David.

On Mon, 21 Jan 2008 14:03:25 -0600
"David Mitchell" <[hidden email]> wrote:

> If the font is Century Gothic, use a String rather than a symbol.
>
> One of your lines converted would be:
>                  (setButtonFontTo:                       'Century Gothic'  10)

I will try.

>
> 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
>

I will try this too, thanks.

But I need to study this. I opened my "new" image from my MacBook at home, and the Century Ghotic font, doesn't "see" like Century Ghotic on my Windows machine at work.

--
Giuseppe Luigi Punzi <[hidden email]>

Reply | Threaded
Open this post in threaded view
|

Re: Changing Fonts to Century Gothic

Tom Phoenix
On Jan 22, 2008 1:50 AM, Giuseppe Luigi Punzi <[hidden email]> wrote:

> But I need to study this. I opened my "new" image from my MacBook at home, and the
> Century Ghotic font, doesn't "see" like Century Ghotic on my Windows machine at work.

This is the second message in which you've misspelled the name of the
font that you're having trouble loading. Is the name misspelled also
in your source code?

Cheers!

--Tom Phoenix

Reply | Threaded
Open this post in threaded view
|

Re: Changing Fonts to Century Gothic

Giuseppe
Is misspelled only in the emails :)

As I said, The same image, in a MacBook, render the same font, in other way.

Same Image:
Windows Render <> Mac Render

Cheers.

On Tue, 22 Jan 2008 08:16:32 -0800
"Tom Phoenix" <[hidden email]> wrote:

> On Jan 22, 2008 1:50 AM, Giuseppe Luigi Punzi <[hidden email]> wrote:
>
> > But I need to study this. I opened my "new" image from my MacBook at home, and the
> > Century Ghotic font, doesn't "see" like Century Ghotic on my Windows machine at work.
>
> This is the second message in which you've misspelled the name of the
> font that you're having trouble loading. Is the name misspelled also
> in your source code?
>
> Cheers!
>
> --Tom Phoenix
>


--
Giuseppe Luigi Punzi <[hidden email]>

Reply | Threaded
Open this post in threaded view
|

Re: Changing Fonts to Century Gothic

David Mitchell-10
I presume these are fonts rendered through FreeType. Since that uses
native code, perhaps the binaries are different on the two platforms
(or the two fonts have the same name but are really different fonts).

You wouldn't have that problem with StrikeFonts, but I prefer the FreeType look.

On Jan 22, 2008 11:58 AM, Giuseppe Luigi Punzi <[hidden email]> wrote:

> Is misspelled only in the emails :)
>
> As I said, The same image, in a MacBook, render the same font, in other way.
>
> Same Image:
> Windows Render <> Mac Render
>
> Cheers.
>
>
> On Tue, 22 Jan 2008 08:16:32 -0800
> "Tom Phoenix" <[hidden email]> wrote:
>
> > On Jan 22, 2008 1:50 AM, Giuseppe Luigi Punzi <[hidden email]> wrote:
> >
> > > But I need to study this. I opened my "new" image from my MacBook at home, and the
> > > Century Ghotic font, doesn't "see" like Century Ghotic on my Windows machine at work.
> >
> > This is the second message in which you've misspelled the name of the
> > font that you're having trouble loading. Is the name misspelled also
> > in your source code?
> >
> > Cheers!
> >
> > --Tom Phoenix
> >
>
>
> --
>
> Giuseppe Luigi Punzi <[hidden email]>
>
>