[squeak-dev] Re: TTF import broken in 5.0?
Tobias Pape
Das.Linux at gmx.de
Sun Apr 17 13:47:33 UTC 2016
Hi Milan,
On 17.04.2016, at 14:39, Milan Vavra <vavra_milan at yahoo.com> wrote:
> 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.
As I am probably the one who made that not work,
can you explain that so I understand what went wrong?
Best
-Tobias
>
> 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
More information about the Squeak-dev
mailing list
|