mirror of
https://github.com/gryf/wmaker.git
synced 2026-02-13 04:15:50 +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:
@@ -45,6 +45,8 @@ 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
|
||||
most once for each font in a fontset (eliminates a possible security exploit)
|
||||
|
||||
|
||||
Changes since wmaker 0.80.0:
|
||||
|
||||
@@ -1303,7 +1303,6 @@ main(int argc, char **argv)
|
||||
*/
|
||||
|
||||
|
||||
testTextField(scr);
|
||||
testText(scr);
|
||||
testFontPanel(scr);
|
||||
|
||||
@@ -1324,6 +1323,7 @@ main(int argc, char **argv)
|
||||
testSlider(scr);
|
||||
testSplitView(scr);
|
||||
testTabView(scr);
|
||||
testTextField(scr);
|
||||
#endif
|
||||
/*
|
||||
* The main event loop.
|
||||
|
||||
@@ -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
|
||||
W_ReadConfigurations(void)
|
||||
{
|
||||
@@ -133,17 +178,16 @@ W_ReadConfigurations(void)
|
||||
WMGetUDIntegerForKey(defaults, "DefaultFontSize");
|
||||
}
|
||||
|
||||
|
||||
if (!WINGsConfiguration.systemFont) {
|
||||
WINGsConfiguration.systemFont = SYSTEM_FONT;
|
||||
if (missingOrInvalidXLFD(WINGsConfiguration.systemFont)) {
|
||||
WINGsConfiguration.systemFont = SYSTEM_FONT;
|
||||
}
|
||||
if (!WINGsConfiguration.boldSystemFont) {
|
||||
if (missingOrInvalidXLFD(WINGsConfiguration.boldSystemFont)) {
|
||||
WINGsConfiguration.boldSystemFont = BOLD_SYSTEM_FONT;
|
||||
}
|
||||
if (!WINGsConfiguration.antialiasedSystemFont) {
|
||||
if (missingOrInvalidXLFD(WINGsConfiguration.antialiasedSystemFont)) {
|
||||
WINGsConfiguration.antialiasedSystemFont = XFTSYSTEM_FONT;
|
||||
}
|
||||
if (!WINGsConfiguration.antialiasedBoldSystemFont) {
|
||||
if (missingOrInvalidXLFD(WINGsConfiguration.antialiasedBoldSystemFont)) {
|
||||
WINGsConfiguration.antialiasedBoldSystemFont = XFTBOLD_SYSTEM_FONT;
|
||||
}
|
||||
if (!WINGsConfiguration.floppyPath) {
|
||||
|
||||
Reference in New Issue
Block a user