[FIX] Better password font handling when TrueTypeTextStyles installed

Andreas Raab andreas.raab at gmx.de
Mon Jan 6 20:57:59 UTC 2003


Yoshiki,

>   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.

How about just adding an "other point size" menu item to the font
selection?! Then you could type in the font size you need the system
would render it and be done. Next time you go there you find it in the
list just like the other pre-rendered ones.

Cheers,
  - Andreas

> -----Original Message-----
> From: squeak-dev-admin at lists.squeakfoundation.org 
> [mailto:squeak-dev-admin at lists.squeakfoundation.org] On 
> Behalf Of Yoshiki.Ohshima at acm.org
> Sent: Monday, January 06, 2003 9:51 PM
> To: squeak-dev at lists.squeakfoundation.org
> Cc: Phil Hargett
> Subject: Re: [FIX] Better password font handling when 
> TrueTypeTextStyles installed
> 
> 
>   Phil,
> 
>   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