Google Summer of Code Intern has Text Layout Problem

Todd Blanchard tblanchard at mac.com
Tue Jul 17 17:04:30 UTC 2007


Thanks, we will explore these approaches.  As to the best way to  
embed the morph - is the

	anchorMorph: aMorph at: aPoint type: anchorType

the key method I want?  Also, is TextMorph best?  I notice there are  
a lot of variants.

-Todd

On Jul 16, 2007, at 7:00 PM, sig wrote:

> You can put TextMorph inside a TransformMorph , to make layout  
> management simple
>
> On 16/07/07, Gary Chambers <gazzaguru2 at btinternet.com> wrote:
>> Probably best to put the text morph inside another morph that  
>> handles the
>> border...
>> I still have some problems with this, but maybe down to using  
>> different font
>> technologies (TTCFont; FreeTypeFont etc.).
>> I do find that the margins on TextMotph work, though need a bit of  
>> cajojing
>> to actually update the layout!
>>
>> -----Original Message-----
>> From: squeak-dev-bounces at lists.squeakfoundation.org
>> [mailto:squeak-dev-bounces at lists.squeakfoundation.org] On Behalf  
>> Of Michael
>> Rueger
>> Sent: 16 July 2007 5:50 pm
>> To: The general-purpose Squeak developers list
>> Subject: Re: Google Summer of Code Intern has Text Layout Problem
>>
>>
>> Todd Blanchard wrote:
>> > I don't understand too well how Squeak's styled text works.   
>> However,
>> > my
>>
>> me neither ;-)
>>
>> > Google Summer of Code intern has some questions about it that I'm
>> > hoping
>> > someone more knowledgeable can answer.
>>
>> Apologies for not answering earlier to your request, somehow  
>> scrolled of
>> my list...
>>
>> > This is some <b>bold</b> text.
>> >
>> > I'm sure you get that.  CSS uses a box model.  Useful diagram here:
>> > http://www.w3.org/TR/REC-CSS2/box.html
>> > He's trying to figure out what to do if the user creates a style  
>> that
>> > says the b style has 20 pixel margins with a line border.  How  
>> does he
>> > get the text to layout right and get the size/shape of the  
>> enclosure to
>> > draw the borders?  Extra tricky if the bold section wraps for some
>> > fraction of lines.  Is there an easy api he can use to embed  
>> wrappers
>> > around styles such that he can fiddle the margins/borders?
>>
>> Hmm, judging from the hoops we to jump through in Sophie he will do a
>> line based layout/composition, as the the 20 pixel margin would  
>> require
>> to also increase the line spacing around that line?
>> The then needs to implement rendering runs to display the  
>> decoration for
>> the length of the affected text. Including handling the special  
>> cases of
>> what to do at line breaks etc.
>>
>> Welcome to the wonderful world of "basic" text editing and layout ;-)
>>
>> Some Squeak text layout guru probably could come up with clever  
>> tricks
>> to render the text including box as an embedded object within the  
>> Squeak
>> text.
>>
>> Michael
>>
>> P.S. Users these days consider InDesign level text layout and  
>> processing
>> as "basic". No kidding...

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20070717/0ab90447/attachment.htm


More information about the Squeak-dev mailing list