summaryrefslogtreecommitdiffstats
path: root/unix
diff options
context:
space:
mode:
authorhobbs <hobbs@noemail.net>2003-02-25 02:59:25 (GMT)
committerhobbs <hobbs@noemail.net>2003-02-25 02:59:25 (GMT)
commit31a05326b8d29301f34cd3728b7f7a4eed9e51db (patch)
tree54ee0d6b2d0b7be2361fbc8e208d3f3363117ea6 /unix
parent51fce6f8464f97d9bb7925b4fcf5fb61abc5a90d (diff)
downloadtk-31a05326b8d29301f34cd3728b7f7a4eed9e51db.zip
tk-31a05326b8d29301f34cd3728b7f7a4eed9e51db.tar.gz
tk-31a05326b8d29301f34cd3728b7f7a4eed9e51db.tar.bz2
* unix/tkUnixFont.c (CreateClosestFont, CanUseFallback): use the
first best font match in user font path. [Bug #647497] (dal zotto) FossilOrigin-Name: 0c01a07f4fda26c6959400596b030de160de4451
Diffstat (limited to 'unix')
-rw-r--r--unix/tkUnixFont.c8
1 files changed, 4 insertions, 4 deletions
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;
}