diff options
author | hobbs <hobbs> | 2003-02-25 02:59:26 (GMT) |
---|---|---|
committer | hobbs <hobbs> | 2003-02-25 02:59:26 (GMT) |
commit | 4f5f8ff59a61c2f29cb0e121514e2a86a2850446 (patch) | |
tree | 54ee0d6b2d0b7be2361fbc8e208d3f3363117ea6 /unix | |
parent | d665260f8de4cab05575ab6784d8bc4f62a0cd54 (diff) | |
download | tk-4f5f8ff59a61c2f29cb0e121514e2a86a2850446.zip tk-4f5f8ff59a61c2f29cb0e121514e2a86a2850446.tar.gz tk-4f5f8ff59a61c2f29cb0e121514e2a86a2850446.tar.bz2 |
* unix/tkUnixFont.c (CreateClosestFont, CanUseFallback): use the
first best font match in user font path. [Bug #647497] (dal zotto)
Diffstat (limited to 'unix')
-rw-r--r-- | unix/tkUnixFont.c | 8 |
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; } |