Bigger fonts + truetype font converter

Andreas Raab Andreas.Raab at gmx.de
Mon Feb 4 21:19:14 UTC 2002


Kris,

[CC-ing to squeak-dev so others might benefit as well]

> Apparantly you have something available to convert the fonts 
> on windows? I have a windows machine lying around so I'm willing
> to give it a try :) Where can I find the code? Can I transport
> the converted fonts to my macintosh image?

Here's what you do: Drop the attached fontplugin.dll to the directory
where your Squeak.exe lives. Then file in the attached StrikesFromHost
change set. Now open a workspace and evaluate the following:

TextConstants at: #forceFontWriting put: true.
sizes := #(10 11 12 13 14 16 18 20 22 24 26 28 30 36 48 60 72 90).
StrikeFont listFontNames asSortedCollection do:[:fontName|
	style := StrikeFont textStyleFrom: fontName sizes: sizes.
	fileStream _ FileStream newFileNamed: fontName,'.stf'.
	fileStream fileOutClass: nil andObject: style.
].
TextConstants at: #forceFontWriting put: false.

The above will convert _all_ of your windows fonts into strike fonts of
the given sizes. Which might be plenty (on my system 170) - so if you
only need a few just make a list from StrikeFont listFontNames and pass
it in. Also, the varying sizes eat up plenty of space so you might want
to adjust the sizes you need. Once you're done converting, take all
these stf files and move them over to your mac. On your Mac evaluate:

fd := FileDirectory default.
fd fileNames do:[:fn|
	(fn endsWith:'.stf') ifTrue:[
		fileStream := FileStream readOnlyFileNamed: (fd
fullNameFor: fn).
		style := fileStream fileInObjectAndCode.
		(style isKindOf: TextStyle) ifTrue:[
			TextConstants at: (fn allButLast: 4) asSymbol
put: style.
		] ifFalse:[self error:'I am horribly confused'].
		fileStream close.
	].
].

which will install all of the fonts you've moved over.

Cheers,
  - Andreas
-------------- next part --------------
A non-text attachment was scrubbed...
Name: FontPlugin.zip
Type: application/x-stuffit
Size: 5141 bytes
Desc: not available
Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20020204/86a20869/FontPlugin.sit
-------------- next part --------------
A non-text attachment was scrubbed...
Name: StrikesFromHost.2.cs
Type: application/octet-stream
Size: 8849 bytes
Desc: not available
Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20020204/86a20869/StrikesFromHost.2.obj


More information about the Squeak-dev mailing list