Fw: [BUG][FIX] StrikeFont: fonts in italics are incomplete

Boris Gaertner Boris.Gaertner at gmx.net
Sat Nov 16 19:22:14 UTC 2002


Hello Scott,

for the benefit of european Squeakers, I would like to see this fix
included into the standard image. Can you please give it a test?

Thank you a lot

Boris

----- Original Message -----
From: Boris Gaertner <Boris.Gaertner at gmx.net>
To: <squeak-dev at lists.squeakfoundation.org>
Sent: Sunday, October 06, 2002 12:38 PM
Subject: [BUG][FIX] StrikeFont: fonts in italics a incomplete


> This report is for Squeak 3.2, latest update: 4917
It applies also to Squeak 3.4alpha.
>
> As you know, a font in italics is a so-called derived font: It is created
> from the basal font by shearing. This is implemented in method
> StrikeFont>>makeItalicsGlyphs.
>
> Derived fonts are purged when you save the image; they are created
> again when they are needed. In Squeak 3.2, the fonts in italics do not
> include all glyphs of the basal font.
>
> To see that bug, do this:
> 1. Open a workspace, select the font style "NewYork' and
>    the font size 12.
>
> 2. Type this into the workspace and evaluate it with 'print it':
>     'Zw', (String with: (Character value: 16r9A)), 'lf'
>
>    This is the german word for 'twelve' and I gave it in the form
>    above because not all of you have german keyboards.
>
> 3. Now change the font to italics. (Press 'alt' and '8' simultaneously
>     to do that.) You see a space where the third letter should be shown.
>
> You can demonstrate this bug also with the accented characters that
> are needed to write french.
>
> My analysis showed that the glyph form for the font in italics is
> not created wide enough. To prove that, insert this statement
> in method makeItalicGlyphs:
>
> Transcript show: newGlyphs width printString;
>          show: '   ';
>          show: newXTable printString; cr.
>
> This statement should follow the assignment:
>
>  xTable _ newXTable.
>
> In method makeItalicGlyphs, a small extra width is added to
> the form that will take the new glyphs.  That extra width has
> to be added not once, but once for every glyph!
>
> So, instead of
>
>  newGlyphs _ Form extent: (glyphs width + extraWidth) @ glyphs height.
>
> we have to write:
>
>  newGlyphs _ Form extent: (glyphs width + (maxAscii + 1 -
> minAscii*extraWidth)) @ glyphs height.
>
> You find this change in tha attached change set.
>
> When you have installed the attached fix, you have to save and quit the
> image.
> As soon as you start again, derived fonts are created again when needed.
> When you repeat the test above, you will see all characters of the word.
>
> For the benefit of those that write european languages other than english,
> I recommend to add this fix to Squeak 3.2, too.
>
> Greetings,
> Boris
>
>


-------------- next part --------------
A non-text attachment was scrubbed...
Name: ItalicStrikeFont.2.cs
Type: application/octet-stream
Size: 1670 bytes
Desc: not available
Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20021116/a4323433/ItalicStrikeFont.2.obj


More information about the Squeak-dev mailing list