diff options
author | dgp <dgp@users.sourceforge.net> | 2015-12-22 20:59:26 (GMT) |
---|---|---|
committer | dgp <dgp@users.sourceforge.net> | 2015-12-22 20:59:26 (GMT) |
commit | 6c0187f324138cc7e5f7aeaafa9718bd32e536c4 (patch) | |
tree | bc8f4a77a394c66aec3e7331dc24a3ede72efc6c /macosx/tkMacOSXFont.c | |
parent | 87dca641534768e549dd5ff1d43f7111ae4ef578 (diff) | |
parent | 56005a00aae9d8be182d5643373980ee371417d6 (diff) | |
download | tk-6c0187f324138cc7e5f7aeaafa9718bd32e536c4.zip tk-6c0187f324138cc7e5f7aeaafa9718bd32e536c4.tar.gz tk-6c0187f324138cc7e5f7aeaafa9718bd32e536c4.tar.bz2 |
merge 8.5
Diffstat (limited to 'macosx/tkMacOSXFont.c')
-rw-r--r-- | macosx/tkMacOSXFont.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/macosx/tkMacOSXFont.c b/macosx/tkMacOSXFont.c index f1e01d2..f329071 100644 --- a/macosx/tkMacOSXFont.c +++ b/macosx/tkMacOSXFont.c @@ -210,6 +210,7 @@ FindNSFont( nsFont = [fm convertFont:nsFont toSize:size]; nsFont = [fm convertFont:nsFont toHaveTrait:traits]; } + [nsFont retain]; #undef defaultFont return nsFont; } @@ -371,6 +372,7 @@ TkpFontPkgInit( NSFont *nsFont; TkFontAttributes fa; NSMutableCharacterSet *cs; + /* Since we called before TkpInit, we need our own autorelease pool. */ NSAutoreleasePool *pool = [NSAutoreleasePool new]; /* force this for now */ @@ -530,7 +532,7 @@ TkpGetFontFromAttributes( nsFont = FindNSFont(faPtr->family, traits, weight, points, 1); } if (!nsFont) { - Tcl_Panic("Could not deternmine NSFont from TkFontAttributes"); + Tcl_Panic("Could not determine NSFont from TkFontAttributes"); } if (tkFontPtr == NULL) { fontPtr = (MacFont *) ckalloc(sizeof(MacFont)); @@ -675,7 +677,6 @@ TkpGetFontAttrsForChar( { MacFont *fontPtr = (MacFont *) tkfont; NSFont *nsFont = fontPtr->nsFont; - *faPtr = fontPtr->font.fa; if (nsFont && ![[nsFont coveredCharacterSet] characterIsMember:c]) { UTF16Char ch = c; |