Without meaning to prejudge the question whether CharStyles should be
insets, here's my list of things that ought to be done if they are going
to stay that way. They are addressed specifically to what Abdel was
calling the "look and feel" aspect of charstyles, which are in principle
independent of the underlying representation. There are reasons to like
the inset representation, as I and others have said elsewhere. So it
seems at least worth opening a discussion about how, to borrow some
language from JMarc, the underlying data structure could be hidden from
the user and charstyles integrated more directly into the editing process.
So here's my list. Feel free to add to it, etc. Maybe it should go on
the wiki. I think if a handful of us committed ourselves to sorting this
out, it could be done fairly quickly.
1. There should be an "Invisible" geometry for charstyle insets, in
which they simply draw the text and give no other indication that the
text so drawn is any different from any other text. Invisible should be
the default, unless overridden in the layout file. It should be possible
to toggle this globally. Perhaps mouseover should cause some sort of
visible change, too, to make the insets "discoverable".
2. Backspace and delete across Invisible inset boundaries should just
work---not dissolve the inset, but do what you'd expect it to do.
3. Cursor movement around Invisible insets should be more natural. If
the inset is Invisible, then the boundary of the inset should be
invisible to the cursor. There's an implementation decision here: should
a cursor at the front/back of the inset count as inside it or outside
it? The Bidi folks may know the answer, as this problem arises in that
context very clearly. It's also a nice question what other editors do.
4. Inset dissolving should be more intuitive. There should be a menu
item "Remove charstyle"---it doesn't have to be called that---that
dissolves the current (innermost) inset. Maybe there should also be a
"Change charstyle" menu that duplicates the Insert menu, again applying
to the innermost inset. It's fine if backspace at the front of a
/non-Invisible/ inset should continue to dissolve it; but if it does,
then so should delete from just in front of it, as should backspace just
after it, etc. (This is the old WordPerfect behavior with regard to
embedded codes.) Alternatively, if you have the menu item, maybe you
have backspace and delete work in the obvious way.
5. Charstyle drawing shouldn't mess up line breaking the way it does
now. The insets get drawn as if they are single characters, so you end
up with:
This is some
text. This is some
text.
[http://really.long.url.that.messes.up.the.line.breaking].
This is not good. CharStyle insets should be drawable across lines in
the natural way.
6. We need an integrated CharStyle editor.
The last will take some work, but it's independent of whether we've got
insets or whatever. The only other one that seems to me to pose any real
serious problem is (5), and I know nothing about drawing, so others will
have to say whether this is possible, easy, hard, etc.
Richard