Mantis Bugtracker

Viewing Issue Simple Details Jump to Notes ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0003604 [Squeak] Graphics major always 05-11-06 01:39 07-23-07 02:39
Reporter andreas View Status public  
Assigned To andreas
Priority normal Resolution open  
Status assigned   Product Version 3.9
Summary 0003604: Rendering of synthesized bold/italic broken
Description I noticed this in the preferences tool where it says "Type here, hit Search" - bold and italic fonts look completely broken in the latest 3.9beta (see attacked screenshots).
Additional Information
Attached Files  TextPlain.gif [^] (2,062 bytes) 05-11-06 01:42
 TextBold.gif [^] (2,174 bytes) 05-11-06 01:43
 TextItalic.gif [^] (2,181 bytes) 05-11-06 01:43
 TextBoldItalic.gif [^] (2,142 bytes) 05-11-06 01:43
 ColAccurny24p5976.gif [^] (7,901 bytes) 07-13-06 03:52
 ColAccurny24p6665.morph [^] (30,904 bytes) 07-13-06 03:52
 ColAccuny24p5976.morph [^] (6,334 bytes) 07-13-06 03:55 [^] (942 bytes) 07-17-06 05:52 [^] (295 bytes) 07-17-06 05:53
 StrikeFontAsTnail-wiz.1.cs [^] (4,005 bytes) 07-17-06 05:54

- Relationships

SYSTEM WARNING: Creating default object from empty value

related to 0006554closed  in 7121 The font in the History of 3dot10 scrolling window is munged 
related to 0006703assigned andreas In sq7143 bolding an Accuny font produces noticable glitch for space. Other font weirdness too. 
child of 0006570assigned tim A Mother for font and font test problems 

- Notes
(0005662 - 483 - 537 - 537 - 537 - 537 - 537)
07-09-06 07:55

Some more research.

The font is Accuny 18pt

One problem seems to be the boxing of the font. This is true even for the normal font. Just type several spaces in a row. They are showing something of the font glyph that preceedes them.

The problem exist in 3.9a-6665 and not in 3.8a-so it seems it must have been introduced somewhere in 3.8-5976. I seem to remember another issue that mentioned this. Maybe its fixed in squeakland's version?

Yours in service, Jerome Peace
(0005698 - 1290 - 2257 - 2291 - 2291 - 2291 - 2291)
07-10-06 02:02

More analysis


( StrikeFontSet familyName: 'Accuny' size: 24 emphasized: 3) glyphs asMorph openInHand

( StrikeFont familyName: 'Accuny' size: 24 emphasized: 3) glyphs asMorph openInHand

I got two different sized forms

StrikeFontSet is recent and has several obvious bugs


yo 12/27/2002 13:52 StrikeFontSet makeBoldGlyphs {emphasis}

    "Make a bold set of glyphs with same widths by ORing 1 bit to the right
        (requires at least 1 pixel of intercharacter space)"

    | g bonkForm font |
    1 to: fontArray size do: [:i |
        font _ fontArray at: i.
        font ifNotNil: [
            g _ font glyphs deepCopy.
            bonkForm _ (Form extent: 1@16) fillBlack offset: -1@0. "***1@16?!***"
            self bonk: g with: bonkForm at: i.
            g copyBits: g boundingBox from: g at: (1@0)
                clippingBox: g boundingBox rule: Form under fillColor: nil.
            (fontArray at: i) setGlyphs: g.

Which hard codes a font height.

Also, though I haven't checked carefully. It seems to me the code for bonking is upsidedown because x@0 is the top of the form and you want to erase pixels at the bottom. This is why space has the bar at the bottomleft . it never gets erased.

I could find more but it seems to me its the coders problem to fix his mistakes.
(0005826 - 646 - 724 - 724 - 724 - 724 - 724)
07-13-06 04:02

For a dramatic test

Compare the gif  ColAccurny24p5976.gif
with the ColAccuny24p5976.morph that created it.

Load both into a fresh 3.9-7041 (or there abouts)

The gif and the morph have transparent backgrounds so they can be superimposed (move the morph over the gif so the column doesn't capture things)

Getting these two things to superpose exactly in all empasis could be made into a good automated test.

Yours in service, --Jerome Peace.

P.S. I couldn't find yo's initials in the send a note list. So I have not contacted him yet. If someone has a good way to get him involved please do so. His input should be present.
(0005951 - 1971 - 2170 - 2170 - 2170 - 2170 - 2170)
07-16-06 08:19

Hmm. More analysis.

I've looked at StrikeFont enough to learn that each character is supposed to come with its own 'space' as part of its width.

This suggest fixing the undefined character box so that it doesn't take up the whole glyph.

 This is just a minor portion of the trouble its not the cause of the problem.

 It also seems to me that the undefined characters only need to show up as one glyph with the map set to point to it at the appropriate times. This would make maintaining it easier. Non printing control characters would be mapped differently so the box would not appear for line feeds. Also the appearance or disappearence of the normally invisible characters could be controled by swapping maps.

In 3.7 the width of the glyphs grow when made bold or italic or both. The problem seems to be that that is not happening in the routines afer 3.8

So the bonking is clobbering part of the characters. usually the final part.

I propose testing this by having a test pattern font family.
The font would consist of glyph filling patterns (checker board or stripes or vertical or horizontal lines or boxes. ) Testing will show which demonstrates the problems best.
In each test font you would want a character of each width.
You would want a test font for each point size and for each accent/descent combination in that point size.

Then a prepared 'good' copy of the derived test fonts should exactly match a current derivation of the set. That would be the sunit test.

The test fonts would also want to have examples so they could be judged by eye as well. That will help diagnose what's gone wrong early in any development effort.

One of the things delaying me in doing this is I can't figure out how to fileout a strikefont from 3.7 (the last known working derived fonts were there.) In a way that they can be read back in to a later squeak.

So help would be appreciated.

Yours in serrvice, -- Jerome Peace
(0005958 - 1494 - 1766 - 1766 - 1876 - 1876 - 1876)
07-17-06 06:07

Useful goodies


From the cs preamble:
'From Squeak3.9alpha of 4 July 2005 [latest update: 0007045] on 16 July 2006 at 11:51:43 pm'!
"Change Set: StrikeFontAsTnail-wiz
Date: 16 July 2006
Author: (wiz) Jerome Peace

wiz 7/16/2006 23:36

Add display facilities to StrikeFont to help debug.

asThumbnail needs the ThumbnailImageMorph so this cs is relevant to 3.9 after that was introduced. Current squeak is now 7046 so any one after that will do.

colorFormMagnifiedBy: aNumber will work with any squeak as far back as 3.7 final. It returns a form which can be displayed.

The best use is to inspect the font in question and to eval

'self asThumbnail' or

'(self colorFormMagnifiedBy: 1)
    asMorph openCenteredInWorld.'

"! is worth considering as a enhancement to strike font. is catagorized as a morphic extention because of its dependence on a recently introduced morph. It needs to be loaded after the previious goodie.

StrikeFontAsTnail-wiz.1.cs is just a change set with the two goodies together. I uploaded mostly to get the preamble on record.
 If you are just debugging ( in beta 3.9) load the change set.

If you are updateing the graphics package go with the goodie since it doesn't cause mischief by reorganizing the catagories.

Yours in service, -- Jerome Peace

- Issue History
Date Modified Username Field Change
05-11-06 01:39 andreas New Issue
05-11-06 01:39 andreas Status new => assigned
05-11-06 01:39 andreas Assigned To  => KenCausey
05-11-06 01:39 andreas File Added: TextPlain.gif
05-11-06 01:40 andreas File Added: TextBold.gif
05-11-06 01:40 andreas File Added: TextItalic.gif
05-11-06 01:40 andreas File Added: TextBoldItalic.gif
05-11-06 01:42 andreas File Deleted: TextPlain.gif
05-11-06 01:42 andreas File Deleted: TextBold.gif
05-11-06 01:42 andreas File Deleted: TextItalic.gif
05-11-06 01:42 andreas File Deleted: TextBoldItalic.gif
05-11-06 01:42 andreas File Added: TextPlain.gif
05-11-06 01:43 andreas File Added: TextBold.gif
05-11-06 01:43 andreas File Added: TextItalic.gif
05-11-06 01:43 andreas File Added: TextBoldItalic.gif
05-11-06 19:05 KenCausey Assigned To KenCausey => andreas
05-11-06 19:05 KenCausey Category Any => Graphics
07-09-06 05:48 rootbeer Issue Monitored: rootbeer
07-09-06 07:55 wiz Note Added: 0005662
07-10-06 02:02 wiz Note Added: 0005698
07-13-06 03:52 wiz File Added: ColAccurny24p5976.gif
07-13-06 03:52 wiz File Added: ColAccurny24p6665.morph
07-13-06 03:55 wiz File Added: ColAccuny24p5976.morph
07-13-06 04:02 wiz Note Added: 0005826
07-16-06 08:19 wiz Note Added: 0005951
07-17-06 05:52 wiz File Added:
07-17-06 05:53 wiz File Added:
07-17-06 05:54 wiz File Added: StrikeFontAsTnail-wiz.1.cs
07-17-06 06:07 wiz Note Added: 0005958
07-03-07 03:48 wiz Relationship added related to 0006554
07-23-07 02:39 wiz Relationship added child of 0006570
10-03-07 05:45 wiz Relationship added related to 0006703

Mantis 1.0.8[^]
Copyright © 2000 - 2007 Mantis Group
107 total queries executed.
48 unique queries executed.
Powered by Mantis Bugtracker