Google Summer of Code Intern has Text Layout Problem
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.
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
>> 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
>> 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
>> 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.
>> > 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
>> > 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
>> > 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
>> 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
>> to render the text including box as an embedded object within the
>> P.S. Users these days consider InDesign level text layout and
>> as "basic". No kidding...
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Squeak-dev