summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog3
-rw-r--r--unix/tkUnixFont.c8
2 files changed, 7 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index 0b2c853..13fd94e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
2003-02-24 Jeff Hobbs <jeffh@ActiveState.com>
+ * unix/tkUnixFont.c (CreateClosestFont, CanUseFallback): use the
+ first best font match in user font path. [Bug #647497] (dal zotto)
+
* generic/tkListbox.c (ListboxSelectionSubCmd):
* tests/listbox.test: Allow 'selection includes' to respond when
disabled (but only 'includes'). [Bug #632514]
diff --git a/unix/tkUnixFont.c b/unix/tkUnixFont.c
index 64fff89..01677af 100644
--- a/unix/tkUnixFont.c
+++ b/unix/tkUnixFont.c
@@ -9,7 +9,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkUnixFont.c,v 1.17 2003/02/20 10:23:13 dkf Exp $
+ * RCS: @(#) $Id: tkUnixFont.c,v 1.18 2003/02/25 02:59:27 hobbs Exp $
*/
#include "tkUnixInt.h"
@@ -1357,14 +1357,14 @@ CreateClosestFont(tkwin, faPtr, xaPtr)
FontAttributes got;
int scalable;
unsigned int score;
-
+
if (TkFontParseXLFD(nameList[nameIdx], &got.fa, &got.xa) != TCL_OK) {
continue;
}
IdentifySymbolEncodings(&got);
scalable = (got.fa.size == 0);
score = RankAttributes(&want, &got);
- if (score <= bestScore[scalable]) {
+ if (score < bestScore[scalable]) {
bestIdx[scalable] = nameIdx;
bestScore[scalable] = score;
}
@@ -2377,7 +2377,7 @@ CanUseFallback(fontPtr, faceName, ch, fixSubFontPtrPtr)
scalable = (got.fa.size == 0);
score = RankAttributes(&want, &got);
- if (score <= bestScore[scalable]) {
+ if (score < bestScore[scalable]) {
bestIdx[scalable] = nameIdx;
bestScore[scalable] = score;
}