TrueType

Ron Jeffries ronjeffries at acm.org
Fri Mar 18 19:51:02 UTC 2005


On Friday, March 18, 2005, at 9:44:36 AM, Yoshiki Ohshima wrote:

>   Ron,

>> When I drag a TTF file onto Squeak's window, it opens a file
>> containing a lot of weird text, i.e. the contents of the font file.
>> If there's a way to install it, it's not obvious.

>   What version of Squeak are you using?  Squeak 3.8 gamma is good.

3.7.

>   What font did you load?

I'm embarrassed to say that it is named "Bunnigrrrl's handwriting".
:) It's the printing font on my web page.

>   It doesn't outlining or anything by default.

The example Ned gave does in fact show an outline around the letters:

canvas := FormCanvas extent: 600 at 200 depth: 8.
canvas fillColor: Color white.
font := (TextStyle named: 'BitstreamVeraSans') fontOfPointSize: 36.
canvas drawString: 'This Is BitstreamVeraSans' at: 10 at 50 font: font color: 
Color red.
canvas drawString: 'This Is BitstreamVeraSans Bold' at: 10 at 100 font: (font 
emphasized: 1) color: Color blue.
GIFReadWriter putForm: canvas form onFileNamed: 'fontTest.gif'.

>   If you install the family of fonts (ARIALN.TTF, ARIALNB.TTF,
> ARIALNBI.TTF, and ARIALNI.TTF, for instances), Squeak does the "right
> thing".  It may have been a bold font.

Don't know, might be.

>>   b) all the tall ascenders and descenders are cropped off.
>>      How can I get the whole font in there?

>   How are you using it?

>   Can you send a screenshot? (and how to reproduce it?)

Attached is the GIF from the following code, and the one from Ned as
well. In both cases, you can see in the blue version, the black
outline.

canvas := FormCanvas extent: 600 at 200 depth: 8.
canvas fillColor: Color white.
font := (TextStyle named: 'Bunnigrrrl''shandwriting') fontOfPointSize: 15.
canvas 
        drawString: 'This Is Bunnigrrrl''s handwriting' 
        in: (Rectangle origin: 10 at 50 extent: 500 at 50)
        font: font color: 
Color black.
canvas drawString: 'This Is Bunnigrrrl''s handwriting Bold' at: 10 at 100 font: (font 
emphasized: 1) color: Color blue.
GIFReadWriter putForm: canvas form onFileNamed: 'fontTest2.gif'.

>> Is there someplace I should be reading about all this, instead of
>> asking questions?

>   Asking questions would be better.  Otherwise, the mailing list
> archive(s) and the the image itself would be what to read.

Yes ... but browsing the image's 5000+ classes seems difficult. I
guess I'm out of practice ...

>> www.XProgramming.com

>   Preparing upfront detailed documents sounds like a violation of
> YAGNI principle^^;

YAGNI says not to build a thing until it's needed. I'm feeling like
some of these things are well past needed. ;->

Ron Jeffries
www.XProgramming.com
Do I contradict myself? Very well then I contradict myself.
(I am large, I contain multitudes.) --Walt Whitman
-------------- next part --------------
A non-text attachment was scrubbed...
Name: fontTest2.gif
Type: image/gif
Size: 3432 bytes
Desc: not available
Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20050318/e2564f5e/fontTest2.gif
-------------- next part --------------
A non-text attachment was scrubbed...
Name: fontTest.gif
Type: image/gif
Size: 6319 bytes
Desc: not available
Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20050318/e2564f5e/fontTest.gif


More information about the Squeak-dev mailing list