summaryrefslogtreecommitdiffstats
path: root/generic/tkFont.c
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2007-06-24 16:07:34 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2007-06-24 16:07:34 (GMT)
commitb699b7f784bb3d3a71abd9a58580388514f4566e (patch)
treed6a57b5bb125238dcf67ca7c92fe84e4400d2916 /generic/tkFont.c
parentfa02a33e1916c8b6d2ba0318fc8b74f42e069808 (diff)
downloadtk-b699b7f784bb3d3a71abd9a58580388514f4566e.zip
tk-b699b7f784bb3d3a71abd9a58580388514f4566e.tar.gz
tk-b699b7f784bb3d3a71abd9a58580388514f4566e.tar.bz2
Cleaning up whitespace, comments, declarations. No functional changes.
Diffstat (limited to 'generic/tkFont.c')
-rw-r--r--generic/tkFont.c36
1 files changed, 16 insertions, 20 deletions
diff --git a/generic/tkFont.c b/generic/tkFont.c
index dac1ede..450061f 100644
--- a/generic/tkFont.c
+++ b/generic/tkFont.c
@@ -10,7 +10,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkFont.c,v 1.36 2007/05/31 13:31:26 das Exp $
+ * RCS: @(#) $Id: tkFont.c,v 1.37 2007/06/24 16:07:34 dkf Exp $
*/
#include "tkPort.h"
@@ -994,8 +994,8 @@ TkCreateNamedFont(
*
* TkDeleteNamedFont --
*
- * Delete the named font. If there are still widgets using this
- * font, then it isn't deleted right away.
+ * Delete the named font. If there are still widgets using this font,
+ * then it isn't deleted right away.
*
*---------------------------------------------------------------------------
*/
@@ -1009,13 +1009,13 @@ TkDeleteNamedFont(
TkFontInfo *fiPtr;
NamedFont *nfPtr;
Tcl_HashEntry *namedHashPtr;
-
+
fiPtr = ((TkWindow *) tkwin)->mainPtr->fontInfoPtr;
namedHashPtr = Tcl_FindHashEntry(&fiPtr->namedTable, name);
if (namedHashPtr == NULL) {
Tcl_AppendResult(interp, "named font \"", name,
- "\" doesn't exist", (char *) NULL);
+ "\" doesn't exist", NULL);
return TCL_ERROR;
}
nfPtr = (NamedFont *) Tcl_GetHashValue(namedHashPtr);
@@ -1749,14 +1749,12 @@ Tk_PostscriptFontName(
slantString = NULL;
if (fontPtr->fa.slant == TK_FS_ROMAN) {
;
+ } else if ((strcmp(family, "Helvetica") == 0)
+ || (strcmp(family, "Courier") == 0)
+ || (strcmp(family, "AvantGarde") == 0)) {
+ slantString = "Oblique";
} else {
- if ((strcmp(family, "Helvetica") == 0)
- || (strcmp(family, "Courier") == 0)
- || (strcmp(family, "AvantGarde") == 0)) {
- slantString = "Oblique";
- } else {
- slantString = "Italic";
- }
+ slantString = "Italic";
}
/*
@@ -1856,9 +1854,7 @@ Tk_UnderlineChars(
int lastByte) /* Index of first byte after the last
* character. */
{
- TkFont *fontPtr;
-
- fontPtr = (TkFont *) tkfont;
+ TkFont *fontPtr = (TkFont *) tkfont;
TkUnderlineCharsInContext(display, drawable, gc, tkfont, string,
lastByte, x, y, firstByte, lastByte);
@@ -2777,10 +2773,10 @@ Tk_IntersectTextLayout(
chunkPtr = layoutPtr->chunks;
fontPtr = (TkFont *) layoutPtr->tkfont;
- left = x;
- top = y;
- right = x + width;
- bottom = y + height;
+ left = x;
+ top = y;
+ right = x + width;
+ bottom = y + height;
result = 0;
for (i = 0; i < layoutPtr->numChunks; i++) {
@@ -2827,7 +2823,7 @@ Tk_IntersectTextLayout(
* lines in the text layout will be rendered by the user supplied
* Postscript function. The function should be of the form:
*
- * justify x y string function --
+ * justify x y string function --
*
* Justify is -1, 0, or 1, depending on whether the following string
* should be left, center, or right justified, x and y is the location