aboutsummaryrefslogtreecommitdiff
path: root/freetype/builds/mac
diff options
context:
space:
mode:
Diffstat (limited to 'freetype/builds/mac')
-rw-r--r--freetype/builds/mac/freetype-Info.plist36
-rw-r--r--freetype/builds/mac/ftmac.c14
2 files changed, 47 insertions, 3 deletions
diff --git a/freetype/builds/mac/freetype-Info.plist b/freetype/builds/mac/freetype-Info.plist
new file mode 100644
index 000000000..b3d114dad
--- /dev/null
+++ b/freetype/builds/mac/freetype-Info.plist
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN"
+ "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+
+<plist version="1.0">
+
+<dict>
+ <key>CFBundleDevelopmentRegion</key>
+ <string>English</string>
+
+ <key>CFBundleExecutable</key>
+ <string>FreeType</string>
+
+ <key>CFBundleGetInfoString</key>
+ <string>FreeType ${PROJECT_VERSION}</string>
+
+ <key>CFBundleInfoDictionaryVersion</key>
+ <string>6.0</string>
+
+ <key>CFBundleName</key>
+ <string>FreeType</string>
+
+ <key>CFBundlePackageType</key>
+ <string>FMWK</string>
+
+ <key>CFBundleShortVersionString</key>
+ <string>${PROJECT_VERSION}</string>
+
+ <key>CFBundleSignature</key>
+ <string>????</string>
+
+ <key>CFBundleVersion</key>
+ <string>${PROJECT_VERSION}</string>
+</dict>
+
+</plist>
diff --git a/freetype/builds/mac/ftmac.c b/freetype/builds/mac/ftmac.c
index 4aa58c70a..8e88b9abe 100644
--- a/freetype/builds/mac/ftmac.c
+++ b/freetype/builds/mac/ftmac.c
@@ -5,7 +5,7 @@
/* Mac FOND support. Written by just@letterror.com. */
/* Heavily Fixed by mpsuzuki, George Williams and Sean McBride */
/* */
-/* Copyright 1996-2008, 2013 by */
+/* Copyright 1996-2008, 2013, 2014 by */
/* Just van Rossum, David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -204,6 +204,9 @@ typedef short ResourceIndex;
FMFontFamily family = 0;
+ if ( !fontName || !face_index )
+ return FT_THROW( Invalid_Argument );
+
*face_index = 0;
while ( status == 0 && !the_font )
{
@@ -381,7 +384,7 @@ typedef short ResourceIndex;
err = FT_GetFileRef_From_Mac_ATS_Name( fontName, &ref, face_index );
- if ( FT_Err_Ok != err )
+ if ( err )
return err;
if ( noErr != FSRefMakePath( &ref, path, maxPathSize ) )
@@ -420,7 +423,7 @@ typedef short ResourceIndex;
err = FT_GetFileRef_From_Mac_ATS_Name( fontName, &ref, face_index );
- if ( FT_Err_Ok != err )
+ if ( err )
return err;
if ( noErr != FSGetCatalogInfo( &ref, kFSCatInfoNone, NULL, NULL,
@@ -1238,6 +1241,9 @@ typedef short ResourceIndex;
FT_Error error = FT_Err_Ok;
+ /* test for valid `aface' and `library' delayed to */
+ /* `FT_New_Face_From_XXX' */
+
GetResInfo( fond, &fond_id, &fond_type, fond_name );
if ( ResError() != noErr || fond_type != TTAG_FOND )
return FT_THROW( Invalid_File_Format );
@@ -1442,6 +1448,8 @@ typedef short ResourceIndex;
UInt8 pathname[PATH_MAX];
+ /* test for valid `library' and `aface' delayed to `FT_Open_Face' */
+
if ( !ref )
return FT_THROW( Invalid_Argument );