summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordkf <dkf@noemail.net>2007-02-27 13:59:53 (GMT)
committerdkf <dkf@noemail.net>2007-02-27 13:59:53 (GMT)
commit56a3178119978890489dc94c45ce1e6187572406 (patch)
tree80f7dd25fe699d96c4f029a519449728b9438278
parent9d31d00ab7d5f8dac5a6233d33bbe40984a99b6c (diff)
downloadtk-56a3178119978890489dc94c45ce1e6187572406.zip
tk-56a3178119978890489dc94c45ce1e6187572406.tar.gz
tk-56a3178119978890489dc94c45ce1e6187572406.tar.bz2
Minor cleanup
FossilOrigin-Name: 426f6150ad85222e51b097d02f04221c60d803a6
-rw-r--r--unix/tkUnixRFont.c20
1 files changed, 7 insertions, 13 deletions
diff --git a/unix/tkUnixRFont.c b/unix/tkUnixRFont.c
index 4435564..96097fa 100644
--- a/unix/tkUnixRFont.c
+++ b/unix/tkUnixRFont.c
@@ -8,7 +8,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkUnixRFont.c,v 1.15 2007/02/22 13:56:34 dkf Exp $
+ * RCS: @(#) $Id: tkUnixRFont.c,v 1.16 2007/02/27 13:59:53 dkf Exp $
*/
#include "tkUnixInt.h"
@@ -248,11 +248,10 @@ FinishedWithFont(
UnixFtFont *fontPtr)
{
Display *display = fontPtr->display;
- Tk_ErrorHandler handler;
int i;
-
- handler = Tk_CreateErrorHandler(display, -1, -1, -1, NULL,
+ Tk_ErrorHandler handler = Tk_CreateErrorHandler(display, -1, -1, -1, NULL,
(ClientData) NULL);
+
for (i = 0; i < fontPtr->nfaces; i++) {
if (fontPtr->faces[i].ftFont) {
XftFontClose(fontPtr->display, fontPtr->faces[i].ftFont);
@@ -526,7 +525,6 @@ TkpGetFontAttrsForChar(
faPtr->slant = (slant > XFT_SLANT_ROMAN) ? TK_FS_ITALIC : TK_FS_ROMAN;
faPtr->underline = fontPtr->font.fa.underline;
faPtr->overstrike = fontPtr->font.fa.overstrike;
-
}
int
@@ -555,11 +553,9 @@ Tk_MeasureChars(
UnixFtFont *fontPtr = (UnixFtFont *) tkfont;
XftFont *ftFont;
FcChar32 c;
- int clen;
XGlyphInfo extents;
- int curX, newX;
+ int clen, curX, newX, curByte, newByte, sawNonSpace;
int termByte = 0, termX = 0;
- int curByte, newByte, sawNonSpace;
#if DEBUG_FONTSEL
char string[256];
int len = 0;
@@ -668,9 +664,8 @@ Tk_DrawChars(
UnixFtFont *fontPtr = (UnixFtFont *) tkfont;
XGCValues values;
XColor xcolor;
- int clen;
+ int clen, nspec;
XftGlyphFontSpec specs[NUM_SPEC];
- int nspec;
XGlyphInfo metrics;
if (fontPtr->ftDraw == 0) {
@@ -682,10 +677,9 @@ Tk_DrawChars(
DefaultColormap(display, fontPtr->screen));
fontPtr->drawable = drawable;
} else {
- Tk_ErrorHandler handler;
+ Tk_ErrorHandler handler = Tk_CreateErrorHandler(display, -1, -1, -1,
+ NULL, (ClientData) NULL);
- handler = Tk_CreateErrorHandler(display, -1, -1, -1, NULL,
- (ClientData) NULL);
XftDrawChange(fontPtr->ftDraw, drawable);
fontPtr->drawable = drawable;
Tk_DeleteErrorHandler(handler);