[squeak-dev] The Trunk: Graphics-mt.469.mcz
commits at source.squeak.org
commits at source.squeak.org
Sun Jan 30 19:33:35 UTC 2022
Marcel Taeumel uploaded a new version of Graphics to project The Trunk:
http://source.squeak.org/trunk/Graphics-mt.469.mcz
==================== Summary ====================
Name: Graphics-mt.469
Author: mt
Time: 30 January 2022, 8:33:29.157695 pm
UUID: 39bf150b-8f33-2b42-9195-5a141ca51cca
Ancestors: Graphics-mt.468
Revise the fix for #hasGlyphForCode: from Graphics-mt.468 ... of course ... we must check +1 and +2. I even said so in the commentary. Sorry for the noise.
=============== Diff against Graphics-mt.468 ===============
Item was changed:
----- Method: StrikeFont>>hasGlyphForCode: (in category 'multibyte character methods') -----
hasGlyphForCode: aCharacterCode
"Note that missing glyphs are encoded as -1 in the xTable but to speed up the #widthOf: check, the next offset must be adjacent and thus be duplicated. For example: #(-1 -1 0 24 -1 -1 -1 24 48 -1 ...). Since aCharacterCode is 0-based, that codes offset is at +1 while its width needs to consult +2, too. See #widthOf:."
(aCharacterCode between: self minAscii and: self maxAscii)
ifFalse: [^ false].
+ (xTable at: aCharacterCode + 1) >= 0
+ ifFalse: [^ false].
(xTable at: aCharacterCode + 2) >= 0
ifFalse: [^ false].
^ true!
More information about the Squeak-dev
mailing list
|