Index: Source/platform/fonts/mac/FontCacheMac.mm |
diff --git a/Source/platform/fonts/mac/FontCacheMac.mm b/Source/platform/fonts/mac/FontCacheMac.mm |
index ef8862c10067b78ed1e70e426fdb06014db97790..6550eb73de05255903fd3ac75f7da2c4c1ef6ba2 100644 |
--- a/Source/platform/fonts/mac/FontCacheMac.mm |
+++ b/Source/platform/fonts/mac/FontCacheMac.mm |
@@ -197,7 +197,8 @@ FontPlatformData* FontCache::createFontPlatformData(const FontDescription& fontD |
NSInteger weight = toAppKitFontWeight(fontDescription.weight()); |
float size = fontSize; |
- NSFont *nsFont = [WebFontCache fontWithFamily:family traits:traits weight:weight size:size]; |
+ NSString *nsFontFamily = [[NSString alloc] initWithUTF8String:family.utf8().data()]; |
Nico
2014/01/15 19:06:12
This isn't correct, this is never freed anywhere.
tasak
2014/01/17 08:17:29
Done.
|
+ NSFont *nsFont = [WebFontCache fontWithFamily:nsFontFamily traits:traits weight:weight size:size]; |
if (!nsFont) |
return 0; |