Font problem
Ned Konz
ned at bike-nomad.com
Sat Sep 29 02:37:44 UTC 2001
On Friday 28 September 2001 06:42 pm, Christian Langreiter wrote:
> In a fully updated 3.1 image, I ´try to install a Truetype font via ...
>
> "TTFontReader
> installTTF: 'c:\winnt\fonts\arial.ttf'
> asTextStyle: #Arial
> sizes: #(24 60)"
>
> So far, so good. However, as soon as I try to actually put the font to use
> (by clicking to the "System Fonts" menu entry), I get a "Bad BitBlt arg
> (Fraction?)" error as soon as the font selection menu is about to be
> displayed. If I proceed, nothing happens.
>
> Can anyone explain why this happens and what can be done about it?
I dunno. Works for me, but doesn't look too nice (though I'm not necessarily
using the Windows Arial.ttf) At least it doesn't blow up.
> BTW, is there any other way to get Truetype fonts into Squeak? All the
> methods I've tried (as described on this ML and the Swiki) either give
> errors or a obsolete. Andreas Raabs TTF-to-file-in converter produces
> Smalltalk code for old Squeaks (utilizes methods which don't exist in
> current images), Ned Konz' fix posted to the ML doesn't help either (guess
> it has found its way into the update stream a long time ago anyway) ...
Well, what do you want to do? Because of the lack of hinting, you don't want
to use TTF fonts in small sizes. In bigger sizes, there is the
TTSampleStringMorph:
font _ (TTFontReader parseFileNamed: '/usr/share/fonts/truetype/arial.ttf').
sm _ TTSampleStringMorph new font: font; string: 'This is a test string'.
sm openInWorld
If you're just looking for replacements for the system fonts, use bitmap
fonts, not scalable fonts.
--
Ned Konz
currently: Stanwood, WA
email: ned at bike-nomad.com
homepage: http://bike-nomad.com
More information about the Squeak-dev
mailing list
|