[DOC][3.8g][Morphic][m17n] Unicode True Type font example (was Re: internationalisation of squeak: Bitmap font SofijaUC)

stéphane ducasse ducasse at iam.unibe.ch
Wed Dec 15 10:24:16 UTC 2004


Hannes

could you once do nice screenshots and send that to me for my 
collection and demoes :)

Stef

On 15 déc. 04, at 09:58, Hannes Hirzel wrote:

> Yoshiki
>
> thank you for your answer which helped me to do a further important 
> step
> (see below). For examplewe can display now Greek and IPA characters in 
> a
> size large enough for example to teach geometry or phonetics with 
> Squeak.
>
>
> Yoshiki Ohshima wrote:
>>   Hannes,
>>> Squeak 3.6 (for 3.7 I didn't check because I am changing directly 
>>> from
>>> 3.6 to 3.8) has TrueType font loader methods which are still in 3.8.
>>> Alexander Lazarevic has posted sa code snippets where he managed to
>>> display a single character of a Unicode true type font. Recently 
>>> when I
>>> checked it didn't work anymore. I posted a bug report on Mantis
>>> regarding this. But in some time TrueType support will be here for
>>> Unicode as well I suppose.
>>   I put a reply to your bug report.  If I copy it, it reads:
>> ------------------------
>> First, this wasn't the problem I introduced^^;
>> Second, the do-it is wrong, since
>>      #(12, 18, 24, 36, 60)
>> doesn't result in a 5-element array, but 9-element array with four 
>> #,'s.
>
>
> I do not understand what this means. I have now Verdana of font size up
> to 36 in my 3.8g image be using the general command (see below)
>
> But I would like to have as well the point sizes 48, 60, 72 and 90. 
> What
> do I have to do?
>
>
>> Third, if you define #pixelSize: at StrikeFont that is identical to 
>> the TTCFont one,
>> pixelSize: aNumber
>>     "Make sure that we don't return a Fraction"
>>     self pointSize: (TextStyle pixelsToPoints: aNumber) rounded.
>> it runs.
>
> This explanation is too terse for me.
>
>> However, you would need to fix the combination rule to render the 
>> 8-bit depth glyph correctly.
>> Lastly, you can say      TTCFontReader encodingTag: Latin1Environment 
>> leadingChar.
>>      TTCFontSet newTextStyleFromTTFile: 'C:\WINDOWS\Fonts\verdana.ttf'
>> to use Verdana for some extent. ------------------------
>
>
> This works excellent. In a pristine 3.8gamma-6527 I did do the 
> following
> with success:
>
>
>  TTCFontReader encodingTag: Latin1Environment leadingChar.
>      TTCFontSet newTextStyleFromTTFile: 'C:\WINDOWS\Fonts\L_10646.ttf'.
>      "Lucida Sans Unicode Font (installed on every Windows since 1998).
>       Please check:
>       The font file name might be different though - I am on Windows 
> XP"
>
> s _ StringMorph new contents: ('abc ',
>                                945 asCharacter asString,
>                                946 asCharacter asString,
>                                947 asCharacter asString).
>                                "Greek alpha, beta, gamma"
>
> s  fontName: 'MultiLucidaSansUnicode' size: 48.
>
> s openInHand
>
>
>
>>   Ned, did you do the "installing combination rule" part of 
>> FormSetFont?
>> -- Yoshiki
>
> Hannes
>
>
>
>
>




More information about the Squeak-dev mailing list