diff options
author | fvogel <fvogelnew1@free.fr> | 2015-12-21 12:12:06 (GMT) |
---|---|---|
committer | fvogel <fvogelnew1@free.fr> | 2015-12-21 12:12:06 (GMT) |
commit | 60480c3f5dfc5ab6e13b6e55a310e3b991879eac (patch) | |
tree | 95edbf2775f385130019de74bc06510673b84a7b /macosx/tkMacOSXFont.c | |
parent | f3e4c6787e4309d230f3d102105b2ebedf2d12ca (diff) | |
parent | 56005a00aae9d8be182d5643373980ee371417d6 (diff) | |
download | tk-60480c3f5dfc5ab6e13b6e55a310e3b991879eac.zip tk-60480c3f5dfc5ab6e13b6e55a310e3b991879eac.tar.gz tk-60480c3f5dfc5ab6e13b6e55a310e3b991879eac.tar.bz2 |
Merged core-8-5-branch
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; |