[Bug] (Maybe) Problem with Display Capital Letters in Fonts
Mark Guzdial
guzdial at cc.gatech.edu
Fri May 26 15:25:18 UTC 2000
I posted this yesterday, but it seems to have got lost. I've built a
font using Bitfont from a freely-usable font called Ypatia where the
glyphs are mostly of Greek letters. (FileIn the .st file in
http://coweb.cc.gatech.edu:8888/cs2340/uploads/ypatia.zip, then do
"Ypatia installAsTextStyle") This is for a class project where
students are building math equation formatters in Squeak.
Here's the problem. The below generates a nice glyph:
('g' asParagraph textStyle: (TextStyle named: 'Ypatia')) display
But the capital version generates only a little white space:
('G' asParagraph textStyle: (TextStyle named: 'Ypatia')) display
However, this works fine (with extra whitespace, of course):
(' G ' asParagraph textStyle: (TextStyle named: 'Ypatia')) display
I found a workaround that works, by using a StringMorph to get it all
to format correctly:
yts := (TextStyle named: 'Ypatia').
s := (StringMorph contents: 'G' font: (yts fontOfSize: 10)).
s imageForm display
But I can't figure out why, i.e., what methods are being called
differently. My guess is that the boundingBox is somehow being
computed incorrectly, and that perhaps I need to fix something in my
generated font. But the fact that StringMorph handles it just fine
makes me think that there's something weird going on in DisplayText.
I'd like to be able to create a DisplayText of a string without
having to use StringMorphs. Any suggestions or fixes? Thanks!
Mark
--------------------------
Mark Guzdial : Georgia Tech : College of Computing : Atlanta, GA 30332-0280
Associate Professor - Learning Sciences & Technologies.
Collaborative Software Lab - http://coweb.cc.gatech.edu/csl/
(404) 894-5618 : Fax (404) 894-0673 : guzdial at cc.gatech.edu
http://www.cc.gatech.edu/gvu/people/Faculty/Mark.Guzdial.html
More information about the Squeak-dev
mailing list
|