Commit 2b9c2e68 authored by Jan Djärv's avatar Jan Djärv
Browse files

* nsfont.m (nsfont_open): Remove font cache, it is not GC correct.

parent 81749a23
2012-10-12 Jan Djärv <>
* nsfont.m (nsfont_open): Remove font cache, it is not GC correct.
2012-10-12 Glenn Morris <>
* buffer.c (Fset_buffer): Doc fix. (Bug#12624)
......@@ -729,16 +729,6 @@ Properties to be considered are same as for list(). */
NSRect brect;
Lisp_Object font_object;
int fixLeopardBug;
static NSMutableDictionary *fontCache = nil;
NSNumber *cached;
/* 2008/03/08: The same font may end up being requested for different
entities, due to small differences in numeric values or other issues,
or for different copies of the same entity. Therefore we cache to
avoid creating multiple struct font objects (with metrics cache, etc.)
for the same NSFont object. */
if (fontCache == nil)
fontCache = [[NSMutableDictionary alloc] init];
......@@ -794,28 +784,8 @@ when setting family in ns_spec_to_descriptor(). */
NSLog (@"%@\n", nsfont);
/* Check the cache */
cached = [fontCache objectForKey: nsfont];
if (cached != nil && !synthItal)
fprintf(stderr, "*** nsfont_open CACHE HIT!\n");
XHASH (font_object) = [cached unsignedLongLongValue];
return font_object;
font_object = font_make_object (VECSIZE (struct nsfont_info),
font_entity, pixel_size);
if (!synthItal)
[fontCache setObject: [NSNumber
(unsigned long long) XHASH (font_object)]
forKey: nsfont];
font_info = (struct nsfont_info *) XFONT_OBJECT (font_object);
font = (struct font *) font_info;
if (!font)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment