[ENH] widths of digits

Bob Arning arning at charm.net
Sun Oct 24 13:38:13 UTC 1999


On Sun, 24 Oct 1999 03:54:17 -0400 "John Duncan" <jddst19+ at pitt.edu> wrote:
>If it were a perfect world, you'd be able to make a few subclasses and
>use them. Unfortunately, the character display is done by a primitive,
>so I think you lose this latitude. I don't really understand the
>intricacies of everything, so I'm not sure. Perhaps you could allow a
>little loss of speed while you test new subclasses and then make them
>primitive. If you think this is a worthy approach, I'd help you with
>it.

John,

It really isn't hard and you retain full primitive support. From StrikeFont>>aComment:
===========
To read Mac font resources.  
1) Use ResEdit in the Fonts folder in the System Folder.  Open the file of the Font you want.  (A screen font, not a TrueType outline font).
2) Open the FOND resource and scroll down to the list of sizes and resource numbers. Note the resource number of the size you want.
3) Open the NFNT resource.  Click on the number you have noted.
4) Choose 'Open Using Hex Editor' from the resource editor.
5) Copy all of the hex numbers and paste into a text editor.  Save the file into the Smalltalk folder under the name 'FontName 12 hex' (or other size).
6) Enter the fileName below and execute: 

TextStyle default fontAt: 8 put: (StrikeFont new readMacFontHex: 'fileName').

Select text and type Command-7 to change it to your new font.
===========

Cheers,
Bob





More information about the Squeak-dev mailing list