Commit df605c0a authored by Ken Thomases's avatar Ken Thomases Committed by Alexandre Julliard

Revert "gdi32: Disable the freetype mmap sharing on Mac OS.".

This reverts ae9f68de commit. Because of commit 4e686043 which extracts the constituent fonts from Mac suitcase fonts, we can use mmap on font files on the Mac.
parent f76d076f
...@@ -2205,7 +2205,6 @@ static LONG calc_ppem_for_height(FT_Face ft_face, LONG height) ...@@ -2205,7 +2205,6 @@ static LONG calc_ppem_for_height(FT_Face ft_face, LONG height)
static struct font_mapping *map_font( const char *name ) static struct font_mapping *map_font( const char *name )
{ {
#ifndef __APPLE__ /* Mac OS fonts use resource forks, we can't simply mmap them */
struct font_mapping *mapping; struct font_mapping *mapping;
struct stat st; struct stat st;
int fd; int fd;
...@@ -2242,7 +2241,6 @@ static struct font_mapping *map_font( const char *name ) ...@@ -2242,7 +2241,6 @@ static struct font_mapping *map_font( const char *name )
error: error:
close( fd ); close( fd );
#endif
return NULL; return NULL;
} }
...@@ -2265,11 +2263,13 @@ static FT_Face OpenFontFile(GdiFont *font, char *file, FT_Long face_index, LONG ...@@ -2265,11 +2263,13 @@ static FT_Face OpenFontFile(GdiFont *font, char *file, FT_Long face_index, LONG
TRACE("%s, %ld, %d x %d\n", debugstr_a(file), face_index, width, height); TRACE("%s, %ld, %d x %d\n", debugstr_a(file), face_index, width, height);
if ((font->mapping = map_font( file ))) if (!(font->mapping = map_font( file )))
err = pFT_New_Memory_Face(library, font->mapping->data, font->mapping->size, face_index, &ft_face); {
else WARN("failed to map %s\n", debugstr_a(file));
err = pFT_New_Face(library, file, face_index, &ft_face); return 0;
}
err = pFT_New_Memory_Face(library, font->mapping->data, font->mapping->size, face_index, &ft_face);
if(err) { if(err) {
ERR("FT_New_Face rets %d\n", err); ERR("FT_New_Face rets %d\n", err);
return 0; return 0;
......
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