Re: latest auctex CVS fails to load under xemacs 21.5.19

Ralf Angeli <[email protected]> Wed, 16 Mar 2005 11:07:16 +0100
Newsgroups gmane.emacs.auc-tex
Message-ID <[email protected]>
* David Kastrup (2005-03-15) writes:

> Ralf Angeli <[email protected]> writes:
>
>> Oh great.  `font-size' can return a string _and_ a number?  The
>> function unfortunately is not documented.  But looking at
>> `x-font-create-object' it seems that it may return a number if the
>> font name includes the size in points and a string if this is not
>> the case but the size in pixels is given.  And to make it even more
>> interesting it can return nil if no size is specified.
>
> I suppose this is one of those cases Stephen was referring to when he
> said that XEmacs chose not to follow Emacs' deficient APIs in all
> cases.
>
> Sorry, could not resist.  I tried.  Wouldn't do.

Well, at least you are better off than me.  My tongue is bleeding from
biting on it.

> I almost think this might be worth filing a bug report: if the
> function is not documented and returns inconsistent stuff, chances are
> that it is the completely wrong interface to use and people on the
> xemacs-beta list might tell you what to do instead.

Probably.

> We _do_ have font size calculating code in preview/prv-xemacs.el.  It
> might be worth taking a look there: AFAIR, this worked pretty well
> consistently.

What prv-xemacs.el basically does is this:

(round (/ (* (/ 720.0 25.4)
	     (face-height 'default)
	     (device-mm-height))
	  (device-pixel-height)))

I don't know what the resulting value is supposed to be.  Points?
Anyway, it works with `face-height' which looks as wrong as the
original definition we had in font-latex.

-- 
Ralf