summaryrefslogtreecommitdiffstats
path: root/unix/tkUnixFont.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2024-01-03 14:37:29 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2024-01-03 14:37:29 (GMT)
commit2eaac113f52bea5ecf64333618bca906c2482023 (patch)
tree77c1042483c300ea2e9c2c06b12023b6037976c2 /unix/tkUnixFont.c
parentdcfc048bfc768826800705c75df17091a6b7d185 (diff)
parentc44082767a80d612aaad29796fe5638a291a8589 (diff)
downloadtk-2eaac113f52bea5ecf64333618bca906c2482023.zip
tk-2eaac113f52bea5ecf64333618bca906c2482023.tar.gz
tk-2eaac113f52bea5ecf64333618bca906c2482023.tar.bz2
Fix [52df668390]: Measurement of control characters are wrong after measurement of characters that cannot be displayed by the given font
Diffstat (limited to 'unix/tkUnixFont.c')
-rw-r--r--unix/tkUnixFont.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/unix/tkUnixFont.c b/unix/tkUnixFont.c
index 5ad7753..4c7d1ce 100644
--- a/unix/tkUnixFont.c
+++ b/unix/tkUnixFont.c
@@ -2021,16 +2021,16 @@ FindSubFontForChar(
ch = 0xFFFD;
}
+ if (FontMapLookup(&fontPtr->controlSubFont, ch)) {
+ return &fontPtr->controlSubFont;
+ }
+
for (i = 0; i < fontPtr->numSubFonts; i++) {
if (FontMapLookup(&fontPtr->subFontArray[i], ch)) {
return &fontPtr->subFontArray[i];
}
}
- if (FontMapLookup(&fontPtr->controlSubFont, ch)) {
- return &fontPtr->controlSubFont;
- }
-
/*
* Keep track of all face names that we check, so we don't check some name
* multiple times if it can be reached by multiple paths.