diff options
author | patthoyts <patthoyts@users.sourceforge.net> | 2009-05-13 21:49:12 (GMT) |
---|---|---|
committer | patthoyts <patthoyts@users.sourceforge.net> | 2009-05-13 21:49:12 (GMT) |
commit | a49b9d01cc58374d6882839ff6e9ca8c14c88c0a (patch) | |
tree | 0ef1a4720feb68bce3dd4e49bf87f4f1d5a1829f /generic/tkFont.c | |
parent | 17870f6d9fd45524f08ad067e0ad7a57a9fed719 (diff) | |
download | tk-a49b9d01cc58374d6882839ff6e9ca8c14c88c0a.zip tk-a49b9d01cc58374d6882839ff6e9ca8c14c88c0a.tar.gz tk-a49b9d01cc58374d6882839ff6e9ca8c14c88c0a.tar.bz2 |
[Bug 2791352] backported fix and tests for mis-parsing of certain font descriptions.
Diffstat (limited to 'generic/tkFont.c')
-rw-r--r-- | generic/tkFont.c | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/generic/tkFont.c b/generic/tkFont.c index e48a0d5..3839ef0 100644 --- a/generic/tkFont.c +++ b/generic/tkFont.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkFont.c,v 1.42.2.1 2009/03/03 23:54:11 patthoyts Exp $ + * RCS: @(#) $Id: tkFont.c,v 1.42.2.2 2009/05/13 21:49:12 patthoyts Exp $ */ #include "tkInt.h" @@ -3235,6 +3235,20 @@ ParseFontNameObj( if (result == TCL_OK) { return TCL_OK; } + + /* + * If the string failed to parse but was considered to be a XLFD + * then it may be a "-option value" string with a hyphenated family + * name as per bug 2791352 + */ + + if (Tcl_ListObjGetElements(interp, objPtr, &objc, &objv) != TCL_OK) { + return TCL_ERROR; + } + + if (ConfigAttributesObj(interp, tkwin, objc, objv, faPtr) == TCL_OK) { + return TCL_OK; + } } /* |