1
0
mirror of https://github.com/gryf/wmaker.git synced 2026-01-05 13:24:14 +01:00

- Added switch to enable/disable antialiased fonts in WPrefs's Expert Settings

panel. (Temporary until the Font Settings panel in WPrefs is finished).
- 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)
- Added README.antialiasing describing the steps needed to get antialiased
  fonts working with WINGs/Window Maker.
- Added Sample.XftConfig
This commit is contained in:
dan
2002-11-30 02:13:36 +00:00
parent 5ad557c6c8
commit 83d3625e1a
7 changed files with 101 additions and 13 deletions

View File

@@ -34,6 +34,11 @@ Changes since version 0.80.1:
- Fixed sloppy focus bug (Pawel S. Veselov <pv76716@druid.SFBay.Sun.COM>) - Fixed sloppy focus bug (Pawel S. Veselov <pv76716@druid.SFBay.Sun.COM>)
- Applied Xinerama patch (after fixes) from (Peter Zijlstra - Applied Xinerama patch (after fixes) from (Peter Zijlstra
<a.p.zijlstra@chello.nl>) <a.p.zijlstra@chello.nl>)
- Added switch to enable/disable antialiased fonts in WPrefs's Expert Settings
panel. (Temporary until the Font Settings panel in WPrefs is finished).
- 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)
Changes since version 0.80.0: Changes since version 0.80.0:
............................. .............................

View File

@@ -3,11 +3,11 @@
SUBDIRS = wrlib WINGs src util po WindowMaker wmlib test WPrefs.app doc\ SUBDIRS = wrlib WINGs src util po WindowMaker wmlib test WPrefs.app doc\
contrib contrib
EXTRA_DIST = TODO BUGS BUGFORM FAQ FAQ.I18N MIRRORS COPYING.WTFPL \ EXTRA_DIST = TODO BUGS BUGFORM FAQ FAQ.I18N FAQ.I18N.cs FAQ.I18N.sk \
Install INSTALL.pt README.pt FAQ.I18N.cs INSTALL.cs\ Install INSTALL.cs INSTALL.fr INSTALL.es INSTALL.pt INSTALL.sk \
mkpatch README.KDE README.GNOME WindowMaker.lsm.in\ README.antialiasing README.definable-cursor README.pt \
README.definable-cursor \ README.KDE README.GNOME Sample.XftConfig \
FAQ.I18N.sk INSTALL.sk INSTALL.es INSTALL.fr MIRRORS COPYING.WTFPL mkpatch WindowMaker.lsm.in
# libwmfun-0.0.3.tar.gz # libwmfun-0.0.3.tar.gz
WindowMaker.lsm: WindowMaker.lsm.in WindowMaker.lsm: WindowMaker.lsm.in

29
NEWS
View File

@@ -2,6 +2,35 @@
NEWS for veteran Window Maker users NEWS for veteran Window Maker users
----------------------------------- -----------------------------------
--- 0.81.0
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.
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
--- 0.80.0 --- 0.80.0
Shading/Unshading windows using mouse wheel on their titlebar Shading/Unshading windows using mouse wheel on their titlebar

View File

@@ -45,6 +45,8 @@ Changes since wmaker 0.80.1:
- Added WMGetWidgetBackgroundColor() - Added WMGetWidgetBackgroundColor()
- Code cleanup in wtext.c - Code cleanup in wtext.c
- Fixed a memory leak in wfontpanel.c - Fixed a memory leak in wfontpanel.c
- 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)
Changes since wmaker 0.80.0: Changes since wmaker 0.80.0:

View File

@@ -1303,7 +1303,6 @@ main(int argc, char **argv)
*/ */
testTextField(scr);
testText(scr); testText(scr);
testFontPanel(scr); testFontPanel(scr);
@@ -1324,6 +1323,7 @@ main(int argc, char **argv)
testSlider(scr); testSlider(scr);
testSplitView(scr); testSplitView(scr);
testTabView(scr); testTabView(scr);
testTextField(scr);
#endif #endif
/* /*
* The main event loop. * The main event loop.

View File

@@ -45,6 +45,51 @@ getButtonWithName(const char *name, unsigned defaultButton)
} }
static Bool
missingOrInvalidXLFD(char *xlfd)
{
char *ptr = xlfd;
Bool broken = False;
int count = 0;
if (!xlfd)
return True;
while (*ptr) {
if (*ptr=='%') {
ptr++;
if ((*ptr=='d' || *ptr=='i') && count==0) {
count++;
} else {
broken = True;
break;
}
} else if (*ptr==',') {
count = 0;
}
ptr++;
}
if (broken) {
if (xlfd == WINGsConfiguration.systemFont) {
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";
}
wwarning(_("Invalid %s specification: '%s' (only %%d is allowed and "
"at most once for each font in a fontset)."), ptr, xlfd);
}
return broken;
}
void void
W_ReadConfigurations(void) W_ReadConfigurations(void)
{ {
@@ -133,17 +178,16 @@ W_ReadConfigurations(void)
WMGetUDIntegerForKey(defaults, "DefaultFontSize"); WMGetUDIntegerForKey(defaults, "DefaultFontSize");
} }
if (missingOrInvalidXLFD(WINGsConfiguration.systemFont)) {
if (!WINGsConfiguration.systemFont) { WINGsConfiguration.systemFont = SYSTEM_FONT;
WINGsConfiguration.systemFont = SYSTEM_FONT;
} }
if (!WINGsConfiguration.boldSystemFont) { if (missingOrInvalidXLFD(WINGsConfiguration.boldSystemFont)) {
WINGsConfiguration.boldSystemFont = BOLD_SYSTEM_FONT; WINGsConfiguration.boldSystemFont = BOLD_SYSTEM_FONT;
} }
if (!WINGsConfiguration.antialiasedSystemFont) { if (missingOrInvalidXLFD(WINGsConfiguration.antialiasedSystemFont)) {
WINGsConfiguration.antialiasedSystemFont = XFTSYSTEM_FONT; WINGsConfiguration.antialiasedSystemFont = XFTSYSTEM_FONT;
} }
if (!WINGsConfiguration.antialiasedBoldSystemFont) { if (missingOrInvalidXLFD(WINGsConfiguration.antialiasedBoldSystemFont)) {
WINGsConfiguration.antialiasedBoldSystemFont = XFTBOLD_SYSTEM_FONT; WINGsConfiguration.antialiasedBoldSystemFont = XFTBOLD_SYSTEM_FONT;
} }
if (!WINGsConfiguration.floppyPath) { if (!WINGsConfiguration.floppyPath) {

View File

@@ -54,6 +54,8 @@ showData(_Panel *panel)
WMSetButtonSelected(panel->swi[4], GetBoolForKey("WindozeCycling")); WMSetButtonSelected(panel->swi[4], GetBoolForKey("WindozeCycling"));
WMSetButtonSelected(panel->swi[5], GetBoolForKey("DontConfirmKill")); WMSetButtonSelected(panel->swi[5], GetBoolForKey("DontConfirmKill"));
WMSetButtonSelected(panel->swi[6], GetBoolForKey("DisableBlinking")); WMSetButtonSelected(panel->swi[6], GetBoolForKey("DisableBlinking"));
if (WMHasAntialiasingSupport(WMWidgetScreen(panel->box)))
WMSetButtonSelected(panel->swi[7], GetBoolForKey("AntialiasedText"));
} }
@@ -66,7 +68,7 @@ createPanel(Panel *p)
panel->box = WMCreateBox(panel->parent); panel->box = WMCreateBox(panel->parent);
WMSetViewExpandsToParent(WMWidgetView(panel->box), 2, 2, 2, 2); WMSetViewExpandsToParent(WMWidgetView(panel->box), 2, 2, 2, 2);
for (i=0; i<7; i++) { for (i=0; i<8; i++) {
panel->swi[i] = WMCreateSwitchButton(panel->box); panel->swi[i] = WMCreateSwitchButton(panel->box);
WMResizeWidget(panel->swi[i], FRAME_WIDTH-40, 25); WMResizeWidget(panel->swi[i], FRAME_WIDTH-40, 25);
WMMoveWidget(panel->swi[i], 20, 20+i*25); WMMoveWidget(panel->swi[i], 20, 20+i*25);
@@ -79,6 +81,10 @@ createPanel(Panel *p)
WMSetButtonText(panel->swi[4], _("Use Windoze style cycling.")); WMSetButtonText(panel->swi[4], _("Use Windoze style cycling."));
WMSetButtonText(panel->swi[5], _("Disable confirmation panel for the Kill command.")); WMSetButtonText(panel->swi[5], _("Disable confirmation panel for the Kill command."));
WMSetButtonText(panel->swi[6], _("Disable selection animation for selected icons.")); WMSetButtonText(panel->swi[6], _("Disable selection animation for selected icons."));
WMSetButtonText(panel->swi[7], _("Smooth font edges (needs restart)."));
if (!WMHasAntialiasingSupport(WMWidgetScreen(panel->box)))
WMSetButtonEnabled(panel->swi[7], False);
WMRealizeWidget(panel->box); WMRealizeWidget(panel->box);
WMMapSubwidgets(panel->box); WMMapSubwidgets(panel->box);
@@ -101,6 +107,8 @@ storeDefaults(_Panel *panel)
SetBoolForKey(WMGetButtonSelected(panel->swi[4]), "WindozeCycling"); SetBoolForKey(WMGetButtonSelected(panel->swi[4]), "WindozeCycling");
SetBoolForKey(WMGetButtonSelected(panel->swi[5]), "DontConfirmKill"); SetBoolForKey(WMGetButtonSelected(panel->swi[5]), "DontConfirmKill");
SetBoolForKey(WMGetButtonSelected(panel->swi[6]), "DisableBlinking"); SetBoolForKey(WMGetButtonSelected(panel->swi[6]), "DisableBlinking");
if (WMHasAntialiasingSupport(WMWidgetScreen(panel->box)))
SetBoolForKey(WMGetButtonSelected(panel->swi[7]), "AntialiasedText");
} }