At 01:54 PM 2/18/2002 +0900, Stephen J. Turnbull wrote:
Why not? It's the obvious solution, in fact it's equivalent
to the
one you propose in this case (since no repositioning is required), and
works fine for preview-latex. (This isn't quite true, as AFAIK the
glyph mechanism only supports glyphs that index into fonts for the
mouse cursor glyphs. However, it should be reasonably easy to
encapsulate raw "runs of runes", ie character/font aggregrates, in a
glyph.)
I guess I don't understand what you mean here. Text glyphs are supposed to
address this, although some of the sizing issues are still unresolved.
Jonathan> It would seem to me to be the next logical step in
Jonathan> xemacs - add x-offset, y-offset attributes.
This is probably reasonable, since it only involves recomputing the
height of the line. Computing line heights is something that is quite
buggy in Mule, at least, so it might be possible to get this and fix
the bugs for the same amount of effort. But note that this is not
sufficient to get fractions, you also need to add horizontal kerning.
I beefed this up a lot in 21.4 so that it is possible to start a line at an
arbitrary Y-position. This was intended for pixel-based scrolling, but I
guess could be adapted for other uses. The X-position is still to be done
(pixel based horinzontal scrolling) and is actually a lot harder.
Actually what you want to do could be acomplished using the new layout
glyph support. This allows you to embed glyphs inside other glyphs
including psuedo-glyphs that do horizontal and vertical alignment. Thus it
would be trivial to create a glyph that displays two text glyphs and a
line. See test/glyph-test.el for details. Something like:
(set-extent-begin-glyph
(make-extent (point) (point))
(make-glyph
`[layout :descriptor "A Fraction"
:orientation vertical
:justify center
:items ([text :data "1"] [text :data "2"])]))
(this doesn't work and I don't have time right now to work out why).
Jonathan> While your at it, make it an orthogonal set of
Jonathan> attributes with text alignment, text direction,
bounding
Jonathan> boxes, inline and floating elements, on top of the
Jonathan> current font and color attributes.
Most of this can be done already with the glyph layout stuff. I'm always
interested in new customers ... :)
andy