mirror of
https://github.com/gryf/wmaker.git
synced 2025-12-19 04:20:27 +01:00
Started to move towards using xft2 only, for a unified font/locale handling
in WINGs
This commit is contained in:
@@ -5,8 +5,7 @@ SUBDIRS = wrlib WINGs src util po WindowMaker wmlib test WPrefs.app doc\
|
||||
|
||||
EXTRA_DIST = TODO BUGS BUGFORM FAQ FAQ.I18N FAQ.I18N.cs FAQ.I18N.sk \
|
||||
Install INSTALL.cs INSTALL.fr INSTALL.es INSTALL.pt INSTALL.sk \
|
||||
README.antialiasing README.definable-cursor README.pt \
|
||||
README.KDE README.GNOME Sample.XftConfig \
|
||||
README.definable-cursor README.pt README.KDE README.GNOME \
|
||||
MIRRORS COPYING.WTFPL mkpatch WindowMaker.lsm.in
|
||||
# libwmfun-0.0.3.tar.gz
|
||||
|
||||
|
||||
24
NEWS
24
NEWS
@@ -8,27 +8,11 @@ Antialiased font support
|
||||
------------------------
|
||||
|
||||
With the addition of support for antialiased fonts in the WINGs library, now
|
||||
Window Maker can also support antialiased fonts. However enabling them may
|
||||
prove not to be a trivial task to do. This is because enabling antialiased
|
||||
fonts doesn't depend solely on Window Maker and its configuration files. It
|
||||
also depends on the X server, the X server extension modules and their
|
||||
specific configuration files.
|
||||
Window Maker can also support antialiased fonts.
|
||||
|
||||
For a description of all the steps required to get antialiased fonts on
|
||||
screen please check the README.antialiasing file which describes all the
|
||||
things you need to do on a step by step basis. In addition it has extra
|
||||
useful hints and idea to make your antialiased fonts look nice in different
|
||||
contexts.
|
||||
|
||||
After you have done all the steps described there, you can enable antialiased
|
||||
fonts either by adding AntialiasedText = Yes; in ~/GNUstep/Defaults/WindowMaker
|
||||
or by launching WPrefs and checking the "Smooth font edges" in the Expert User
|
||||
Preferences panel.
|
||||
|
||||
As a general note you should always use a True Type font for your fonts if
|
||||
antialiasing is enabled, or alias a normal font to a True Type in the Xft
|
||||
configuration (read the details in README.antialiasing). Else you may get
|
||||
unepleasant results in the look of your screen :P
|
||||
Antialiased text can be enabled either by adding AntialiasedText = Yes;
|
||||
in ~/GNUstep/Defaults/WindowMaker or by launching WPrefs and checking the
|
||||
"Smooth font edges" in the Expert User Preferences panel.
|
||||
|
||||
|
||||
Global Submenus
|
||||
|
||||
@@ -1,154 +0,0 @@
|
||||
|
||||
Here is a step by step mini-HOWTO of the things needed to be done to get
|
||||
antialiased fonts in Window Maker quickly:
|
||||
|
||||
1. Make sure you have a recent XFree server (4.x or newer, but 4.2.x or newer
|
||||
is preferable). Also make sure it supports the RENDER extension (you can
|
||||
see this in the output of xdpyinfo) and it has the freetype extension
|
||||
module (you should have a /usr/X11R6/lib/modules/fonts/libfreetype.a file).
|
||||
2. Make sure you have the following lines in your XF86Config file in the
|
||||
"Module" section:
|
||||
Load "type1"
|
||||
Load "freetype"
|
||||
Load "extmod"
|
||||
(Not sure if extmod is really required for antialiased fonts, but it won't
|
||||
hurt).
|
||||
3. Install some True Type fonts say in /usr/X11R6/lib/X11/fonts/TrueType
|
||||
4. To generate the fonts.scale and fonts.dir files in the directory where the
|
||||
True Type fonts were installed you need an utility named ttmkfdir. There is
|
||||
also an utility named mkttfdir but that only supports ISO8859-1 and JIS
|
||||
encodings. From my experience ttmkfdir will recognize more fonts and works
|
||||
better so I recommend using this one. You should issue these commands to
|
||||
generate the fonts.scale and fonts.dir files:
|
||||
cd /usr/X11R6/lib/X11/fonts/TrueType
|
||||
ttmkfdir -o fonts.scale
|
||||
mkfontdir
|
||||
5. Now add /usr/X11R6/lib/X11/fonts/TrueType to your font path in the
|
||||
XF86Config file. It goes in the "Files" section as:
|
||||
FontPath "/usr/X11R6/lib/X11/fonts/TrueType"
|
||||
I recommend to put this at the top of your font path list.
|
||||
6. You can restart the X server at this point, to make all these changes take
|
||||
effect.
|
||||
7. Edit your /etc/X11/XftConfig file (or ~/.xftconfig if you don't have
|
||||
access to edit the global file). Make sure that the True Type font path is
|
||||
_before_ the Type1 font path. You should have something like this:
|
||||
dir "/usr/X11R6/lib/X11/fonts/TrueType"
|
||||
dir "/usr/X11R6/lib/X11/fonts/Type1"
|
||||
If you add extra True type paths, add them before the Type1 path
|
||||
If the Type1 path is first, and the Xft library fails to find/load the font
|
||||
you asked for, it will load some very ugly defaults.
|
||||
A sample XftConfig file is included with the Window Maker source at
|
||||
toplevel as Sample.XftConfig. You can use that as reference and for ideas.
|
||||
8. Compile and install Window Maker. No special switches are needed. However
|
||||
watch the ./configure output and check if it says that Antialiased text
|
||||
support is enabled in WINGs. If not, probably it failed to find libXft.
|
||||
Check that you have the development files for your X server installed.
|
||||
9. Edit ~/GNUstep/Defaults/WMGLOBAL and add entries for the following:
|
||||
AntialiasedSystemFont = "-*-trebuchet ms-medium-r-normal-*-%d-*-*-*-*-*-*-*";
|
||||
AntialiasedBoldSystemFont = "-*-trebuchet ms-bold-r-normal-*-%d-*-*-*-*-*-*-*";
|
||||
AntialiasedText = Yes;
|
||||
Use a font that you have installed on your system (arial and "trebuchet ms"
|
||||
are good choices).
|
||||
If AntialiasedText is enabled in WMGLOBAL, all WINGs based application will
|
||||
use antialiased fonts by default (this includes Window Maker).
|
||||
You can then disable the antialiased fonts on the per application basis by
|
||||
adding an AntialiasedText = No; entry in their specific configuration files
|
||||
The entry in the application's configuration file will always overwrite the
|
||||
global setting from WMGLOBAL.
|
||||
However if you want most of your WINGs applications to use normal fonts,
|
||||
but just a few to use antialiased fonts, then put AntialiasedText = No; in
|
||||
WMGLOBAL, and enable antialiased fonts only in the applications you want,
|
||||
by adding the AntialiasedText = Yes; in their own configuration files
|
||||
|
||||
At this point all WINGs based application should be able to use antialiased
|
||||
fonts. You can check this by enabling antialiasing and starting WPrefs. It
|
||||
should show nice antialiased text everywhere.
|
||||
|
||||
Now to enable antialiased fonts in Window Maker, there are 2 possibilities:
|
||||
|
||||
10a. Add entries for all font options in ~/GNUstep/Defaults/WindowMaker
|
||||
containing True Type fonts ("trebuchet ms", arial or verdana should work
|
||||
fine). Don't use non True Type fonts like Helvetica, because Xft won't
|
||||
load them, instead will load some defaults. Depending on the TrueTupe vs
|
||||
Type1 path order in your XftConfig file and the options declared there,
|
||||
it can range from "Extremely ugly" (if path to Type1 is before the path
|
||||
to True Type fonts), to "Acceptable" (if the True Type path comes first).
|
||||
Also modify all your themes to hold True Type fonts for all the font
|
||||
options
|
||||
|
||||
10b. Leave the fonts as they are (for example leave the default Helvetica) in
|
||||
~/GNUstep/Defaults/WindowMaker, and add an alias (or more) in the
|
||||
XftConfig file. This alias should look something like:
|
||||
match any family == "Helvetica" edit family += "Trebuchet MS";
|
||||
match any family == "Courier" edit family += "Courier New";
|
||||
...
|
||||
Which means that every time the Xft library (which is used the WINGs) gets
|
||||
a request to load a Helvetica font, it will load the "trebuchet ms" font
|
||||
instead, keeping all the other font parameters unchanged.
|
||||
|
||||
Each of these 2 methods have advantages and disadvantages.
|
||||
|
||||
Case 10a:
|
||||
---------
|
||||
With the first method, you do more work and you will not be able to use
|
||||
existing themes by just enabling antialiasing, because it will load default
|
||||
fonts which may not look as you want. You will need to change the fonts in
|
||||
every theme you want to use by replacing them with True Type fonts.
|
||||
|
||||
If you plan to switch antialiasing on/off, this method has a big disadvantage:
|
||||
you need to edit your configuration/themes with every switch (at least if you
|
||||
want Helvetica or other Type1 font for the non-antialiased case). This is
|
||||
because if you have a font set to (say) Arial and want to switch antialiasing
|
||||
off, you will get the normal version of Arial and you need to edit your font
|
||||
options again to see Helvetica.
|
||||
If you are happy with how the non-antialiased version of your True Type fonts
|
||||
looks this disadvantage goes away. In this case you will use the same font
|
||||
(say arial) with both antialiased/normal fonts.
|
||||
|
||||
OTOH this method gives you fine tune over the fonts used in Window Maker and
|
||||
you will be able to set each individual font as you like.
|
||||
|
||||
Case 10b:
|
||||
---------
|
||||
With the second method, you have almost nothing to do. Just define the proper
|
||||
aliases in the XftConfig file, and whenever some of the fonts you aliased is
|
||||
requested it's True Type alias will be loaded.
|
||||
This way you can use all your old themes and all you have to do except adding
|
||||
the aliases to the XftConfig file, is to enable or disable antialiasing the
|
||||
the configuration file.
|
||||
|
||||
For example if Helvetica is aliased to Arial, if you have antialiasing
|
||||
disabled, Helvetica will be used, but if you enable antialiasing Arial will
|
||||
be used instead. This method is very handy if you want to use existing themes
|
||||
you don't want to modify, or if you want to switch antialiasing on/off and
|
||||
don't want to edit your font options with every such switch.
|
||||
|
||||
The downside of this method is that if you don't have some font aliased in
|
||||
the XftConfig file, it will load some default instead.
|
||||
Also another downside is that you cannot fine tune your fonts. They will be
|
||||
translated by the alias rules in XftConfig from whatever they are defined in
|
||||
the theme. Sometimes this is not optimal.
|
||||
|
||||
For example if you aliased Helvetica to "Trebuchet MS" and all your screen
|
||||
fonts are Helvetica (at different sizes). With antialiasing disabled the
|
||||
Helvetica fonts everywhere looks good. However with antialiasing enabled the
|
||||
10pt font used by the miniwindow titles looks better if Arial is used. Also
|
||||
the 10pt font used by the clip looks better with Verdana. Same for the 12pt
|
||||
font used by balloons which is also better if Arial is used. But with this
|
||||
method you cannot do such fine tuning, unless you edit your font options in
|
||||
the Window Maker configuration file, in which case there will be a mix of the
|
||||
2 methods.
|
||||
|
||||
11. At this point if all was properly done, all you have to do is either add
|
||||
an AntialiasedText = Yes; entry to ~/GNUstep/Defaults/WindowMaker, or
|
||||
start WPrefs, goto the Expert Settings panel, and check the
|
||||
"Smooth font edges" option. Currently you need to restart if you switch
|
||||
antialiasing on/off (this may change in the future)
|
||||
|
||||
|
||||
Final note: antialiased text only looks good if a True Type font is
|
||||
used for it. Either by directly specifying it, or providing an alias in
|
||||
the XftConfig file. The idea is that the font Xft loads (after all the
|
||||
aliases have beed resolved) should point to a True Type font. Else
|
||||
unpleasant results may show on your screen :P
|
||||
|
||||
@@ -1,79 +0,0 @@
|
||||
# $XFree86: xc/lib/Xft/XftConfig.cpp,v 1.8 2001/11/21 23:41:12 keithp Exp $
|
||||
|
||||
dir "/usr/share/fonts/truetype"
|
||||
dir "/usr/X11R6/lib/X11/fonts/TrueType"
|
||||
dir "/var/lib/defoma/x-ttcidfont-conf.d/dirs/TrueType"
|
||||
dir "/usr/X11R6/lib/X11/fonts/Type1"
|
||||
|
||||
#
|
||||
# alias 'fixed' for 'mono'
|
||||
#
|
||||
match any family == "fixed" edit family =+ "mono";
|
||||
|
||||
#
|
||||
# Check users config file
|
||||
#
|
||||
includeif "~/.xftconfig"
|
||||
|
||||
#
|
||||
# Substitute TrueType fonts for Type1 versions
|
||||
#
|
||||
match any family == "Times" edit family += "Times New Roman";
|
||||
#match any family == "Helvetica" edit family += "Verdana";
|
||||
#match any family == "Helvetica" edit family += "Arial";
|
||||
match any family == "Helvetica" edit family += "Trebuchet MS";
|
||||
match any family == "Courier" edit family += "Courier New";
|
||||
|
||||
#
|
||||
# Use TrueType fonts for defaults
|
||||
#
|
||||
match any family == "serif" edit family += "Times New Roman";
|
||||
match any family == "sans" edit family += "Verdana";
|
||||
|
||||
#
|
||||
# Use monotype.com (andale) face where possible
|
||||
#
|
||||
match
|
||||
any family == "mono"
|
||||
all slant == roman
|
||||
all weight < bold
|
||||
edit
|
||||
family += "monotype.com";
|
||||
#
|
||||
# otherwise, use courier
|
||||
#
|
||||
match any family == "mono" edit family += "Courier New";
|
||||
|
||||
#
|
||||
# Alias between XLFD families and font file family name, prefer local fonts
|
||||
#
|
||||
match any family == "charter" edit family += "bitstream charter";
|
||||
match any family == "bitstream charter" edit family =+ "charter";
|
||||
|
||||
match any family == "Charter" edit family += "Bitstream Charter";
|
||||
match any family == "Bitstream Charter" edit family =+ "Charter";
|
||||
|
||||
match any family == "Lucidux Serif" edit family += "LuciduxSerif";
|
||||
match any family == "LuciduxSerif" edit family =+ "Lucidux Serif";
|
||||
|
||||
match any family == "Lucidux Sans" edit family += "LuciduxSans";
|
||||
match any family == "LuciduxSans" edit family =+ "Lucidux Sans";
|
||||
|
||||
match any family == "Lucidux Mono" edit family += "LuciduxMono";
|
||||
match any family == "LuciduxMono" edit family =+ "Lucidux Mono";
|
||||
|
||||
#
|
||||
# TrueType font aliases
|
||||
#
|
||||
match any family == "Comic Sans" edit family += "Comic Sans MS";
|
||||
match any family == "Comic Sans MS" edit family =+ "Comic Sans";
|
||||
match any family == "Trebuchet" edit family += "Trebuchet MS";
|
||||
match any family == "Trebuchet MS" edit family =+ "Trebuchet";
|
||||
match any family == "Monotype" edit family =+ "Monotype.com";
|
||||
match any family == "Andale Mono" edit family += "Monotype.com";
|
||||
match any family == "Monotype.com" edit family =+ "Andale Mono";
|
||||
|
||||
#
|
||||
#
|
||||
match any family == "webdings" edit encoding += "glyphs-fontspecific";
|
||||
match any family == "symbol" edit encoding += "glyphs-fontspecific";
|
||||
@@ -12,30 +12,19 @@ Changes since wmaker 0.80.1:
|
||||
WMCreateRGBAColor() and WMSetColorAlpha()
|
||||
- Miscelaneous code cleanups in wtext.c
|
||||
- Added Xft support in WINGs (for drawing antialiased fonts with transparency).
|
||||
- Added a new function: WMCreateAntialiasedFont() to create a font which will
|
||||
be drawn antialiased using Xft (if available, else function returns NULL)
|
||||
- New options in WMGLOBAL: AntialiasedText, AntialiasedSystemFont and
|
||||
AntialiasedBoldSystemFont. Check NEWS for details.
|
||||
- New options in WMGLOBAL: AntialiasedText. Check NEWS for details.
|
||||
- Fixed some improper calls to snprintf in wfont.c
|
||||
- Added double buffering when drawing a WMFrame title with an antialiased font
|
||||
to avoid flickering.
|
||||
- Added double buffering when drawing WMList items to avoid flickering.
|
||||
Double buffering for list also works for user drawn lists. Read NEWS for
|
||||
details and incompatibilities introduced by this change.
|
||||
- Added WMIsAntialiasedFont(WMFont *font) to check if a font is antialiased.
|
||||
- Added WMGetColorAlpha(WMColor *color)
|
||||
- Better outline when drawing balloons.
|
||||
- Added WMCreateFontWithFlags()
|
||||
- Added WMCreateFontWithAttributes()
|
||||
- You can now pass "SystemFont", "BoldSystemFont", "SystemFont-##" or
|
||||
"BoldSystemFont-##", with ## being the font size to any font creating
|
||||
function to create a font with the (bold) system font font specification.
|
||||
- Added WMCreateAntialiasedFontSet() (like WMCreateAntialiasedFont() but for
|
||||
languages with multibyte text). Note however that these specific font
|
||||
creating functions (as well as WMCreateNormalFont() and WMCreateFontSet())
|
||||
are not meant to be called directly except in very special cases.
|
||||
The more generic WMCreateFont() or WMCreateFontWithFlags() should be used.
|
||||
- Multibyte languages can now render antialiased text too (only tested on
|
||||
russian since this is the only multibyte language I can test).
|
||||
- Added WMCopyFontWithChanges(). This is a more generic and powerful function
|
||||
meant to replaces the obsoleted WMEmphasizeFont(), WMNormalizeFont(),
|
||||
WMStrenghtenFont() and the other similar functions. To get the same effect
|
||||
@@ -45,7 +34,7 @@ Changes since wmaker 0.80.1:
|
||||
- Added WMGetWidgetBackgroundColor()
|
||||
- Code cleanup in wtext.c
|
||||
- Fixed a memory leak in wfontpanel.c
|
||||
- Added a check that only %d is used in a font specification in WMGLOBAL and at
|
||||
??- Added a check that only %d is used in a font specification in WMGLOBAL and at
|
||||
most once for each font in a fontset (eliminates a possible security exploit)
|
||||
- Fixed WMGetTextDefaultColor() not to retain the returned color. It returns
|
||||
only a reference to the internal color, which you shouldn't release
|
||||
|
||||
@@ -107,22 +107,6 @@ enum {
|
||||
};
|
||||
|
||||
|
||||
/* Font flags */
|
||||
typedef enum {
|
||||
WFDefaultFont = 0,
|
||||
WFNormalFont = (1<<0),
|
||||
WFFontSet = (1<<1),
|
||||
WFAntialiased = (1<<2),
|
||||
WFNotAntialiased = (1<<3)
|
||||
} WMFontFlags;
|
||||
|
||||
|
||||
/* Use default system font size in system font name */
|
||||
enum {
|
||||
WFDefaultSize = -1
|
||||
};
|
||||
|
||||
|
||||
/* frame title positions */
|
||||
typedef enum {
|
||||
WTPNoTitle,
|
||||
@@ -746,18 +730,11 @@ Bool WMIsAntialiasingEnabled(WMScreen *scrPtr);
|
||||
|
||||
/* ....................................................................... */
|
||||
|
||||
WMFont* WMCreateNormalFont(WMScreen *scrPtr, char *fontName);
|
||||
|
||||
WMFont* WMCreateFontSet(WMScreen *scrPtr, char *fontName);
|
||||
|
||||
WMFont* WMCreateAntialiasedFont(WMScreen *scrPtr, char *fontName);
|
||||
|
||||
WMFont* WMCreateAntialiasedFontSet(WMScreen *scrPtr, char *fontName);
|
||||
|
||||
WMFont* WMCreateFont(WMScreen *scrPtr, char *fontName);
|
||||
|
||||
WMFont* WMCreateFontWithFlags(WMScreen *scrPtr, char *fontName,
|
||||
WMFontFlags flags);
|
||||
//??
|
||||
WMFont* WMCreateFontWithAttributes(WMScreen *scrPtr, char *fontName,
|
||||
WMFontAttributes *attribs);
|
||||
|
||||
WMFont* WMCopyFontWithChanges(WMScreen *scrPtr, WMFont *font,
|
||||
const WMFontAttributes *changes);
|
||||
@@ -770,15 +747,6 @@ char* WMGetFontName(WMFont *font);
|
||||
|
||||
unsigned int WMFontHeight(WMFont *font);
|
||||
|
||||
Bool WMIsAntialiasedFont(WMFont *font);
|
||||
|
||||
/*
|
||||
WMFont* WMUserFontOfSize(WMScreen *scrPtr, int size);
|
||||
|
||||
WMFont* WMUserFixedPitchFontOfSize(WMScreen *scrPtr, int size);
|
||||
*/
|
||||
|
||||
|
||||
void WMSetWidgetDefaultFont(WMScreen *scr, WMFont *font);
|
||||
|
||||
void WMSetWidgetDefaultBoldFont(WMScreen *scr, WMFont *font);
|
||||
@@ -791,8 +759,6 @@ WMFont* WMSystemFontOfSize(WMScreen *scrPtr, int size);
|
||||
|
||||
WMFont* WMBoldSystemFontOfSize(WMScreen *scrPtr, int size);
|
||||
|
||||
XFontSet WMGetFontFontSet(WMFont *font);
|
||||
|
||||
/* ....................................................................... */
|
||||
|
||||
WMPixmap* WMRetainPixmap(WMPixmap *pixmap);
|
||||
|
||||
@@ -24,7 +24,7 @@ extern "C" {
|
||||
|
||||
#define DOUBLE_BUFFER
|
||||
|
||||
|
||||
|
||||
|
||||
#define WC_UserWidget 128
|
||||
|
||||
@@ -48,17 +48,20 @@ typedef struct W_Application {
|
||||
typedef struct W_Font {
|
||||
struct W_Screen *screen;
|
||||
|
||||
union {
|
||||
XFontSet set;
|
||||
XFontStruct *normal;
|
||||
struct _XftFont *xft;
|
||||
} font;
|
||||
#ifdef XFT
|
||||
struct _XftFont *font;
|
||||
#else
|
||||
// pick one
|
||||
//XFontSet font;
|
||||
XFontStruct *font;
|
||||
#endif
|
||||
|
||||
short height;
|
||||
short y;
|
||||
short refCount;
|
||||
char *name;
|
||||
unsigned int notFontSet:1;
|
||||
unsigned int antialiased:1;
|
||||
//unsigned int notFontSet:1;
|
||||
//unsigned int antialiased:1;
|
||||
} W_Font;
|
||||
|
||||
|
||||
@@ -97,7 +100,7 @@ typedef struct W_FocusInfo {
|
||||
struct W_DraggingInfo {
|
||||
Window destinationWindow;
|
||||
Window sourceWindow;
|
||||
|
||||
|
||||
WMPoint location;
|
||||
|
||||
unsigned sourceOperation;
|
||||
@@ -116,7 +119,7 @@ struct W_DraggingInfo {
|
||||
WMSize mouseOffset;
|
||||
unsigned finished:1;
|
||||
};
|
||||
|
||||
|
||||
|
||||
typedef struct W_Screen {
|
||||
Display *display;
|
||||
@@ -139,8 +142,6 @@ typedef struct W_Screen {
|
||||
|
||||
struct _XftDraw *xftdraw; /* shared XftDraw */
|
||||
|
||||
Bool hasXftSupport; /* if it can antialias text */
|
||||
|
||||
/* application related */
|
||||
|
||||
W_FocusInfo *focusInfo;
|
||||
@@ -416,8 +417,6 @@ typedef struct W_EventHandler {
|
||||
typedef struct _WINGsConfiguration {
|
||||
char *systemFont;
|
||||
char *boldSystemFont;
|
||||
char *antialiasedSystemFont;
|
||||
char *antialiasedBoldSystemFont;
|
||||
int defaultFontSize;
|
||||
Bool antialiasedText;
|
||||
Bool useMultiByte;
|
||||
|
||||
@@ -75,10 +75,6 @@ missingOrInvalidXLFD(char *xlfd)
|
||||
ptr = "system font";
|
||||
} else if (xlfd == WINGsConfiguration.boldSystemFont) {
|
||||
ptr = "bold system font";
|
||||
} else if (xlfd == WINGsConfiguration.antialiasedSystemFont) {
|
||||
ptr = "antialiased system font";
|
||||
} else if (xlfd == WINGsConfiguration.antialiasedBoldSystemFont) {
|
||||
ptr = "antialiased bold system font";
|
||||
} else {
|
||||
ptr = "Unknown System Font";
|
||||
}
|
||||
@@ -110,12 +106,6 @@ W_ReadConfigurations(void)
|
||||
WINGsConfiguration.boldSystemFont =
|
||||
WMGetUDStringForKey(defaults, "BoldSystemFont");
|
||||
|
||||
WINGsConfiguration.antialiasedSystemFont =
|
||||
WMGetUDStringForKey(defaults, "AntialiasedSystemFont");
|
||||
|
||||
WINGsConfiguration.antialiasedBoldSystemFont =
|
||||
WMGetUDStringForKey(defaults, "AntialiasedBoldSystemFont");
|
||||
|
||||
#ifdef XFT
|
||||
WINGsConfiguration.antialiasedText =
|
||||
WMGetUDBoolForKey(defaults, "AntialiasedText");
|
||||
@@ -184,12 +174,6 @@ W_ReadConfigurations(void)
|
||||
if (missingOrInvalidXLFD(WINGsConfiguration.boldSystemFont)) {
|
||||
WINGsConfiguration.boldSystemFont = BOLD_SYSTEM_FONT;
|
||||
}
|
||||
if (missingOrInvalidXLFD(WINGsConfiguration.antialiasedSystemFont)) {
|
||||
WINGsConfiguration.antialiasedSystemFont = XFTSYSTEM_FONT;
|
||||
}
|
||||
if (missingOrInvalidXLFD(WINGsConfiguration.antialiasedBoldSystemFont)) {
|
||||
WINGsConfiguration.antialiasedBoldSystemFont = XFTBOLD_SYSTEM_FONT;
|
||||
}
|
||||
if (!WINGsConfiguration.floppyPath) {
|
||||
WINGsConfiguration.floppyPath = FLOPPY_PATH;
|
||||
}
|
||||
|
||||
@@ -3,16 +3,18 @@
|
||||
|
||||
#ifdef XFT
|
||||
# include <X11/Xft/Xft.h>
|
||||
# ifdef HAVE_WCHAR_H
|
||||
# include <wchar.h>
|
||||
# endif
|
||||
# include <stdlib.h>
|
||||
#endif
|
||||
|
||||
#include "WINGsP.h"
|
||||
|
||||
|
||||
#include <wraster.h>
|
||||
#include <assert.h>
|
||||
#include <X11/Xlocale.h>
|
||||
|
||||
#include <wchar.h>
|
||||
|
||||
|
||||
static char *makeFontSetOfSize(char *fontset, int size);
|
||||
@@ -276,9 +278,6 @@ WMCreateAntialiasedFont(WMScreen *scrPtr, char *fontName)
|
||||
Display *display = scrPtr->display;
|
||||
char *fname, *ptr;
|
||||
|
||||
if (!scrPtr->hasXftSupport)
|
||||
return NULL;
|
||||
|
||||
fontName = xlfdFromFontName(fontName, True);
|
||||
|
||||
if ((ptr = strchr(fontName, ','))) {
|
||||
@@ -355,9 +354,6 @@ WMCreateAntialiasedFontSet(WMScreen *scrPtr, char *fontName)
|
||||
Display *display = scrPtr->display;
|
||||
char *fname, *ptr;
|
||||
|
||||
if (!scrPtr->hasXftSupport)
|
||||
return NULL;
|
||||
|
||||
fontName = xlfdFromFontName(fontName, True);
|
||||
|
||||
if ((ptr = strchr(fontName, ','))) {
|
||||
@@ -521,13 +517,6 @@ WMReleaseFont(WMFont *font)
|
||||
}
|
||||
|
||||
|
||||
Bool
|
||||
WMHasAntialiasingSupport(WMScreen *scrPtr)
|
||||
{
|
||||
return scrPtr->hasXftSupport;
|
||||
}
|
||||
|
||||
|
||||
Bool
|
||||
WMIsAntialiasingEnabled(WMScreen *scrPtr)
|
||||
{
|
||||
|
||||
@@ -629,13 +629,6 @@ WMCreateScreenWithRContext(Display *display, int screen, RContext *context)
|
||||
scrPtr->xftFontSetCache = WMCreateHashTable(WMStringPointerHashCallbacks);
|
||||
|
||||
#ifdef XFT
|
||||
|
||||
# ifdef XFT2
|
||||
scrPtr->hasXftSupport = 1;
|
||||
# else
|
||||
scrPtr->hasXftSupport = XftDefaultHasRender(scrPtr->display);
|
||||
# endif
|
||||
|
||||
scrPtr->xftdraw = XftDrawCreate(scrPtr->display, W_DRAWABLE(scrPtr),
|
||||
scrPtr->visual, scrPtr->colormap);
|
||||
#endif
|
||||
@@ -768,16 +761,7 @@ WMCreateScreenWithRContext(Display *display, int screen, RContext *context)
|
||||
|
||||
scrPtr->useMultiByte = WINGsConfiguration.useMultiByte;
|
||||
|
||||
if (scrPtr->hasXftSupport) {
|
||||
scrPtr->antialiasedText = WINGsConfiguration.antialiasedText;
|
||||
} else {
|
||||
if (WINGsConfiguration.antialiasedText) {
|
||||
wwarning(_("Text antialiasing is enabled in the configuration but"
|
||||
" the X server doesn't have the required capabilities "
|
||||
"(missing RENDER extension). Disabling text antialiasing."));
|
||||
}
|
||||
scrPtr->antialiasedText = False;
|
||||
}
|
||||
scrPtr->antialiasedText = WINGsConfiguration.antialiasedText;
|
||||
|
||||
scrPtr->normalFont = WMSystemFontOfSize(scrPtr,
|
||||
WINGsConfiguration.defaultFontSize);
|
||||
@@ -800,16 +784,16 @@ WMCreateScreenWithRContext(Display *display, int screen, RContext *context)
|
||||
CHECK_BUTTON_ON_HEIGHT, False);
|
||||
|
||||
scrPtr->checkButtonImageOff = makePixmap(scrPtr, CHECK_BUTTON_OFF,
|
||||
CHECK_BUTTON_OFF_WIDTH,
|
||||
CHECK_BUTTON_OFF_HEIGHT, False);
|
||||
CHECK_BUTTON_OFF_WIDTH,
|
||||
CHECK_BUTTON_OFF_HEIGHT, False);
|
||||
|
||||
scrPtr->radioButtonImageOn = makePixmap(scrPtr, RADIO_BUTTON_ON,
|
||||
RADIO_BUTTON_ON_WIDTH,
|
||||
RADIO_BUTTON_ON_HEIGHT, False);
|
||||
|
||||
scrPtr->radioButtonImageOff = makePixmap(scrPtr, RADIO_BUTTON_OFF,
|
||||
RADIO_BUTTON_OFF_WIDTH,
|
||||
RADIO_BUTTON_OFF_HEIGHT, False);
|
||||
RADIO_BUTTON_OFF_WIDTH,
|
||||
RADIO_BUTTON_OFF_HEIGHT, False);
|
||||
|
||||
scrPtr->buttonArrow = makePixmap(scrPtr, BUTTON_ARROW,
|
||||
BUTTON_ARROW_WIDTH, BUTTON_ARROW_HEIGHT,
|
||||
@@ -842,20 +826,20 @@ WMCreateScreenWithRContext(Display *display, int screen, RContext *context)
|
||||
SCROLLER_ARROW_RIGHT_HEIGHT, True);
|
||||
|
||||
scrPtr->hiUpArrow = makePixmap(scrPtr, HI_SCROLLER_ARROW_UP,
|
||||
SCROLLER_ARROW_UP_WIDTH,
|
||||
SCROLLER_ARROW_UP_HEIGHT, True);
|
||||
SCROLLER_ARROW_UP_WIDTH,
|
||||
SCROLLER_ARROW_UP_HEIGHT, True);
|
||||
|
||||
scrPtr->hiDownArrow = makePixmap(scrPtr, HI_SCROLLER_ARROW_DOWN,
|
||||
SCROLLER_ARROW_DOWN_WIDTH,
|
||||
SCROLLER_ARROW_DOWN_HEIGHT, True);
|
||||
SCROLLER_ARROW_DOWN_WIDTH,
|
||||
SCROLLER_ARROW_DOWN_HEIGHT, True);
|
||||
|
||||
scrPtr->hiLeftArrow = makePixmap(scrPtr, HI_SCROLLER_ARROW_LEFT,
|
||||
SCROLLER_ARROW_LEFT_WIDTH,
|
||||
SCROLLER_ARROW_LEFT_HEIGHT, True);
|
||||
SCROLLER_ARROW_LEFT_WIDTH,
|
||||
SCROLLER_ARROW_LEFT_HEIGHT, True);
|
||||
|
||||
scrPtr->hiRightArrow = makePixmap(scrPtr, HI_SCROLLER_ARROW_RIGHT,
|
||||
SCROLLER_ARROW_RIGHT_WIDTH,
|
||||
SCROLLER_ARROW_RIGHT_HEIGHT, True);
|
||||
SCROLLER_ARROW_RIGHT_WIDTH,
|
||||
SCROLLER_ARROW_RIGHT_HEIGHT, True);
|
||||
|
||||
scrPtr->popUpIndicator = makePixmap(scrPtr, POPUP_INDICATOR,
|
||||
POPUP_INDICATOR_WIDTH,
|
||||
@@ -878,7 +862,7 @@ WMCreateScreenWithRContext(Display *display, int screen, RContext *context)
|
||||
{
|
||||
XColor bla;
|
||||
Pixmap blank;
|
||||
|
||||
|
||||
blank = XCreatePixmap(display, scrPtr->stipple, 1, 1, 1);
|
||||
XSetForeground(display, scrPtr->monoGC, 0);
|
||||
XFillRectangle(display, blank, scrPtr->monoGC, 0, 0, 1, 1);
|
||||
|
||||
12
configure.ac
12
configure.ac
@@ -100,7 +100,9 @@ dnl not used anywhere
|
||||
dnl AC_FUNC_MEMCMP
|
||||
AC_FUNC_VPRINTF
|
||||
AC_FUNC_ALLOCA
|
||||
AC_CHECK_FUNCS(gethostname select poll strerror strcasecmp strncasecmp setsid atexit mallinfo mkstemp snprintf vsnprintf asprintf vasprintf)
|
||||
AC_CHECK_FUNCS(gethostname select poll strerror strcasecmp strncasecmp \
|
||||
setsid atexit mallinfo mkstemp snprintf vsnprintf asprintf \
|
||||
vasprintf mbsnrtowcs mbsrtowcs)
|
||||
|
||||
|
||||
dnl ripped from samba
|
||||
@@ -177,7 +179,9 @@ dnl Checks for header files.
|
||||
dnl =======================
|
||||
AC_HEADER_SYS_WAIT
|
||||
AC_HEADER_TIME
|
||||
AC_CHECK_HEADERS(fcntl.h limits.h sys/ioctl.h sys/time.h sys/types.h libintl.h sys/select.h poll.h malloc.h ctype.h string.h strings.h)
|
||||
AC_CHECK_HEADERS(fcntl.h limits.h sys/ioctl.h sys/time.h sys/types.h \
|
||||
libintl.h sys/select.h poll.h malloc.h ctype.h string.h \
|
||||
strings.h wchar.h)
|
||||
|
||||
|
||||
|
||||
@@ -533,10 +537,6 @@ if test "$xft" = yes; then
|
||||
XFTFLAGS=`$XFTCONFIG --cflags`
|
||||
AC_MSG_CHECKING([for the Xft2 library])
|
||||
AC_MSG_RESULT([found])
|
||||
AC_DEFINE(XFT2, 1, [define if you have Xft version 2 (set by configure)])
|
||||
else
|
||||
AC_CHECK_LIB(Xft, XftDrawCreate, [XFTLIBS="-lXft" XFTFLAGS=""],
|
||||
xft=no, $XLFLAGS $XLIBS)
|
||||
fi
|
||||
if test "$xft" = yes; then
|
||||
AC_SUBST(XFTFLAGS)
|
||||
|
||||
Reference in New Issue
Block a user