[ENH][FIX] RE: [FIX] Better password font handling when TrueTypeTextStyles installed
andreas.raab at gmx.de
Sun Jan 5 16:08:18 UTC 2003
Attached is a class "PasswordFont" which transparently wraps any font
and simply substitutes asterisks in place of the actual characters
drawn. This will work with both, "regular" strike fonts and Yoshikis
beautiful AA fonts.
> -----Original Message-----
> From: squeak-dev-admin at lists.squeakfoundation.org
> [mailto:squeak-dev-admin at lists.squeakfoundation.org] On
> Behalf Of Phil Hargett
> Sent: Sunday, January 05, 2003 4:32 PM
> To: squeak-dev at lists.squeakfoundation.org
> Subject: [FIX] Better password font handling when
> TrueTypeTextStyles installed
> 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
> to $* before display, which this effectively achieves as well, but at
> seemingly high cost for such a conceptually simple operation.
> 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! :)
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 2200 bytes
Desc: not available
Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20030105/696229ba/PasswordFont-ar.1.obj
More information about the Squeak-dev