|Anonymous | Login||08-12-2020 20:51 UTC|
|Main | My View | View Issues | Change Log | Docs|
|Viewing Issue Simple Details [ Jump to Notes ]||[ View Advanced ] [ Issue History ] [ Print ]|
|ID||Category||Severity||Reproducibility||Date Submitted||Last Update|
|0006715||[Squeak] Graphics||minor||N/A||10-09-07 16:39||10-09-07 20:11|
|Summary||0006715: An issue to collect font tests and font test knowledge|
An issue to collect font tests and font test knowledge.
There are quite a few reports on font bugs and font tests which when run set the image into an unexpected state.
The font tests are scattered over several different test suites.
The answer to some questions an problems are documented in some tests that I initially missed because the were marked as font tests.
So this report is dedicated to pulling together those tests and that knowledge so we can get better and stabler tests.
The piece of the test that is needed for all tests, saving and then restoring the state that gets changed duing testing was actually already written as a helper routine StandardSystemFontsTest>>saveStandardSystemFontsDuring:
So what imo is needed is to extract it or to subclass the other font tests to the class that has it and then write the tests as a block using the save...Dring: as a wrapper.
We also probably need to assure ourselves that the wrapper is up to date and covers all current known state.
Uploaded for documentation is the fileout of the current (7149) StandardSystemFontsTest class.
|Attached Files||StandardSystemFontsTest.st [^] (2,525 bytes) 10-09-07 16:39|
SYSTEM WARNING: Creating default object from empty value
(0011270 - 1631 - 1790 - 1790 - 1790 - 1790 - 1790)
Currently (as of sq 7149)
font tests are scattered into several suites and packages.
StandardSystemFontsTest only tests restoreStandardFonts but has the crucial helper wrapping method.
LangEnvBugs in Test-bugs
which tests a fix to #isFontAvailable by invoking some smalland font changes.
The fix which makes this test work actually breaks the correct working of #isFontAvailable and leaves the font state in a changed state.
Which makes it an even better test probe. It uncovers a lot of problems in fonts because the state it leaves things in causes system crashes when other tests are run.
which tests fonts w/o insuring any particular font state to begin with.
Several of these tests are in need of rewriting.
LocaleTest this tests language locales.
To go by the SBE books suggestion some of these tests are more acceptance tests (they rely on the internet to seek out and install the japanese font which creates a directory and downloads 2Meg worth of fonts) .
An sunit test would need a mock locale or something like that.
This also tests #isFontAvailable.
There are not a good suite of tests for smalland themes but those are the ones that extensively change fonts and such. They are also the trigger for finding many of the bugs such as infinite recursion in the TTCFont font methods.
The importance of the TTCFont code is that is works well enough to provide squeakland and oplc with a basis for i18n. The difficulty is that it is much in need of repair and before that can happen in documentation so that those other that the creator can repair it.
(0011271 - 1857 - 2440 - 2440 - 2440 - 2440 - 2440)
Other thoughts on font tests...
In addition to a state preserving method we need a way to temporarily set
font state during tests.
>>#setFontStateTo: [ font setting block ] during: [ font testing block ] .
which would allow the running of tests under many variants of font state and then restore the starting state.
The other thing I wonder about is that both the Preference class var Parameters and the global dictionary TextConstants hold changable font state.
TextConstant currently holds these texts defaults:
#DefaultEditMenu: a PopUpMenu
#DefaultEditMenuMessages: #(#again #copySelection #cut #paste #undo #save #cancel #align #fit)
#DefaultFixedTextStyle: a TextStyle Atlanta
#DefaultMarginTabsArray: #(#(24 24) #(48 48) #(72 72) #(96 96) #(120 120) #(144 144) #(168 168) #(192 192) #(216 216) #(240 240) #(264 264) #(288 288) #(312 312) #(336 336) #(360 360))
#DefaultMask: Color black
#DefaultMultiStyle: a TextStyle Accuny11(FontSet)
#DefaultTabsArray: #(24 48 72 96 120 144 168 192 216 240 264 288 312 336 360 384 408 432 456 480 504 528 552 576 600 624 648 672 696 720)
#DefaultTextStyle: a TextStyle Accuny12(FontSet)
and in Parameters
#eToysFont->TTCFont(BitstreamVeraSans 9 Bold) #haloLabelFont->a StrikeFontSet(Accuny12 12)
#paintBoxButtonFont->TTCFont(BitstreamVeraSansMono 9 Roman) #standardButtonFont->TTCFont(BitstreamVeraSansMono 9 Roman) #standardCodeFont->a StrikeFontSet(Accuny12 12) #standardFlapFont->a StrikeFont(Accushi12 15) #standardListFont->a StrikeFontSet(Accuny12 12) #standardMenuFont->a StrikeFontSet(Accuny12 12)
#windowTitleFont->TTCFont(BitstreamVeraSans 12 Bold) )
I may have missed some relevant state but thats most of it.
|10-09-07 16:39||wiz||New Issue|
|10-09-07 16:39||wiz||Status||new => assigned|
|10-09-07 16:39||wiz||Assigned To||=> andreas|
|10-09-07 16:39||wiz||File Added: StandardSystemFontsTest.st|
|10-09-07 16:41||wiz||Relationship added||child of 0006570|
|10-09-07 16:43||wiz||Relationship added||related to 0006571|
|10-09-07 19:59||wiz||Note Added: 0011270|
|10-09-07 20:11||wiz||Note Added: 0011271|
| Mantis 1.0.8[^]
Copyright © 2000 - 2007 Mantis Group
50 total queries executed.|
36 unique queries executed.