Mercurial > hg > xemacs-beta
comparison man/internals/internals.texi @ 2406:87cfc6698054
[xemacs-hg @ 2004-11-26 07:37:48 by stephent]
more docs for sjt-xft branch <87is7tw190.fsf_-_@tleepslib.sk.tsukuba.ac.jp>
author | stephent |
---|---|
date | Fri, 26 Nov 2004 07:37:51 +0000 |
parents | a27c2650a716 |
children | ab71ad6ff3dd |
comparison
equal
deleted
inserted
replaced
2405:a27c2650a716 | 2406:87cfc6698054 |
---|---|
23076 specifiers and @file{fontconfig} overlap, we should consider using | 23076 specifiers and @file{fontconfig} overlap, we should consider using |
23077 @file{fontconfig} instead of @samp{XLFD} names. This implies that use | 23077 @file{fontconfig} instead of @samp{XLFD} names. This implies that use |
23078 of @file{Xft}'s rendering functionality should be separated from use of | 23078 of @file{Xft}'s rendering functionality should be separated from use of |
23079 @file{fontconfig}. | 23079 @file{fontconfig}. |
23080 | 23080 |
23081 @item Font menus | |
23082 The @samp{Options->Font} and @samp{Options->Font Sizes} menus are | |
23083 broken, by design, not just by @file{Xft}. Although they work better | |
23084 in Eric and Matthias's patch than in Stephen's, even their version has | |
23085 the problem that many fonts are unavailable because they don't match the | |
23086 current size---which is very strange, since @file{Xft} fonts are of | |
23087 course scalable. But the whole idea of requiring that the font match | |
23088 the size is strange. And the @samp{Options->Font Weights} menu is just | |
23089 disabled, and has been for eons. | |
23090 | |
23091 @item X resources | |
23092 Currently in Stephen's patch there are @emph{four} treatments of font | |
23093 resources. There are the @samp{XEmacs.@var{face}.attributeFont} | |
23094 resources used to set a single global font specification. In the | |
23095 widgets, some (still) have a @samp{font} resource using the automatic | |
23096 @file{Xt} resource conversion to @samp{FontStruct}, some have separate | |
23097 @samp{font} and @samp{xftFont} resources with the former automatically | |
23098 converted to @samp{FontStruct} by @file{Xt} and the latter left as a | |
23099 string, to be converted by @samp{XftParseName} later, and some have a | |
23100 single @samp{font} resource which is converted to @samp{FontStruct} by | |
23101 @file{Xt} or the latter left as a string, depending on whether | |
23102 @file{Xft} was enabled by @samp{configure} or not. | |
23103 | |
23104 Stephen thinks that all of these should be converted to use the face | |
23105 approach, perhaps with some way to set specifications for individual | |
23106 widgets, frames, or buffers. This will require some careful design work | |
23107 to incorporate face support in the widgets. We should just accept any | |
23108 or all of @samp{font}, @samp{fontSet}, and @samp{fontList} resources, | |
23109 treat them all as lists of font names, either @samp{XLFD}- or | |
23110 @file{fontconfig}-style, parse them ourselves (ie, not use the @file{Xt} | |
23111 resource manager), and add them to font specifiers as appropriate. But | |
23112 this will require a bit of thought to obey POLA vis-a-vis usual @file{Xt} | |
23113 conventions. | |
23114 | |
23081 @item Rendering engine objects | 23115 @item Rendering engine objects |
23082 With the introduction of the ``Xft patch,'' the X11, Macintosh, and MS | 23116 With the introduction of the ``Xft patch,'' the X11, Macintosh, and MS |
23083 Windows platforms are all able to support multiple font rendering | 23117 Windows platforms are all able to support multiple font rendering |
23084 engines in the same binary. Generically, there are several tasks that | 23118 engines in the same binary. Generically, there are several tasks that |
23085 must be accomplished to render text on the display. In both cases the | 23119 must be accomplished to render text on the display. In both cases the |
23149 relabel them. | 23183 relabel them. |
23150 | 23184 |
23151 A third problem is that you generally can't tell if there are ``holes'' | 23185 A third problem is that you generally can't tell if there are ``holes'' |
23152 in the repertoire until you try to display the glyph. | 23186 in the repertoire until you try to display the glyph. |
23153 | 23187 |
23188 All of this tends to break standard idioms for handling Mule fonts in | |
23189 @file{init} files because they depend on charsets being disjoint | |
23190 repertoires. | |
23191 | |
23154 The TrueType fonts (and the later OpenType standard) provides for a | 23192 The TrueType fonts (and the later OpenType standard) provides for a |
23155 proper character set query (as a Boolean vector indexed by Unicode code | 23193 proper character set query (as a Boolean vector indexed by Unicode code |
23156 points), as well as providing a list of supported languages. | 23194 points), as well as providing a list of supported languages. |
23157 | 23195 |
23158 I propose that we take advantage of these latter facilities by allowing | 23196 I propose that we take advantage of these latter facilities by allowing |
23179 | 23217 |
23180 Stephen has a branch containing his stuff in XEmacs CVS. The branch | 23218 Stephen has a branch containing his stuff in XEmacs CVS. The branch |
23181 point tag is @samp{sjt-xft-bp}, roughly corresponding to XEmacs 21.5.18, | 23219 point tag is @samp{sjt-xft-bp}, roughly corresponding to XEmacs 21.5.18, |
23182 and branch tag is @samp{sjt-xft}. | 23220 and branch tag is @samp{sjt-xft}. |
23183 | 23221 |
23222 @subsubsection Bugs Reported in sjt-xft | |
23223 | |
23224 @table @code | |
23225 @item ChangeLogs | |
23226 A lot of these, especially for Eric and Matthias's work, are missing. | |
23227 Mea culpa. | |
23228 | |
23229 @item Options->Font | |
23230 @itemx Options->Font Size | |
23231 These menus don't work. All fonts are greyed out. All sizes are | |
23232 available, but many (most?) faces don't change size, in particular, | |
23233 @samp{default} does not. | |
23234 @end table | |
23235 | |
23236 | |
23184 @node Better Rendering Support -- Configuration with the Interim Patches, , Better Rendering Support -- Current Status, Future Work -- Better Rendering Support | 23237 @node Better Rendering Support -- Configuration with the Interim Patches, , Better Rendering Support -- Current Status, Future Work -- Better Rendering Support |
23185 @subsection Better Rendering Support -- Configuration with the Interim Patches | 23238 @subsection Better Rendering Support -- Configuration with the Interim Patches |
23186 @cindex better rendering support, configuration with the interim patches | 23239 @cindex better rendering support, configuration with the interim patches |
23187 @cindex configuration with the interim patches, better rendering support | 23240 @cindex configuration with the interim patches, better rendering support |
23188 | 23241 |
23192 @itemize | 23245 @itemize |
23193 @item | 23246 @item |
23194 The only way to configure widget fonts at the present time is to use X | 23247 The only way to configure widget fonts at the present time is to use X |
23195 resources (or hack the source and rebuild). Currently supported widgets | 23248 resources (or hack the source and rebuild). Currently supported widgets |
23196 are | 23249 are |
23197 @itemize | 23250 @itemize |
23198 @item | 23251 @item |
23199 menubars | 23252 menubars |
23200 @item | 23253 @item |
23201 tab controls | 23254 tab controls |
23202 @end itemize | 23255 @end itemize |
23256 | |
23257 Here are the resources I use. @strong{Warning:} @emph{This interface | |
23258 will change.} The tab control has separate Font and XftFont resources, | |
23259 and uses the X resource manager to instantiate a FontStruct from the | |
23260 Font resource. The menubar on the other hand uses Font for both, but | |
23261 converts to FontStruct if Xft is not compiled in, and leaves it as a | |
23262 string if Xft is compiled in. There is no equivalent facility for | |
23263 XftFont yet, and creating one that handles both FontStruct and XftFont | |
23264 depending on XEmacs's configuration and the font name seems error-prone | |
23265 at best. Probably we will revert to a simple string representation for | |
23266 this resource, and convert to a face in XEmacs rather than a font in | |
23267 Xt/Xft. | |
23268 @example | |
23269 XEmacs*Tabs.xftFont: Bitstream Vera Sans-18 | |
23270 XEmacs*menubar.font: Bitstream Vera Sans-18 | |
23271 XEmacs.modeline.attributeFont: Bitstream Charter-26 | |
23272 XEmacs.default.attributeFont: Bitstream Vera Sans Mono-24 | |
23273 @end example | |
23274 No, I don't understand why I need to use different point sizes to get | |
23275 what looks like good balance to my eyes. I do highly recommend use of a | |
23276 proportional font in the modeline because it allows a lot more text to | |
23277 fit there. | |
23278 | |
23203 @item | 23279 @item |
23204 Because fonts supporting other languages tend to support English as | 23280 Because fonts supporting other languages tend to support English as |
23205 well, if you want to use one font for English and another for the other | 23281 well, if you want to use one font for English and another for the other |
23206 language, you must use the @code{append} method when adding font | 23282 language, you must use the @code{append} method when adding font |
23207 specifications for the other language. | 23283 specifications for the other language. |