On Mon, 10 Aug 2009 09:46:37 -0300 Thiago Borges Abdnur <bol...@gmail.com> said:
> On Sun, Aug 9, 2009 at 7:27 PM, Gustavo Sverzut Barbieri > <barbi...@profusion.mobi> wrote: > > > On Sat, Aug 8, 2009 at 11:24 AM, Thiago Borges Abdnur<bol...@gmail.com> > > wrote: > > > Hi guys! > > > > > > I'm trying to make a textblock wrap the text with wrap=word in style. > > It's > > > working, but when long words are set, it doesn't break them. Isn't there > > a > > > style option that tries to break the words and then, if there are words > > that > > > won't fit, break them as wrap=char does? > > > > not there. I could say "go and do it", but bear in mind that this is > > tricky to get good. I did it once (2002) for Freevo project and lots > > of heuristics to have something acceptable in English... Latex uses > > hypenization mappings to know where to break it, and it changes > > between languages... just doing naive "if not word, break at ANY char" > > is bad, and somethings can cause weird meanings... also, need to add > > "-" and accounting that is tricky as well, as kerning and ligatures > > may change the size, you cannot say width of "-" is W, so I need room > > to fit W... you need to add it and recalculate the size, possible > > going back more than one character. > > > > Anyway, it can be done, we could even do some good heuristics, but it > > consumes lots of manpower... if you want to give it a try, be my guest > > :-) > > > > That would be much more complex. Just breaking the text anywhere would work > nicely, as wrap=char does. > Another question: is there a way to know which part of the text didn't fit? > Maybe a way to calculate the hight the text will need, so it could be split > into various textblocks. Thing is I'm thinking of putting an image beside > the text, but to achieve that, I need two textblocks, and I need to know > what didn't fit in the first block. > > Any tips? > > Example: > ____ > || | Example example example | > ||____| example example example | > | example example example example | > | example example example example | this is something you'd want inside textblock - instead of working around it with hacks like multiple textblocks.. just add support for wrapping obstacles :) (this is a can of worms btw - obsctacles can be fixed in the world, relative to a text point (eg an inlined image). sizing of the obstacle may be fixed (explicitly set) or relative to font size, line height etc. it'd all need to be internal (and then u'd need a way to get the positioning of obstacles that are relative to text anchors so u canmove the obstacle objects there). let's not even talk about selections yet too :) -- ------------- Codito, ergo sum - "I code, therefore I am" -------------- The Rasterman (Carsten Haitzler) ras...@rasterman.com ------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel