summaryrefslogtreecommitdiffstats
path: root/unix
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2007-02-27 13:59:53 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2007-02-27 13:59:53 (GMT)
commit1fdb1ffde3252229d3b7e9112cd1278419171f33 (patch)
tree80f7dd25fe699d96c4f029a519449728b9438278 /unix
parentc1266f19f3414d04c1667c156baa77ded553f1d2 (diff)
downloadtk-1fdb1ffde3252229d3b7e9112cd1278419171f33.zip
tk-1fdb1ffde3252229d3b7e9112cd1278419171f33.tar.gz
tk-1fdb1ffde3252229d3b7e9112cd1278419171f33.tar.bz2
Minor cleanup
Diffstat (limited to 'unix')
-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);