[squeak-dev] two bugs with fonts 4.5-13671

Nicolas Cellier nicolas.cellier.aka.nice at gmail.com
Mon Feb 17 22:04:33 UTC 2014


OK here is the explanation:

When the string is a ByteString, then the primitives do the right thing:
they use the instanceVariable characterToGlyphMap which map ascii 95(+1) to
(xTable at: 129) - that is underscore rather than leftArrow.

Some example of StrikeFont method which does the right thing:

#widthOf:

When the string is a WideString (you pasted some wide character once, the
string remain wide even if you delete the character), then several methods
of StrikeFont triggered by presence of a WideString
 DO THE WRONG thing: they access xTable directly with a Character charCode
ignoring characterToGlyphMap.

Some example of not well behaved StrikeFont methods:

#hasGlyphOf: #glyphOf:  #glyphInfoOf:into: #characterFormAt: ...

Generally, all users of xTable not refering to characterToGlyphMap (except
methods for reading/constructing the font maybe...)

I will try to fix, but it's possible that this could cause some more
surprise, code was changed 12 years ago by Yoshiki, and incorrect usage has
spread a bit since then...


2014-02-10 14:47 GMT+01:00 Vaidotas Didžbalis <vaidasd at gmail.com>:

> I got it by pasting a string from my 4.3 image, you can file in
> atachement, copy string in method and paste it in workspace.
>
>
> On Mon, Feb 10, 2014 at 1:43 PM, Bert Freudenberg <bert at freudenbergs.de>wrote:
>
>> On 2014-02-10, at 10:42, Vaidotas Didžbalis <vaidasd at gmail.com> wrote:
>>
>> > Hello,
>> > Yes, it is the case when underscore displayed as a left arrow.
>>
>> How do you enable the left arrows?
>>
>> - Bert -
>>
>>
>>
>>
>>
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20140217/1ce14a10/attachment.htm


More information about the Squeak-dev mailing list