[squeak-dev] FontSubstitutionDuringLoading -> MissingFont?

Frank Shearar frank.shearar at gmail.com
Thu Nov 28 20:35:09 UTC 2013


One way in which Graphics depends on System is through the resumable
exception FontSubstitutionDuringLoading. StrikeFont class >>
#familyName:size: uses it to signal that a font family is missing, and
ProjectLoading uses it to record missing fonts.

The relationship is entirely reasonable, but problematic from a module
point of view: it entangles a low level package (Graphics) with a mid-
to high-level package (System).

I propose the following:
* rename FontSubstitutionDuringLoading to MissingFont.
* Update the three references to MissingFont.
* move MissingFont to Graphics.

This preserves the behaviour, but suggests what the problem is rather
than under what circumstances the problem appears. More importantly
though, it means that Graphics depends that much less on System.

Thoughts?

(This has the side effect of removing the problems that I reported
yesterday regarding not being able to see all users of
FontSubstitutionDuringLoading - the new MissingFont literals are all
ClassBindings. However, note that during the class rename I didn't see
all the places I needed to change, presumably because of the
Alias/ClassBinding discrepancy.)

frank


More information about the Squeak-dev mailing list