gdi32: Disable the freetype mmap sharing on Mac OS.

oldstable
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 )
{
#ifndef __APPLE__ /* Mac OS fonts use resource forks, we can't simply mmap them */
struct font_mapping *mapping;
struct stat st;
int fd;
@ -1923,6 +1924,7 @@ static struct font_mapping *map_font( const char *name )
error:
close( fd );
#endif
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);
if (!(font->mapping = map_font( file )))
{
WARN("failed to map %s\n", debugstr_a(file));
return 0;
}
if ((font->mapping = map_font( file )))
err = pFT_New_Memory_Face(library, font->mapping->data, font->mapping->size, face_index, &ft_face);
else
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) {
ERR("FT_New_Face rets %d\n", err);
return 0;