[Q] Strikefont - characterToGlyphMap (MacRoman vs. Windows encoding)

Andreas Raab andreas.raab at gmx.de
Wed Apr 23 17:09:35 UTC 2003


Check out the Win32NativeFonts package on SqueakMap - it contains the
appropriate mapping.

Cheers,
  - Andreas

> -----Original Message-----
> From: squeak-dev-bounces at lists.squeakfoundation.org 
> [mailto:squeak-dev-bounces at lists.squeakfoundation.org] On 
> Behalf Of Hannes Hirzel
> Sent: Wednesday, April 23, 2003 3:58 PM
> To: The general-purpose Squeak developers list
> Subject: [Q] Strikefont - characterToGlyphMap (MacRoman vs. 
> Windows encoding)
> 
> 
> 
> Hi all
> 
> I understand that every bitmap font in Squeak may have its 
> own encoding.
> The class Strikefont has an instance variable 
> characterToGlyphMap which
> is set in the method
> createCharacterToGlyphMap to standard values.
> 
> 	| map |
> 	map _ Array new: 256.
> 	0 to: minAscii - 1 do:[:i| map at: i + 1 put: maxAscii + 1].
> 	minAscii to: maxAscii do:[:i| map at: i + 1 put: i].
> 	maxAscii + 1 to: 255 do:[:i| map at: i + 1 put: maxAscii + 1].
> 	^map
> 
> With a font utility I loaded the Windows Verdana font (encoded in
> Windows CP 1252) in an image. However as the Squeak image has MacRoman
> encoding as it's standard the upper ASCII character do not display
> properly.
> 
> My question: Does somebody have the code for a method defining a
> characterToGlyphMap which remaps the glyphs encoded for 
> Windows for the
> Mac encoding. Or is this already in the code somewhere?
> 
> Thanks in advance
> 
> Hannes
> 



More information about the Squeak-dev mailing list