Squeak and Windows TTF fonts

Benoit St-Jean bstjean at yahoo.com
Sun Nov 18 19:09:22 UTC 2001


I am trying to import fonts in Squeak to customize my
environment and am getting a walkback.  I am running
on Win 2000 and I'm trying to import standard windows
TTF fonts with the following piece of code.


TTFontReader installTTF:
'c:\Prog\Squeak3.0\MyFonts\arial.ttf'
		asTextStyle: #Arial
		sizes: #(9 10 12 14)
		
		
Am I doing something wrong?  Is that the way to import
fonts so they appear in "Appearance>>System
Fonts>>List fonts"  menu ?
		

18 November 2001 1:21:38 pm

VM: Win32 - Squeak3.1alpha of 4 February 2001 [latest
update: #3641]
Image: Squeak3.2alpha [latest update: #4518]

BitBlt(Object)>>error:
	Receiver: a BitBlt
	Arguments and temporary variables: 
		aString: 	'Error: Bad BitBlt arg (Fraction?);
proceed to convert.'
	Receiver's instance variables: 
		destForm: 	DisplayScreen(796x549x32)
		sourceForm: 	Form(2022x16x8)
		halftoneForm: 	nil
		combinationRule: 	25
		destX: 	596
		destY: 	430
		width: 	9
		height: 	16
		sourceX: 	532
		sourceY: 	0
		clipX: 	596
		clipY: 	430
		clipWidth: 	136
		clipHeight: 	16
		colorMap: 	a Bitmap of length 2

[] in WorldState>>displayWorldSafely:
	Arguments and temporary variables: 
		aWorld: 	a PasteUpMorph(1622) [world]
		oldHandler: 	nil
		errCtx: 	MenuItemMorph(StringMorph)>>drawOn:
		errMorph: 	a MenuItemMorph(1255)#Arial
		err: 	'Error: Bad BitBlt arg (Fraction?); proceed to
convert.'
		rcvr: 	a BitBlt

[] in BlockContext>>ifError:
	Arguments and temporary variables: 
		errorHandlerBlock: 	[] in
WorldState>>displayWorldSafely:
		lastHandler: 	nil
		val: 	nil
		activeProcess: 	a Process in Debugger
class>>openContext:label:contents:
		errBlockArgs: 	2
		aString: 	nil
		aReceiver: 	nil
		ex: 	an Error

Error(Exception)>>handlerAction
	Receiver: an Error
	Arguments and temporary variables: 
		na: 	1
		handler: 	[] in BlockContext>>ifError:
		returnValue: 	nil
	Receiver's instance variables: 
		messageText: 	'Bad BitBlt arg (Fraction?); proceed
to convert.'
		initialContext: 	BitBlt(Object)>>error:
		resignalException: 	nil
		handlerContext: 	BlockContext>>on:do:
		tag: 	nil
		activeHandler: 	nil
		parameter: 	nil

--- The rest of the stack ---
Error(Exception)>>signal
Error(Exception)>>signal:
BitBlt(Object)>>error:
BitBlt>>copyBits
BitBlt>>primDisplayString:from:to:map:xTable:kern:
BitBlt>>displayString:from:to:at:strikeFont:kern:
FormSetFont(StrikeFont)>>displayString:on:from:to:at:kern:
DisplayScanner>>drawString:at:
FormCanvas>>text:bounds:font:color:
MenuItemMorph(StringMorph)>>drawOn:
MenuItemMorph>>drawOn:
FormCanvas(Canvas)>>draw:
FormCanvas(Canvas)>>drawMorph:
[] in MenuItemMorph(Morph)>>fullDrawOn:
FormCanvas>>roundCornersOf:during:
MenuItemMorph(Morph)>>fullDrawOn:
FormCanvas(Canvas)>>fullDraw:
FormCanvas(Canvas)>>fullDrawMorph:
[] in MenuMorph(Morph)>>drawSubmorphsOn:
Array(SequenceableCollection)>>reverseDo:
[] in MenuMorph(Morph)>>drawSubmorphsOn:
MenuMorph(Morph)>>drawSubmorphsOn:
[] in MenuMorph(Morph)>>fullDrawOn:
CornerRounder
class>>roundCornersOf:on:displayBlock:borderWidth:corners:
FormCanvas>>roundCornersOf:during:
MenuMorph(Morph)>>fullDrawOn:
FormCanvas(Canvas)>>fullDraw:
FormCanvas(Canvas)>>fullDrawMorph:
[] in WorldState>>drawWorld:submorphs:invalidAreasOn:
OrderedCollection>>do:
WorldState>>drawWorld:submorphs:invalidAreasOn:
[] in WorldState>>displayWorld:submorphs:
FormCanvas>>roundCornersOf:during:
WorldState>>displayWorld:submorphs:
PasteUpMorph>>privateOuterDisplayWorld
PasteUpMorph>>displayWorld
[] in WorldState>>displayWorldSafely:
BlockContext>>on:do:
BlockContext>>ifError:
WorldState>>displayWorldSafely:
WorldState>>doOneCycleNowFor:
WorldState>>doOneCycleFor:
PasteUpMorph>>doOneCycle
[] in Project class>>spawnNewProcess
[] in BlockContext>>newProcess

=====
----------------------
Benoit St-Jean
bstjean at yahoo.com
ICQ: 130611319 / Yahoo Mssngr: bstjean
http://cactus.swiki.net
"We're only immortal for a limited time", Neil Peart
----------------------

__________________________________________________
Do You Yahoo!?
Find the one for you at Yahoo! Personals
http://personals.yahoo.com




More information about the Squeak-dev mailing list