summaryrefslogtreecommitdiffstats
path: root/unix/tkUnixRFont.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2024-10-25 21:06:25 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2024-10-25 21:06:25 (GMT)
commit0d5336db012f45753abace489f18f0ca299c6961 (patch)
treeb1bf3280a9046df99226158978502eeb26f5b0a3 /unix/tkUnixRFont.c
parente97381a6d921de403516d5b761539a450f4af83c (diff)
parent1320b8a2a9c1269a345d44d673a7a35707fbbe9c (diff)
downloadtk-core-tip-626.zip
tk-core-tip-626.tar.gz
tk-core-tip-626.tar.bz2
Merge 9.0core-tip-626
Diffstat (limited to 'unix/tkUnixRFont.c')
-rw-r--r--unix/tkUnixRFont.c21
1 files changed, 11 insertions, 10 deletions
diff --git a/unix/tkUnixRFont.c b/unix/tkUnixRFont.c
index a99c57b..d3253e4 100644
--- a/unix/tkUnixRFont.c
+++ b/unix/tkUnixRFont.c
@@ -361,7 +361,7 @@ InitFont(
errorFlag = 0;
handler = Tk_CreateErrorHandler(Tk_Display(tkwin),
- -1, -1, -1, InitFontErrorProc, (void *) &errorFlag);
+ -1, -1, -1, InitFontErrorProc, (void *)&errorFlag);
ftFont = GetFont(fontPtr, 0, 0.0);
if ((ftFont == NULL) || errorFlag) {
Tk_DeleteErrorHandler(handler);
@@ -403,7 +403,7 @@ InitFont(
fPtr->underlinePos = fPtr->fm.descent / 2;
handler = Tk_CreateErrorHandler(Tk_Display(tkwin),
- -1, -1, -1, InitFontErrorProc, (void *) &errorFlag);
+ -1, -1, -1, InitFontErrorProc, (void *)&errorFlag);
errorFlag = 0;
Tk_MeasureChars((Tk_Font) fPtr, "I", 1, -1, 0, &iWidth);
Tk_DeleteErrorHandler(handler);
@@ -786,7 +786,8 @@ Tk_MeasureChars(
LOCK;
XftTextExtents32(fontPtr->display, ftFont, &c, 1, &extents);
UNLOCK;
- } else {
+ }
+ if (errorFlag) {
extents.xOff = 0;
errorFlag = 0;
}
@@ -955,7 +956,7 @@ Tk_DrawChars(
XftGlyphFontSpec specs[NUM_SPEC];
XGlyphInfo metrics;
ThreadSpecificData *tsdPtr = (ThreadSpecificData *)
- Tcl_GetThreadData(&dataKey, sizeof(ThreadSpecificData));
+ Tcl_GetThreadData(&dataKey, sizeof(ThreadSpecificData));
if (fontPtr->ftDraw == 0) {
DEBUG(("Switch to drawable 0x%lx\n", drawable));
@@ -1088,7 +1089,7 @@ TkDrawAngledChars(
XftColor *xftcolor;
int xStart = x, yStart = y;
ThreadSpecificData *tsdPtr = (ThreadSpecificData *)
- Tcl_GetThreadData(&dataKey, sizeof(ThreadSpecificData));
+ Tcl_GetThreadData(&dataKey, sizeof(ThreadSpecificData));
#ifdef XFT_HAS_FIXED_ROTATED_PLACEMENT
int clen, nglyph;
FT_UInt glyphs[NUM_SPEC];
@@ -1169,10 +1170,10 @@ TkDrawAngledChars(
* at once (or whole blocks with same font), this requires a
* dynamic 'glyphs' array. In case of overflow the array has to
* be divided until the maximal string will fit. (GC)
- * Given the resolution of current displays though, this should
- * not be a huge issue since NUM_SPEC is 1024 and thus able to
- * cover about 6000 pixels for a 6 pixel wide font (which is
- * a very small barely readable font)
+ * Given the resolution of current displays though, this should
+ * not be a huge issue since NUM_SPEC is 1024 and thus able to
+ * cover about 6000 pixels for a 6 pixel wide font (which is
+ * a very small barely readable font)
*/
LOCK;
@@ -1428,7 +1429,7 @@ TkUnixSetXftClipRegion(
Region clipRegion) /* The clipping region to install. */
{
ThreadSpecificData *tsdPtr = (ThreadSpecificData *)
- Tcl_GetThreadData(&dataKey, sizeof(ThreadSpecificData));
+ Tcl_GetThreadData(&dataKey, sizeof(ThreadSpecificData));
tsdPtr->clipRegion = clipRegion;
}