Hi
In a 3.8a image with the install script loaded (see my previous mail of I found that I can load Windows host (Unicode) fonts, like Times New Roman, Garamond, Lucida Sans Unicode etc.
with
HostFont initWin32
The fileIn of the fonts works fine.
However if I then try to select one of these fonts as a system default font Squeak blocks
in
Array(SequenceqbleCollection)>>first HostFont>>displayString:on:from:to:at:kern: FormCanvas>>drawString:from:to:in:font:color:
Am I missing an important intermediary step or does this just not work yet?
Hannes
Hannes,
In a 3.8a image with the install script loaded (see my previous mail of I found that I can load Windows host (Unicode) fonts, like Times New Roman, Garamond, Lucida Sans Unicode etc.
with
HostFont initWin32
The fileIn of the fonts works fine.
However if I then try to select one of these fonts as a system default font Squeak blocks
in
Array(SequenceqbleCollection)>>first HostFont>>displayString:on:from:to:at:kern: FormCanvas>>drawString:from:to:in:font:color:
Am I missing an important intermediary step or does this just not work yet?
I haven't tried to use them as system font in 3.8a images, but I do have a revised FontPlugin that allows you to get Unicode font from Windows somewhere.
It is hard to tell what went wrong, but did you have some strings that contains non-latin1 chars and the font doesn't contain the glyphs for them? The fallbackfont inst var have to be initialized in a manner of StrikeFont class>>setupDefaultFallbackFont does...
-- Yoshiki
Yoshiki,
For some reason, the m17n installer also installs a broken (!) version of HostFont. In particular HostFont>>displayString:on:from:to:at:kern: is utterly broken as can be seen by evaluating:
HostFont textStyleFrom: 'Arial'. mm := StringMorph new. mm font: (TextStyle named: 'Arial') defaultFont. mm fullDrawOn: Display getCanvas.
If you remove the method (e.g., just fall back to StrikeFont's implementation) everything works fine.
Question: Is there any reason why HostFont has to be in the m17n image?
Cheers, - Andreas
----- Original Message ----- From: "Yoshiki Ohshima" Yoshiki.Ohshima@acm.org To: "The general-purpose Squeak developers list" squeak-dev@lists.squeakfoundation.org Sent: Tuesday, August 03, 2004 7:08 PM Subject: Re: [Test][3.8a][m17n] After loading host fonts Squeak blocks
Hannes,
In a 3.8a image with the install script loaded (see my previous mail of I found that I can load Windows host (Unicode) fonts, like Times New Roman, Garamond, Lucida Sans Unicode etc.
with
HostFont initWin32
The fileIn of the fonts works fine.
However if I then try to select one of these fonts as a system default font Squeak blocks
in
Array(SequenceqbleCollection)>>first HostFont>>displayString:on:from:to:at:kern: FormCanvas>>drawString:from:to:in:font:color:
Am I missing an important intermediary step or does this just not work yet?
I haven't tried to use them as system font in 3.8a images, but I do have a revised FontPlugin that allows you to get Unicode font from Windows somewhere.
It is hard to tell what went wrong, but did you have some strings that contains non-latin1 chars and the font doesn't contain the glyphs for them? The fallbackfont inst var have to be initialized in a manner of StrikeFont class>>setupDefaultFallbackFont does...
-- Yoshiki
Andreas,
Question: Is there any reason why HostFont has to be in the m17n image?
The main reason is that I do know it requires some more fix-ups, and if it is there, I'd hear the complain earlier so I'd be inclined to fix it earlier... so the goal of putting it in the image sounds like satisfied.
I kind of like the idea to make HostFont accessible to the users, but not strong feeling here. And the plugin people use and the code in the m17n image are imcompatible at this point, so it would be better to back it out.
-- Yoshiki
squeak-dev@lists.squeakfoundation.org