MS Font gives Square box glyphs in TextMorphs: why?

Gary Chambers gazzaguru at btinternet.com
Sat Sep 9 09:02:56 UTC 2006


Seems thr problem is somewhere in the DisplayScanner classes in that it
prints the glyph regardless of the stop condition.

Here's another workaround (which you may not like).

In TTCFont

glyphInfoOf: aCharacter into: glyphInfoArray
	"Answer the width of the argument as a character in the receiver."

	| form |
	(self hasGlyphOf: aCharacter) ifFalse: [
		^ self fallbackFont glyphInfoOf: aCharacter into: glyphInfoArray.
	].
	form := self formOf: aCharacter.
	glyphInfoArray at: 1 put: form;
		at: 2 put: 0;
		at: 3 put: ((aCharacter isSeparator and: [aCharacter ~= Character space])
						ifTrue: [0] ifFalse: [form width]);
		at: 4 put: (self ascentOf: aCharacter);
		at: 5 put: self.
	^ glyphInfoArray.

> -----Original Message-----
> From: squeak-dev-bounces at lists.squeakfoundation.org
> [mailto:squeak-dev-bounces at lists.squeakfoundation.org]On Behalf Of
> Andreas Raab
> Sent: 09 September 2006 8:58 AM
> To: The general-purpose Squeak developers list
> Subject: Re: MS Font gives Square box glyphs in TextMorphs: why?
>
>
> Don't. This is changing the font and a workaround at best. (Interpreted)
> whitespaces (tab, cr) should never be printed as glyphs - there is
> something wrong in the printing mechanism (which I need to look at and
> fix). If you want to help, file a bug instead.
>
> Cheers,
>    - Andreas
>
> stéphane ducasse wrote:
> > Where?
> > Where should this expression should be added?
> > We should fix and incorporate these changes
> >
> > Stef
> >
> > On 9 sept. 06, at 00:00, Yoshiki Ohshima wrote:
> >
> >>
> >> Evaluate:
> >>     TTFontDescription allInstancesDo: [:each | each
> >> blankGlyphForSeparators].
> >>
> >> it should have been done automatically...
> >>
> >> -- Yoshiki
> >>
> >
> >
> >
>
>




More information about the Squeak-dev mailing list