diff options
author | dkf <donal.k.fellows@manchester.ac.uk> | 2009-10-10 17:42:50 (GMT) |
---|---|---|
committer | dkf <donal.k.fellows@manchester.ac.uk> | 2009-10-10 17:42:50 (GMT) |
commit | 49df46a2bf9d2a9e8254aab31eeafa5f957d4dcf (patch) | |
tree | cc55f4b952ce33eb8e00878156d1e2cb2f2f367d /generic | |
parent | ba31530899c4dd81a94eef9d7b3b8c000fa7e869 (diff) | |
download | tk-49df46a2bf9d2a9e8254aab31eeafa5f957d4dcf.zip tk-49df46a2bf9d2a9e8254aab31eeafa5f957d4dcf.tar.gz tk-49df46a2bf9d2a9e8254aab31eeafa5f957d4dcf.tar.bz2 |
[Bug 1961455]: Draw underlines and overstrikes when using Xft.
Diffstat (limited to 'generic')
-rw-r--r-- | generic/tkFont.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/generic/tkFont.c b/generic/tkFont.c index bd65379..47852ca 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.58 2009/09/10 12:16:37 dkf Exp $ + * RCS: @(#) $Id: tkFont.c,v 1.59 2009/10/10 17:42:50 dkf Exp $ */ #include "tkInt.h" @@ -2376,8 +2376,13 @@ TkDrawAngledTextLayout( lastByte = Tcl_UtfAtIndex(chunkPtr->start, numDisplayChars); dx = cosA * (chunkPtr->x + drawX) + sinA * (chunkPtr->y); dy = -sinA * (chunkPtr->x + drawX) + cosA * (chunkPtr->y); - TkpDrawAngledChars(display, drawable, gc, layoutPtr->tkfont, - firstByte, lastByte - firstByte, x+dx, y+dy, angle); + if (angle == 0.0) { + Tk_DrawChars(display, drawable, gc, layoutPtr->tkfont, + firstByte, lastByte - firstByte, x + dx, y + dy); + } else { + TkpDrawAngledChars(display, drawable, gc, layoutPtr->tkfont, + firstByte, lastByte - firstByte, x+dx, y+dy, angle); + } } firstChar -= chunkPtr->numChars; lastChar -= chunkPtr->numChars; |