gdi32: Disable the freetype mmap sharing on Mac OS.

This commit is contained in:
Alexandre Julliard 2006-12-08 12:14:13 +01:00
parent ccae172e1d
commit ae9f68dec9
1 changed files with 6 additions and 6 deletions

View File

@ -1887,6 +1887,7 @@ 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;
@ -1923,6 +1924,7 @@ static struct font_mapping *map_font( const char *name )
error: error:
close( fd ); close( fd );
#endif
return NULL; return NULL;
} }
@ -1945,13 +1947,11 @@ 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);
WARN("failed to map %s\n", debugstr_a(file)); else
return 0; err = pFT_New_Face(library, file, face_index, &ft_face);
}
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;