CVS update by stephent xemacs/man/internals ...
xemacs-cvs at xemacs.org
xemacs-cvs at xemacs.org
Thu Nov 16 21:50:35 EST 2006
User: stephent
Date: 06/11/17 03:50:34
Modified: xemacs/man/internals internals.texi
Log:
Fix breakage in xftFont resource for tabs and menubar.
<877ixuiy0n.fsf at uwakimon.sk.tsukuba.ac.jp>
Revision Changes Path
1.90 +15 -0 XEmacs/xemacs/lwlib/ChangeLog
Index: ChangeLog
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/lwlib/ChangeLog,v
retrieving revision 1.89
retrieving revision 1.90
diff -u -p -r1.89 -r1.90
--- ChangeLog 2006/06/19 18:19:33 1.89
+++ ChangeLog 2006/11/17 02:50:22 1.90
@@ -1,3 +1,18 @@
+2006-11-17 Stephen J. Turnbull <stephen at xemacs.org>
+
+ * xlwmenu.c (xlwMenuResources):
+ * xlwmenu.c (XlwMenuInitialize):
+ * xlwmenuP.h (_XlwMenu_part):
+ * xlwtabs.c (resources):
+ * xlwtabs.c (TabsInit):
+ * xlwtabsP.h (TabsPart):
+ New xftFontName member in each widget part struct, corresponds to
+ xftFont String resource.
+ Initialize renderFont private member from fcFontName if non-NULL,
+ otherwise initialize from xftFontName.
+
+ * xlwtabs.h: Update parameter table.
+
2006-06-16 Jerry James <james at xemacs.org>
* lwlib-Xlw.c (xlw_scrollbar_callback): Do not dereference
1.43 +6 -3 XEmacs/xemacs/lwlib/xlwmenu.c
Index: xlwmenu.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/lwlib/xlwmenu.c,v
retrieving revision 1.42
retrieving revision 1.43
diff -u -p -r1.42 -r1.43
--- xlwmenu.c 2006/06/19 18:19:33 1.42
+++ xlwmenu.c 2006/11/17 02:50:22 1.43
@@ -95,11 +95,11 @@ xlwMenuResources[] =
#ifdef USE_XFT_MENUBARS
{XtNfcFontName, XtCFcFontName, XtRString, sizeof (String),
offset(menu.fcFontName),
- XtRString, (XtPointer) "Helvetica-12:bold"},
+ XtRString, (XtPointer) NULL},
/* #### This needs to be fixed to give a proper type and converter for
XftFonts. See also xlwtabs.c. */
- {XtNxftFont, XtCXftFont, XtRPointer, sizeof(XtPointer),
- offset(menu.renderFont), XtRPointer, (XtPointer) NULL },
+ {XtNxftFont, XtCXftFont, XtRString, sizeof(XtPointer),
+ offset(menu.xftFontName), XtRString, (XtPointer) "Helvetica-12:bold" },
#endif
# ifdef USE_XFONTSET
/* #### Consider using the same method as for Motif; see the comment in
@@ -3241,6 +3241,9 @@ XlwMenuInitialize (Widget UNUSED (reques
#endif
#ifdef USE_XFT_MENUBARS
+ /* #### kludge for name change */
+ if (!mw->menu.fcFontName)
+ mw->menu.fcFontName = mw->menu.xftFontName;
/* to do this right, we should add a new Xt Resource type +
conversion function
*/
1.7 +1 -0 XEmacs/xemacs/lwlib/xlwmenuP.h
Index: xlwmenuP.h
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/lwlib/xlwmenuP.h,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -p -r1.6 -r1.7
--- xlwmenuP.h 2006/05/12 19:25:29 1.6
+++ xlwmenuP.h 2006/11/17 02:50:22 1.7
@@ -35,6 +35,7 @@ typedef struct _XlwMenu_part
XFontStruct * font;
#ifdef USE_XFT_MENUBARS
String fcFontName;
+ String xftFontName;
XftFont *renderFont;
#endif
# ifdef USE_XFONTSET
1.9 +8 -6 XEmacs/xemacs/lwlib/xlwtabs.c
Index: xlwtabs.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/lwlib/xlwtabs.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -p -r1.8 -r1.9
--- xlwtabs.c 2006/05/12 19:25:29 1.8
+++ xlwtabs.c 2006/11/17 02:50:22 1.9
@@ -153,11 +153,11 @@ static XtResource resources[] = {
/* #### Maybe use "-*-helvetica-bold-r-*-*-*-120-*-*-*-*-iso8859-1" here?
or XtDefaultFont? */
{XtNfcFontName, XtCFcFontName, XtRString, sizeof(String),
- offset(fcFontName), XtRString, (XtPointer) "AirCut-16" },
+ offset(fcFontName), XtRString, (XtPointer) NULL },
/* #### This needs to be fixed to give a proper type and converter for
XftFonts. See also xlwmenu.c. */
- {XtNxftFont, XtCXftFont, XtRPointer, sizeof(XtPointer),
- offset(renderFont), XtRPointer, (XtPointer) NULL },
+ {XtNxftFont, XtCXftFont, XtRString, sizeof(String),
+ offset(xftFontName), XtRString, (XtPointer) "Helvetica-12" },
#endif
{XtNinternalWidth, XtCWidth, XtRDimension, sizeof(Dimension),
offset(internalWidth), XtRImmediate, (XtPointer)4 },
@@ -479,10 +479,12 @@ TabsInit(Widget request, Widget new_, Ar
newTw->tabs.tab_height = 2 * newTw->tabs.internalHeight + SHADWID ;
#ifdef USE_XFT_TABS
+ /* #### kludge for name change */
+ if (!newTw->tabs.fcFontName)
+ newTw->tabs.fcFontName = newTw->tabs.xftFontName;
/* must get font here
- to do this right, we should add a new Xt Resource type +
- conversion function
- */
+ #### to do this right, we should add a new Xt Resource type +
+ conversion function */
newTw->tabs.renderFont =
xft_open_font_by_name (XtDisplay ((Widget) newTw),
newTw->tabs.fcFontName);
1.4 +2 -2 XEmacs/xemacs/lwlib/xlwtabs.h
Index: xlwtabs.h
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/lwlib/xlwtabs.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -p -r1.3 -r1.4
--- xlwtabs.h 2006/05/12 19:25:29 1.3
+++ xlwtabs.h 2006/11/17 02:50:22 1.4
@@ -44,8 +44,8 @@
Name Class RepType Default Value
---- ----- ------- -------------
font Font XFontStruct* XtDefaultFont
- fcFontName FcFontName String AirCut-16 *0
- xftFont XftFont XtPointer NULL *8
+ fcFontName FcFontName String NULL *0
+ xftFont XftFont String Helvetica-12 *8
internalWidth Width Dimension 4 *1
internalHeight Height Dimension 2 *1
topWidget TopWidget Widget *2
1.5 +1 -0 XEmacs/xemacs/lwlib/xlwtabsP.h
Index: xlwtabsP.h
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/lwlib/xlwtabsP.h,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -p -r1.4 -r1.5
--- xlwtabsP.h 2006/05/12 19:25:29 1.4
+++ xlwtabsP.h 2006/11/17 02:50:23 1.5
@@ -76,6 +76,7 @@ typedef struct {
#ifdef USE_XFT_TABS
XftFont *renderFont;
String fcFontName;
+ String xftFontName;
#endif
Dimension internalHeight, internalWidth ;
Widget topWidget ;
1.349 +8 -0 XEmacs/xemacs/man/ChangeLog
Index: ChangeLog
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/man/ChangeLog,v
retrieving revision 1.348
retrieving revision 1.349
diff -u -p -r1.348 -r1.349
--- ChangeLog 2006/11/11 16:05:34 1.348
+++ ChangeLog 2006/11/17 02:50:30 1.349
@@ -1,3 +1,11 @@
+2006-11-16 Stephen J. Turnbull <stephen at xemacs.org>
+
+ * internals/internals.texi
+ (Better Rendering Support -- Configuration with the Interim Patches):
+ Fix examples of configuration via X resources.
+ (Better Rendering Support -- Implementation): Fix description of
+ xftFont resources, introduce fcFontName resource.
+
2006-11-11 Aidan Kehoe <kehoea at parhasard.net>
* lispref/faces.texi (Face Convenience Functions):
1.77 +27 -9 XEmacs/xemacs/man/internals/internals.texi
Index: internals.texi
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/man/internals/internals.texi,v
retrieving revision 1.76
retrieving revision 1.77
diff -u -p -r1.76 -r1.77
--- internals.texi 2006/07/07 23:01:06 1.76
+++ internals.texi 2006/11/17 02:50:32 1.77
@@ -27629,12 +27629,16 @@ of @file{Xft}'s rendering functionality
@item fontconfig
Fontconfig is dramatically different from the X model in several ways.
-In particular, @emph{fontconfig always returns a font}. However, the
+In particular, for the convenient interface @emph{fontconfig always
+returns a font}. However, the
font returned need not be anything like the desired font. This means
that XEmacs must adopt a strategy of delegating the search to
fontconfig, then sanity-checking the return, rather than trying to use
the fontconfig API to search using techniques appropriate for the X11
-core font API.
+core font API. (This isn't actually true. fontconfig has more complex
+interfaces which allow listing a subset of fonts that match a pattern,
+and don't go out of their may to return something no matter what. But
+the original patches didn't use this approach.)
@item Font menus
The @samp{Options->Font} and @samp{Options->Font Sizes} menus are
@@ -27647,17 +27651,20 @@ the size is strange. And the @samp{Opti
disabled, and has been for eons.
@item X resources
-Currently in Stephen's patch there are @emph{four} treatments of font
+Currently in Stephen's patch there are @emph{five} treatments of font
resources. There are the @samp{XEmacs. at var{face}.attributeFont}
resources used to set a single global font specification. In the
widgets, some (still) have a @samp{font} resource using the automatic
@file{Xt} resource conversion to @samp{FontStruct}, some have separate
- at samp{font} and @samp{xftFont} resources with the former automatically
+ at samp{font} and @samp{fcFontName} resources with the former automatically
converted to @samp{FontStruct} by @file{Xt} and the latter left as a
-string, to be converted by @samp{XftParseName} later, and some have a
+string, to be converted by @samp{FcParseName} later, and some have a
single @samp{font} resource which is converted to @samp{FontStruct} by
@file{Xt} or the latter left as a string, depending on whether
- at file{Xft} was enabled by @samp{configure} or not.
+ at file{Xft} was enabled by @samp{configure} or not. There is also the
+ at samp{xftFont} resource which may be retargeted to use an Xt converter
+function, but currently simply just an alias for the @samp{fcFontName}
+resource.
Stephen thinks that all of these should be converted to use the face
approach, perhaps with some way to set specifications for individual
@@ -27894,8 +27901,12 @@ at best. Probably we will should to a s
this resource, and convert to a face in XEmacs rather than a font in
Xt/Xft.
@example
-XEmacs*Tabs.xftFont: Bitstream Vera Sans-16
-XEmacs*menubar*xftFont: Bitstream Vera Sans-16
+! DEPRECATED resource xftFont.
+! To be retargeted to an Xt converter which returns a font.
+!XEmacs*Tabs.xftFont: Bitstream Vera Sans-16
+!XEmacs*menubar*xftFont: Bitstream Vera Sans-16
+XEmacs*Tabs.fcFontName: Bitstream Vera Sans-16
+XEmacs*menubar*fcFontName: Bitstream Vera Sans-16
XEmacs.modeline.attributeFont: Bitstream Charter-16
XEmacs.default.attributeFont: Bitstream Vera Sans Mono-16
@end example
@@ -27903,7 +27914,14 @@ I highly recommend use of a proportional
allows a lot more text to fit there. (Previously the font sizes were
quite varied, and there was a comment that this weirdness gave good
balance. This isn't true on my main platform, Mac OS X, and needs to be
-rechecked on Linux, where it was observed.)
+rechecked on Linux, where it was observed.) Note that you can probably
+specify a particular Japanese font with something like
+ at example
+XEmacs.default.attributeFont: Bitstream Vera Sans Mono,Sazanami Mincho-16
+ at end example
+Order is important; Japanese fonts will support English, but Sazanami's
+Roman characters are not very pretty compared to the Bitstream font.
+ at strong{Note:} @emph{This is untested, but should work in theory.}
@end itemize
More information about the XEmacs-CVS
mailing list