>>>> "Vladimir" == Vladimir G Ivanovic
<vladimir(a)acm.org> writes:
Vladimir> The other is not being able to handle multiple,
Vladimir> proportionally spaced fonts on a single line along with
Vladimir> different styles (bold, italic, etc.)
> What do you mean by "not handle"?
Vladimir> How do I create and display text that has "Times Roman"
Vladimir> in Times Roman and "Helvetica" in Helvetica?
There are a number of alternatives, depending on your application.
XEmacs is not a wordprocessor, and it is unlikely to become one any
time soon. I don't think any of the developers have much interest in
doing that, and creating a redisplay that could handle accurate
positioning, pagination, and all the rest would have to be done from
scratch.
It would not be hard to produce something that allows you produce
Memopad-quality printed output most of the time, and not too much
harder to do as well as Memopad all the time. But I don't think there
are very many Emacs users who care. Most people who use Emacs prefer
to use a real text justifier like TeX or troff for camera-ready copy,
HTML for web pages, and so on. If you really want WYSIWYG, use Word
or Framemaker or one of the *nix compatibles. If you want a
semi-realistic display in XEmacs of what LaTeX will do very nicely,
you can use preview-latex or AUC-TeX and customize the faces they use.
PSGML will do the same for *ML documents. And if you just want to do
it in XEmacs
(progn
(make-face 'tr "Times-Roman")
(set-face-font 'tr
"-adobe-times-medium-r-normal--*-120-*-*-*-*-iso8859-15")
(make-face 'hv "Helvetica")
(set-face-font 'hv
"-adobe-helvetica-medium-r-normal--*-120-*-*-*-*-iso8859-15")
(let ((here (point))
tre hve)
(insert "Times-Roman")
(setq tre (make-extent here (point)))
(set-extent-face tre (find-face 'tr))
(insert " ")
(setq here (point))
(insert "Helvetica")
(setq hve (make-extent here (point)))
(set-extent-face hve (find-face 'hv))))
does the trick. (The Windows version of the font name would be more
compact, but otherwise the code is the same.)
Granted, it wouldn't be hard (merely tedious) to cook up a library to
allow you to do that operation the same way that Memopad allows you to
do it. Why do we make it so "hard"? Because that's not what XEmacs
is for. Typically the more complex text processing tasks already
involve setting extents to delimit logical units of text, so you don't
need to make an extent, just grab the appropriate one. And logical
units (such as emphasis or comment or docstring) can be shared among
applications, so such common semantics typically already have faces
associated with them.
--
Institute of Policy and Planning Sciences
http://turnbull.sk.tsukuba.ac.jp
University of Tsukuba Tennodai 1-1-1 Tsukuba 305-8573 JAPAN
Ask not how you can "do" free software business;
ask what your business can "do for" free software.