1
0
mirror of https://github.com/gryf/wmaker.git synced 2025-12-22 05:48:01 +01:00

- Added WMCreateNonAAFont() to WINGs

This commit is contained in:
dan
2002-10-18 02:56:59 +00:00
parent 3bed15d673
commit 5230a57599
5 changed files with 61 additions and 12 deletions

View File

@@ -24,6 +24,7 @@ Changes since wmaker 0.80.1:
details and incompatibilities introduced by this change.
- Added new Bool WMIsAAFont(WMFont *font) to check if a font is AA or not.
- Added WMGetColorAlpha(WMColor *color)
- Added WMCreateNonAAFont()
Changes since wmaker 0.80.0:

View File

@@ -701,6 +701,8 @@ WMFont* WMCreateNormalFont(WMScreen *scrPtr, char *fontName);
WMFont* WMCreateAAFont(WMScreen *scrPtr, char *fontName);
WMFont* WMCreateNonAAFont(WMScreen *scrPtr, char *fontName);
WMFont* WMCreateFont(WMScreen *scrPtr, char *fontName);
WMFont* WMRetainFont(WMFont *font);

View File

@@ -285,6 +285,17 @@ WMCreateAAFont(WMScreen *scrPtr, char *fontName)
}
WMFont*
WMCreateNonAAFont(WMScreen *scrPtr, char *fontName)
{
if (scrPtr->useMultiByte) {
return WMCreateFontSet(scrPtr, fontName);
} else {
return WMCreateNormalFont(scrPtr, fontName);
}
}
WMFont*
WMCreateFont(WMScreen *scrPtr, char *fontName)
{

View File

@@ -867,10 +867,10 @@ remakeTexture(WFrameWindow *fwin, int state)
if (fwin->title_texture[state]->any.type!=WTEX_SOLID) {
int left, right;
int width;
#ifdef XKB_BUTTON_HINT
int language;
#endif
int width;
/* eventually surrounded by if new_style */
left = fwin->left_button && !fwin->flags.hide_left_button
@@ -1050,6 +1050,7 @@ wFrameWindowPaint(WFrameWindow *fwin)
if (fwin->title) {
char *title;
int h, y;
title = ShrinkString(*fwin->font, fwin->title,
fwin->titlebar->width - lofs - rofs);
@@ -1073,11 +1074,45 @@ wFrameWindowPaint(WFrameWindow *fwin)
break;
}
y = *fwin->title_clearance + TITLEBAR_EXTEND_SPACE;
h = WMFontHeight(*fwin->font);
//#define DBL_BUF
#ifdef DBL_BUF
// what is going on here?
{
Drawable buf;
int i;
buf = XCreatePixmap(dpy, fwin->titlebar->window, w, h,
scr->w_depth);
i = fwin->flags.state;
if (fwin->title_texture[i]->any.type!=WTEX_SOLID) {
XCopyArea(dpy, fwin->title_back[i], buf, scr->copy_gc,
x, y, w, h, 0, 0);
} else {
XSetForeground(dpy, scr->copy_gc,
fwin->title_texture[i]->solid.normal.pixel);
XFillRectangle(dpy, buf, scr->copy_gc, 0, 0, w, h);
}
WMDrawString(scr->wmscreen, buf,
fwin->title_color[fwin->flags.state],
*fwin->font, 0, 0, title, titlelen);
XCopyArea(dpy, buf, fwin->titlebar->window, scr->copy_gc,
0, 0, w, h, x, y);
XFreePixmap(dpy, buf);
}
#else
XClearArea(dpy, fwin->titlebar->window, x, y, w, h, False);
WMDrawString(scr->wmscreen, fwin->titlebar->window,
fwin->title_color[fwin->flags.state],
*fwin->font, x,
*fwin->title_clearance + TITLEBAR_EXTEND_SPACE,
title, titlelen);
*fwin->font, x, y, title, titlelen);
#endif
wfree(title);
}