[Pharo-dev] TxText model

Thierry Goubier thierry.goubier at gmail.com
Mon Apr 4 11:17:44 EDT 2016


2016-04-04 17:07 GMT+02:00 Igor Stasenko <siguctua at gmail.com>:

>
>
>> For now, external objects can't extend below the baseline.
>>
>
> Slightly not like that. An external object are bound to concrete position
> in text. And layout of a single line are computed based on dimensions of
> that object, as well as dimensions of other parts of a line. The text flow
> are not affected by the object in terms that there is no capability to
> compute wrapping text around it or align it left/right whatever separately
> from text. It means that basically external object is like a special kind
> of glyph/icon that uses same layout rules as character glyphs, but just
> rendered separately.
>

I understood as much. I've just seen code that such a "special" glyph can
only contribute to text ascent (since, per comment, it is aligned to the
baseline). Not very important, just a detail.


>
>>
>> Position inside spans can be ambiguous: last position of a span and first
>> position of the next span are the same position.
>>
>> Well, for some operation the are treated as same, for some - don't.
> Since there's nothing can be between two positions at the ends of adjacent
> spans, from standpoint of user they represent same position in text. But
> from standpoint of model they are different since position are belong to
> different spans.
> Sure thing, there certain pieces added to avoid problems with such
> ambiguity, so that it don't causing problems on user-level.
>

Ok.

Thierry
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.pharo.org/pipermail/pharo-dev_lists.pharo.org/attachments/20160404/07151086/attachment.html>


More information about the Pharo-dev mailing list