[squeak-dev] Re: TTF import broken in 5.0?
Milan Vavra
vavra_milan at yahoo.com
Sun Apr 17 12:39:12 UTC 2016
Hi Vaidotas,
The following fix should allow you to import a TTF font
and display the national characters in Squeak 5.0.
In
TTFontReader>>#decodeCmapFmtTable:
change
i < 256 ifTrue:
[seg last > 0 ifTrue:
to
seg last > 0 ifTrue:
and
cmap at: i + 1 put: code]]].
to
cmap at: i + 1 put: code]].
or revert the method to the version
'nice 12/27/2009 03:10'
.
In
TTCFontReader>>#processCharMap:
change
value = 65535 ifFalse: [ "???"
to
value > 65535 ifFalse: [ "???"
.
Now import the font and check the characters display as expected.
This is how I would do it:
| tmpStyleName tmpFontFileName |
tmpStyleName := #Arial.
tmpFontFileName := '/Library/Fonts/Arial.ttf'.
TTCFont removeStyleName: tmpStyleName.
"Remove the existing font if it exists"
TTCFont newTextStyleFromTTFile: tmpFontFileName.
"Import the new TTF font"
FontChooserTool open.
"Check that font"
Best Regards,
Milan
--
View this message in context: http://forum.world.st/TTF-import-broken-in-5-0-tp4884157p4890411.html
Sent from the Squeak - Dev mailing list archive at Nabble.com.
More information about the Squeak-dev
mailing list
|