[ENH] Display := when pretty printing ( [sm][et][er][cd] [approved] )

Richard A. O'Keefe ok at cs.otago.ac.nz
Mon Oct 13 23:01:45 UTC 2003


ducasse <ducasse at iam.unibe.ch> wrote:
	Thanks richard. I do not understand font and related issues but having 
	_ or and <- inconsistently is a problem.
	So what would be the solution?
	
There's a short term solution and a long term solution.

Short term:  whichever fonts Squeak is shipped with, FIX THEM so that they
contain exactly the same characters at all supported sizes.  This isn't
just a matter of left and up arrows.  For example, just now I started up
an out-of-the-box Squeak 3.5(5180), opened a Workspace, and did
	String streamContents: [:s |
	    32 to: 255 do: [:i |
	        s nextPut: (Character value: i)]]
and Print-It.  This gave me a string with printable characters, one would
hope.  The font was New York 12.  There are about 78 printing characters
above tilde, including a Euro sign.  (A Euro is an Australian marsupial,
basically a kind of kangaroo.)  Switch from New York 12 to New York 15,
and there are only 76 printing characters.  The Euro has disappeared, and
in place of one of the remaining printing characters there is now a blocky
drawing of a robot, which I must suppose is someone's idea of a joke.
Switch to New York 18, and the robot has disappeared, being replaced by a
heart sign.  Switch to New York 24, and the robot is back, the heart gone.
What's the good of having a Euro sign at only one size?  And of course the
set of printing characters in Atlanta is different again.

The variation in supported glyphs is particularly obnoxious when the
characters are part of Squeak's own basic syntax (left and up arrow).
However, it is so great that the "Apple" fonts make Squeak look silly
to ordinary users.  This is why so much effort has been put into things
like the Accu fonts and TrueType support and the BitStream Vera fonts,
and why it is so important that this stuff should be provided standard
in even the minimal image.

It is unfortunate that the BitStream Vera fonts that have been adapted
to Squeak don't seem to include left arrow or up arrow, or, for that
matter, a Courier-like font.

Long term:  support Unicode.  Everson Mono is a Unicode font available
as shareware from http://www.evertype.com/emono/  (currently 6000 characters
are supported).  Michael Everson might be sympathetic to including this in
Squeak.  Alan Wood's web site (http://www.alanwood.net/unicode) lists a
lot of fonts for various systems Unix, Windows, MacOS 9, MacOS X), at least
some of which are free.  One interesting set is the ClearlyU BDF font
(http://crl.nmsu.edu/~mleisher/cu.html), with >9000 characters.  There are
actually quite a few free fonts.  With >96 000 characters, Unicode 4 is
hard to support completely, but hey, 9000 characters is better than the
approximately 180 we can use in Squeak now.

I don't say it will be easy.  I for one would find it very difficult.
(I have a partly-built Smalltalk compiler and classes, built as an exercise
in understanding the ANSI Smalltalk standard.  If ever finished, the thing
will use Unicode.  But I've made my life easy by following ANSI's lead and
including no graphics whatsoever...)  But we _have_ to go there.



More information about the Squeak-dev mailing list