[FIX] Better password font handling when TrueTypeTextStyles installed

Yoshiki.Ohshima at acm.org Yoshiki.Ohshima at acm.org
Mon Jan 6 20:51:10 UTC 2003


  Thank you for trying it that deep.  I confess that I have never seen
it working on emergency evaluators, although I don't be surprized.

  The glyphMap should be honored in
TTCFont>>displayString:on:from:to:at:kern:.  Then what needed would be
to "copy" the font (in the current version, #copy and friends are
overridden so it might have to be changed), and set up the
characterToGlyphMap method appropriately.

  Other than this what I want to have is a way to "add" new size of
font easily.  The interface I'm thinking is to add a menu item in the
"font" halo to add new size.

  Thanks for the report.  It is helpful,

-- Yoshiki

> I use Yoshiki's excellent TrueType Text Styles throughout my image;
> however, when using TrueType fonts, anytime squeak needs to ask me for a
> password (e.g., when storing a changeset on an FTP server, when Scamper
> accesses a web site with a user ID / password field, etc.), I would
> receive a walkback on the StrikeFont class>>passwordFontSize: method.
> After reviewing the method and it's intent, I concluded that this line
> 	aFont := (StrikeFont familyName: #NewYork10 size: aSize) copy.
> was the culprit.  It would appear that the method is asking for a font
> with family name #NewYork10, and finds none, so the font on the default
> text style is used instead.  Because I use TrueType Text Styles everywhere
> (including as my default font, which works fine--even on emergency
> evaluators), a TTCFont is used.  However, the next several lines make
> assumptions about the font object retrieved, none of which are true for
> instances of TTCFont.
> If I ever have the time, I might try to understand why a special password
> font is used to display passwords rather than translate every character
> to $* before display, which this effectively achieves as well, but at
> seemingly high cost for such a conceptually simple operation.  Instead,
> I've chosen a simpler fix: change #NewYork10 to just #NewYork.  After
> that, everything works fine.  A non-TTCFont is found (at least in my
> image, but I suspect this will be true in others as well), passwords can
> be entered where necessary.
> Hope this is helpful! :)

More information about the Squeak-dev mailing list