Mercurial > hg > xemacs-beta
comparison man/internals/internals.texi @ 3685:382b11fa8866
[xemacs-hg @ 2006-11-17 02:50:22 by stephent]
Fix breakage in xftFont resource for tabs and menubar.
<877ixuiy0n.fsf@uwakimon.sk.tsukuba.ac.jp>
author | stephent |
---|---|
date | Fri, 17 Nov 2006 02:50:32 +0000 |
parents | d08f0a2c8722 |
children | 5f25b1501bcd |
comparison
equal
deleted
inserted
replaced
3684:80b10d0ec1e1 | 3685:382b11fa8866 |
---|---|
27627 of @file{Xft}'s rendering functionality should be separated from use of | 27627 of @file{Xft}'s rendering functionality should be separated from use of |
27628 @file{fontconfig}. | 27628 @file{fontconfig}. |
27629 | 27629 |
27630 @item fontconfig | 27630 @item fontconfig |
27631 Fontconfig is dramatically different from the X model in several ways. | 27631 Fontconfig is dramatically different from the X model in several ways. |
27632 In particular, @emph{fontconfig always returns a font}. However, the | 27632 In particular, for the convenient interface @emph{fontconfig always |
27633 returns a font}. However, the | |
27633 font returned need not be anything like the desired font. This means | 27634 font returned need not be anything like the desired font. This means |
27634 that XEmacs must adopt a strategy of delegating the search to | 27635 that XEmacs must adopt a strategy of delegating the search to |
27635 fontconfig, then sanity-checking the return, rather than trying to use | 27636 fontconfig, then sanity-checking the return, rather than trying to use |
27636 the fontconfig API to search using techniques appropriate for the X11 | 27637 the fontconfig API to search using techniques appropriate for the X11 |
27637 core font API. | 27638 core font API. (This isn't actually true. fontconfig has more complex |
27639 interfaces which allow listing a subset of fonts that match a pattern, | |
27640 and don't go out of their may to return something no matter what. But | |
27641 the original patches didn't use this approach.) | |
27638 | 27642 |
27639 @item Font menus | 27643 @item Font menus |
27640 The @samp{Options->Font} and @samp{Options->Font Sizes} menus are | 27644 The @samp{Options->Font} and @samp{Options->Font Sizes} menus are |
27641 broken, by design, not just by @file{Xft}. Although they work better | 27645 broken, by design, not just by @file{Xft}. Although they work better |
27642 in Eric and Matthias's patch than in Stephen's, even their version has | 27646 in Eric and Matthias's patch than in Stephen's, even their version has |
27645 course scalable. But the whole idea of requiring that the font match | 27649 course scalable. But the whole idea of requiring that the font match |
27646 the size is strange. And the @samp{Options->Font Weights} menu is just | 27650 the size is strange. And the @samp{Options->Font Weights} menu is just |
27647 disabled, and has been for eons. | 27651 disabled, and has been for eons. |
27648 | 27652 |
27649 @item X resources | 27653 @item X resources |
27650 Currently in Stephen's patch there are @emph{four} treatments of font | 27654 Currently in Stephen's patch there are @emph{five} treatments of font |
27651 resources. There are the @samp{XEmacs.@var{face}.attributeFont} | 27655 resources. There are the @samp{XEmacs.@var{face}.attributeFont} |
27652 resources used to set a single global font specification. In the | 27656 resources used to set a single global font specification. In the |
27653 widgets, some (still) have a @samp{font} resource using the automatic | 27657 widgets, some (still) have a @samp{font} resource using the automatic |
27654 @file{Xt} resource conversion to @samp{FontStruct}, some have separate | 27658 @file{Xt} resource conversion to @samp{FontStruct}, some have separate |
27655 @samp{font} and @samp{xftFont} resources with the former automatically | 27659 @samp{font} and @samp{fcFontName} resources with the former automatically |
27656 converted to @samp{FontStruct} by @file{Xt} and the latter left as a | 27660 converted to @samp{FontStruct} by @file{Xt} and the latter left as a |
27657 string, to be converted by @samp{XftParseName} later, and some have a | 27661 string, to be converted by @samp{FcParseName} later, and some have a |
27658 single @samp{font} resource which is converted to @samp{FontStruct} by | 27662 single @samp{font} resource which is converted to @samp{FontStruct} by |
27659 @file{Xt} or the latter left as a string, depending on whether | 27663 @file{Xt} or the latter left as a string, depending on whether |
27660 @file{Xft} was enabled by @samp{configure} or not. | 27664 @file{Xft} was enabled by @samp{configure} or not. There is also the |
27665 @samp{xftFont} resource which may be retargeted to use an Xt converter | |
27666 function, but currently simply just an alias for the @samp{fcFontName} | |
27667 resource. | |
27661 | 27668 |
27662 Stephen thinks that all of these should be converted to use the face | 27669 Stephen thinks that all of these should be converted to use the face |
27663 approach, perhaps with some way to set specifications for individual | 27670 approach, perhaps with some way to set specifications for individual |
27664 widgets, frames, or buffers. This will require some careful design work | 27671 widgets, frames, or buffers. This will require some careful design work |
27665 to incorporate face support in the widgets. We should just accept any | 27672 to incorporate face support in the widgets. We should just accept any |
27892 depending on XEmacs's configuration and the font name seems error-prone | 27899 depending on XEmacs's configuration and the font name seems error-prone |
27893 at best. Probably we will should to a simple string representation for | 27900 at best. Probably we will should to a simple string representation for |
27894 this resource, and convert to a face in XEmacs rather than a font in | 27901 this resource, and convert to a face in XEmacs rather than a font in |
27895 Xt/Xft. | 27902 Xt/Xft. |
27896 @example | 27903 @example |
27897 XEmacs*Tabs.xftFont: Bitstream Vera Sans-16 | 27904 ! DEPRECATED resource xftFont. |
27898 XEmacs*menubar*xftFont: Bitstream Vera Sans-16 | 27905 ! To be retargeted to an Xt converter which returns a font. |
27906 !XEmacs*Tabs.xftFont: Bitstream Vera Sans-16 | |
27907 !XEmacs*menubar*xftFont: Bitstream Vera Sans-16 | |
27908 XEmacs*Tabs.fcFontName: Bitstream Vera Sans-16 | |
27909 XEmacs*menubar*fcFontName: Bitstream Vera Sans-16 | |
27899 XEmacs.modeline.attributeFont: Bitstream Charter-16 | 27910 XEmacs.modeline.attributeFont: Bitstream Charter-16 |
27900 XEmacs.default.attributeFont: Bitstream Vera Sans Mono-16 | 27911 XEmacs.default.attributeFont: Bitstream Vera Sans Mono-16 |
27901 @end example | 27912 @end example |
27902 I highly recommend use of a proportional font in the modeline because it | 27913 I highly recommend use of a proportional font in the modeline because it |
27903 allows a lot more text to fit there. (Previously the font sizes were | 27914 allows a lot more text to fit there. (Previously the font sizes were |
27904 quite varied, and there was a comment that this weirdness gave good | 27915 quite varied, and there was a comment that this weirdness gave good |
27905 balance. This isn't true on my main platform, Mac OS X, and needs to be | 27916 balance. This isn't true on my main platform, Mac OS X, and needs to be |
27906 rechecked on Linux, where it was observed.) | 27917 rechecked on Linux, where it was observed.) Note that you can probably |
27918 specify a particular Japanese font with something like | |
27919 @example | |
27920 XEmacs.default.attributeFont: Bitstream Vera Sans Mono,Sazanami Mincho-16 | |
27921 @end example | |
27922 Order is important; Japanese fonts will support English, but Sazanami's | |
27923 Roman characters are not very pretty compared to the Bitstream font. | |
27924 @strong{Note:} @emph{This is untested, but should work in theory.} | |
27907 @end itemize | 27925 @end itemize |
27908 | 27926 |
27909 | 27927 |
27910 | 27928 |
27911 @node Better Rendering Support -- Modern Font Support, , Better Rendering Support -- Configuration with the Interim Patches, Future Work -- Better Rendering Support | 27929 @node Better Rendering Support -- Modern Font Support, , Better Rendering Support -- Configuration with the Interim Patches, Future Work -- Better Rendering Support |