[Q] How to use a MusiTone TrueType font

Martin Drautzburg martin.drautzburg at web.de
Mon Jun 7 19:12:21 UTC 2004


I am trying to write a musical notation program (it can draw 5 lines
at the moment !!!) and I got myself the MusiTone TrueType font.

Now I am trying to use this font in my drawOn: method, 

drawNoteOn: aCanvas 
	aCanvas
		drawString: 'asd'
		in: bounds
		font: musicFont
		color: Color black

where musicFont is initialized to:

initializeFont
	musicFont _ TTCFont allInstances
		detect: [:a | a familyName = #MusiTone
				and: [a pointSize = 9]]

the font is found, but it does not draw anything. Also when I change
the font in a Workspace to MusiTone the text simply disappears.

Any ideas where to look for a solution ?



More information about the Squeak-dev mailing list