1
0
mirror of https://github.com/gryf/wmaker.git synced 2025-12-19 04:20:27 +01:00

Cleaned up some documentation

This commit is contained in:
dan
2004-10-23 02:26:13 +00:00
parent 11b464a002
commit 51c2edf868
6 changed files with 37 additions and 124 deletions

View File

@@ -16,7 +16,7 @@ Changes since version 0.80.2:
- Removed obsoleted acconfig.h and implemented its functionality using
AC_DEFINE and AC_DEFINE_UNQUOTED as autoconf 2.5x recommends.
This will definitely enforce the need to use autoconf 2.5x
- Added Xft support to WINGs, for rendering antialiased fonts with
- Added Xft2 support to WINGs, for rendering antialiased fonts with
transparency. Details in WINGs/ChangeLog.
- Fixed problem with long, preset workspace names (Wanderlei Antonio Cavassin
<cavassin@conectiva.com.br>)

8
NEWS
View File

@@ -25,7 +25,15 @@ You can pick fonts for Window Maker in the Font configuration section of
WPrefs.
Antialiased text is enabled by default, but can be disabled by adding
AntialiasedText = NO; in ~/GNUstep/Defaults/WMGLOBAL
This will disable antialiased text for any WINGs based application. If you
only want to disable them for a specific application only, like WindowMaker
for example, then add the same option in the applications configuration file,
in this case ~/GNUstep/Defaults/WindowMaker
For WindowMaker, this can also be achieved from the Expert panel in WPrefs.
Note that bitmapped fonts look much better than TrueType when antialiasing is
disabled.

5
TODO
View File

@@ -1,10 +1,5 @@
To do before next release:
--------------------------
- Fix font conversion (in WINGs, with convertfonts, setstyle and getstyle)
in WINGs convert automatically for a while (remove in later versions
and give a warning if font is not converted, but let user manually convert
it with convertfonts as the process may need manual tweaking for best
results)
- check whether window states are being saved/restored properly via netwm
on restart/crash-restart (grep for XXX/TODO)

View File

@@ -11,7 +11,7 @@ Changes since wmaker 0.80.1:
- Added alpha channel to WMColor. 2 new functions also:
WMCreateRGBAColor() and WMSetColorAlpha()
- Miscelaneous code cleanups in wtext.c
- Added Xft support in WINGs (for drawing antialiased fonts with transparency).
- Added Xft2 support in WINGs (for drawing antialiased fonts with transparency).
- 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
@@ -34,8 +34,6 @@ 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)
- Fixed WMGetTextDefaultColor() not to retain the returned color. It returns
only a reference to the internal color, which you shouldn't release
- Added wstrndup()

View File

@@ -6,38 +6,16 @@ Double buffering
To avoid flickering caused by redrawing the widgets on Expose events, a
double buffering tehnique was implemented for most of the widgets.
This flickering effect has gotten more vizible with the introduction
of antialiased text. If with normal text one can redraw the text over the
of antialiased fonts. If with normal text one can redraw the text over the
old one over and over again without any degradation of the text (new pixels
simply overwrite old pixels), with antialiased text the situation is
different.
The pixels that constitute the antialias around the text are partially
transparent pixels, which let part of the background be visible through them.
If antialiased text is drawn over and over again, whithout first erasing the
old one, the partially transparent pixels of the antialias will no longer
see the background through them, but some of them will see the old pixels of
the antialias around the old text that was there before. This for example
will make a black antialiased text over a white background get thicker as
the pixels of the antialias around it, combine with semitransparent black
pixels of the old antialias instead of combining with the white background.
The result is that the antialias will get darker (in this case) and the text
will be altered.
different and text gets quickly corrupted. To avoid this corruption, one
needs to first erase the area where the text will go, which can cause the
before mentioned flickering.
The double buffer is implemented to solve this issue.
Because of this the area where text is drawn needs to be cleared before
antialiased text can be drawn again. But between the moment whent he area is
cleared and the moment when the text is drawn again there is a small time
gap that results in flickering. This doesn't happen with normal text where
one doesn't need to clear the area before drawing the text, but instead can
simply draw over and over again.
To avoid this situation, a double buffering tehnique was used. Instead of
drawing directly in the wisget's window (which is mapped and will flicker as
described above), we draw in a pixmap (unmapped) and after all is done we
XCopyArea() from that pixmap to the real window.
Since all this takes place off-screen, no flickering will be observed in
this case.
This is a change that that will be automatically available for your
applications and will require no change from you.
This is a change that that will be automatically available for any WINGs
applications and will require no change in the existing code.
However there is an exception from this in case of WMList if you delegate
the drawing of items to userspace (read below for the compelte details).
@@ -57,20 +35,12 @@ the user code doing item drawing, but instead pass this pixmap in which we
draw before copying to the real window.
Since one cannot use XClearWindow() or XClearArea() on pixmaps, but only on
windows, if your list item drawing code used to contain these to clear the
item area before drawing it needs to change, else the application will die
when it tires to XClearArea() on a pixmap.
windows, if the code drawing list items used to call these functions to clear
the item area before drawing it needs to change to using XFillRectangle()
instead.
This means that in your application if you ever used WMSetListUserDrawProc()
so set a userspace routine which draws WMList items in a particular fashion,
you need to make sure your function will not call XClearArea() or
XClearWindow() on the drawable that was passed to draw in.
Instead you should use XFillRectangle().
This change also means that you no longer need to do double buffering in
your code, if you ever used to do. It is not done by WINGs and you benefit
from it automatically.
With this change it also means that there is no longer any need to do any
double buffering in the user code, since it's already done by WINGs.
*** Mon Oct 14 19:28:35 EEST 2002 - Dan
@@ -84,7 +54,7 @@ drawn, while WMDrawImageString() takes 2 WMColor* arguments in place of the
old GC: first for text color and second for background color.
This change is required to support extending WMFont to allow it to handle
antialiased fonts through the XFree86 Xft extension.
antialiased fonts through the XFree86 Xft2 extension.
This also has the advantage of hiding low level X11 details and use WINGs
internat objects instead.
@@ -121,81 +91,23 @@ and have the color of the foreground respective the background of the old gc.
*** Wed Oct 9 07:10:04 EEST 2002 - Dan
Xft support in WINGs
--------------------
Antialiased font support
------------------------
If Xft is detected when configure it is run, support for drawing antialiased
fonts with transparency will be compiled into WINGs.
You need at least Xfree86 version 4.0.x for this but at least 4.1.x is
recommended.
With the addition of Xft2 support in the WINGs library, now WINGs can display
antialiased text with TrueType or any scalable fonts.
For Xft support there are 2 new functions to create a font that will render
using antialiasing and transparency: WMCreateAntialiasedFont() and
WMCreateAntialiasedFontSet(). Later is for multibyte languages.
Passing such a font to WMDrawString() or WMDrawImageString() will result
in antialiased text displayed on screen. Modifying the alpha value for the
WMColor passed to WMDrawString() or WMDrawImageString() will result in text
being displayed with the appropriate transparency.
Antialiased text is enabled by default, but can be disabled by adding
To control antialiased font behavior, there are 3 new options that go into
WMGLOBAL. Two of them are to set the system font used when an antialiased
font is required. They operate in a similar way as SystemFont and
BoldSystemFont, just they are used when antialiased fonts are requested.
They are named AntialiasedSystemFont respectively AntialiasedBoldSystemFont.
They are kept separate from SystemFont and BoldSystemFont because the same
fonts don't render well as both normal and antialiased if they are not
TrueType fonts. Even though you can specify any font in the XLFD format for
these new options, it is recomended to use TrueType fonts for the antialiased
case since other fonts (standard X fonts) don't render well and give ugly
results.
AntialiasedText = NO; in ~/GNUstep/Defaults/WMGLOBAL
The third option is an option that globally controls if WINGs uses or not
antialiased fonts. It is named AntialiasedText and it has a boolean Yes/No
value. If set to Yes, WINGs will try to use antialiased fonts (if support
was compiled in, and antialiased fonts can be found) then revert to normal
fonts if not possible. Note that this applies if WMCreateFont(),
WMSystemFont(), WMSystemFontOfSize(), WMBoldSystemFont() or
WMBoldSystemFontOFize() are used. If any of the direct creation functions
are used, such as WMCreateAntialiasedFont() or WMCreateNormalFont(), then
that kind of font is returned independently of the value of AntialiasedText.
(However note that an antialiased font cannot be created if Xft support was
no compiled into WINGs, even if you call WMCreateAntialiasedFont() directly.
In this case WMCreateAntialiasedFont() will always return NULL)
These 3 options from WMGLOBAL (which apply to all WINGs applications) can be
overwritten on a per application basis by putting them in the application's
specific domain file (usually ~/GNUstep/Defaults/application_name).
There is also another new font creation function available.
WMCreateFontWithFlags(screen, fontName, flags)
flags will specify what kind of font to create. They are defined in WINGs.h
as an enum: WMFontFlags
If WFDefaultFont is passed then the function will work exactly like
WMCreateFont() by creating a font according to the options from the
configuration.
However if some specific flag is passed than that option will be altered. All
the other options will keep their default values.
There are 2 font options available (at this time):
1. Font type (if a normal font or a font set)
2. Font antialiasing (if it's an antialiased font or not)
If flags specifies a value for each of the available options then a specific
font which only takes into account those flag values will be created and all
the font options specified in the configuration (like MultiByte or Antialiasing)
will be ignored.
However if only some of the options are specified, then for the missing options
the default values from the configuration will be used.
For example if antialiasing is enabled in the configuration and you pass
WFNotAntialiased as the flag, then a font with all the properties defined in
the configuration (except antialiasing) will be created. This means that if
MultiByte is defined a fontset will be created, else a normal font will be
created and you don't have to worry about the rest of the flags you didn't
specify.
This will disable antialiased text for any WINGs based application. If you
only want to disable them for a specific application only, like WindowMaker
for example, then add the same option in the applications configuration file,
in this case ~/GNUstep/Defaults/WindowMaker
Note that bitmapped fonts look much better than TrueType when antialiasing is
disabled.
*** Mon Sep 09 06:58:30 EEST 2002 - Dan

View File

@@ -506,8 +506,8 @@ if test "$shape" = yes; then
fi
dnl Xft antialiased font support
dnl ============================
dnl Xft2 antialiased font support
dnl =============================
xft=yes
XFTLIBS=""