Re: font-latex-make-title-faces using scaled font height rather than size
David Kastrup <[email protected]> Thu, 10 Mar 2005 11:44:17 +0100
| Newsgroups | gmane.emacs.auc-tex |
|---|---|
| Message-ID | <[email protected]> |
Ralf Angeli <[email protected]> writes: > * Steven E. Harris (2005-03-09) writes: > >> Starting a new document and inserting a \section{} macro, I noticed >> the new font-latex-title-(1|2|3)-face fonts. The fonts looked too >> big to my taste, so I decided to look into how they're initialized >> to their default values. > > I had the same impression in case of XEmacs but didn't come around > figuring out a better alternative for `face-height'. > >> However, (face-height 'default) returns 16. Related functions >> `face-ascent' and `face-descent' return 12 and 4 respectively. They >> all add up, but these are apparently not font /sizes/. >> >> Using (face-height 'default) as the base size for scaling produces >> a family of 19, 23, and 28. More likely we're looking for a family >> that scales from a base of 10, producing 12, 14, and 17. >> >> We need some function to get the size of a face. In XEmacs, at >> least, I had a hard time figuring out how to get there, but did >> find a way. Unfortunately, it requires converting, string to a >> number, then a number to a string, concatenating that string with >> another, then using a regexp to pull that number back out of the >> string. Only the last part is my fault. > > Great! Thanks for looking at this. I checked a change based on > your findings into CVS. > > I don't know if GNU Emacs is any better, but it really is disgusting > through what hoops one has to jump to get the font size. There are not many hoops involved in the code preview-latex uses for that purpose. Even though we have to have a somewhat heavy-weight function for Emacs-21.x (we could just use the built-in functions when using Emacs-22, but I have not yet attempted figuring out the proper test for finding out whether the necessary functionality is there: it requires the 4-argument face-attribute function). -- David Kastrup, Kriemhildstr. 15, 44793 Bochum