#include <ft2build.h>
#include "ftbase.h"
#include <CoreServices/CoreServices.h>
#include <ApplicationServices/ApplicationServices.h>
#include <sys/syslimits.h>
Go to the source code of this file.
Defines | |
#define | OS_INLINE static __inline__ |
#define | HAVE_TYPE_RESOURCE_INDEX 0 |
#define | FT_DEPRECATED_ATTRIBUTE |
#define | kATSOptionFlagsUnRestrictedScope kATSOptionFlagsDefault |
#define | PREFER_LWFN 1 |
Typedefs | |
typedef short | ResourceIndex |
Functions | |
FT_GetFile_From_Mac_Name (const char *fontName, FSSpec *pathSpec, FT_Long *face_index) | |
static OSStatus | FT_ATSFontGetFileReference (ATSFontRef ats_font_id, FSRef *ats_font_ref) |
static FT_Error | FT_GetFileRef_From_Mac_ATS_Name (const char *fontName, FSRef *ats_font_ref, FT_Long *face_index) |
FT_GetFilePath_From_Mac_ATS_Name (const char *fontName, UInt8 *path, UInt32 maxPathSize, FT_Long *face_index) | |
FT_GetFile_From_Mac_ATS_Name (const char *fontName, FSSpec *pathSpec, FT_Long *face_index) | |
static OSErr | FT_FSPathMakeRes (const UInt8 *pathname, ResFileRefNum *res) |
static OSType | get_file_type_from_path (const UInt8 *pathname) |
static void | create_lwfn_name (char *ps_name, Str255 lwfn_file_name) |
static short | count_faces_sfnt (char *fond_data) |
static short | count_faces_scalable (char *fond_data) |
static void | parse_fond (char *fond_data, short *have_sfnt, ResID *sfnt_id, Str255 lwfn_file_name, short face_index) |
static FT_Error | lookup_lwfn_by_fond (const UInt8 *path_fond, ConstStr255Param base_lwfn, UInt8 *path_lwfn, size_t path_size) |
static short | count_faces (Handle fond, const UInt8 *pathname) |
static FT_Error | read_lwfn (FT_Memory memory, ResFileRefNum res, FT_Byte **pfb_data, FT_ULong *size) |
static FT_Error | FT_New_Face_From_LWFN (FT_Library library, const UInt8 *pathname, FT_Long face_index, FT_Face *aface) |
static FT_Error | FT_New_Face_From_SFNT (FT_Library library, ResID sfnt_id, FT_Long face_index, FT_Face *aface) |
static FT_Error | FT_New_Face_From_Suitcase (FT_Library library, const UInt8 *pathname, FT_Long face_index, FT_Face *aface) |
FT_New_Face_From_FOND (FT_Library library, Handle fond, FT_Long face_index, FT_Face *aface) | |
static FT_Error | FT_New_Face_From_Resource (FT_Library library, const UInt8 *pathname, FT_Long face_index, FT_Face *aface) |
FT_New_Face (FT_Library library, const char *pathname, FT_Long face_index, FT_Face *aface) | |
FT_New_Face_From_FSRef (FT_Library library, const FSRef *ref, FT_Long face_index, FT_Face *aface) | |
FT_New_Face_From_FSSpec (FT_Library library, const FSSpec *spec, FT_Long face_index, FT_Face *aface) |
#define kATSOptionFlagsUnRestrictedScope kATSOptionFlagsDefault |
typedef short ResourceIndex |
static short count_faces | ( | Handle | fond, | |
const UInt8 * | pathname | |||
) | [static] |
Definition at line 539 of file ftmac.c.
References count_faces_scalable(), lookup_lwfn_by_fond(), parse_fond(), PATH_MAX, and PREFER_LWFN.
static short count_faces_scalable | ( | char * | fond_data | ) | [static] |
static void create_lwfn_name | ( | char * | ps_name, | |
Str255 | lwfn_file_name | |||
) | [static] |
static OSStatus FT_ATSFontGetFileReference | ( | ATSFontRef | ats_font_id, | |
FSRef * | ats_font_ref | |||
) | [static] |
static OSErr FT_FSPathMakeRes | ( | const UInt8 * | pathname, | |
ResFileRefNum * | res | |||
) | [static] |
FT_GetFile_From_Mac_ATS_Name | ( | const char * | fontName, | |
FSSpec * | pathSpec, | |||
FT_Long * | face_index | |||
) |
FT_GetFile_From_Mac_Name | ( | const char * | fontName, | |
FSSpec * | pathSpec, | |||
FT_Long * | face_index | |||
) |
FT_GetFilePath_From_Mac_ATS_Name | ( | const char * | fontName, | |
UInt8 * | path, | |||
UInt32 | maxPathSize, | |||
FT_Long * | face_index | |||
) |
Definition at line 220 of file ftmac.c.
References FT_GetFileRef_From_Mac_ATS_Name(), FT_UNUSED, and noErr.
static FT_Error FT_GetFileRef_From_Mac_ATS_Name | ( | const char * | fontName, | |
FSRef * | ats_font_ref, | |||
FT_Long * | face_index | |||
) | [static] |
Definition at line 174 of file ftmac.c.
References FT_ATSFontGetFileReference(), kATSOptionFlagsUnRestrictedScope, noErr, and NULL.
Referenced by FT_GetFile_From_Mac_ATS_Name(), and FT_GetFilePath_From_Mac_ATS_Name().
FT_New_Face | ( | FT_Library | library, | |
const char * | pathname, | |||
FT_Long | face_index, | |||
FT_Face * | aface | |||
) |
Definition at line 951 of file ftmac.c.
References error, FT_Open_Args_::flags, FT_New_Face_From_Resource(), FT_Open_Face(), FT_OPEN_PATHNAME, NULL, and FT_Open_Args_::pathname.
FT_New_Face_From_FOND | ( | FT_Library | library, | |
Handle | fond, | |||
FT_Long | face_index, | |||
FT_Face * | aface | |||
) |
Definition at line 838 of file ftmac.c.
References error, FT_MEM_SET, FT_New_Face_From_LWFN(), FT_New_Face_From_SFNT(), lookup_lwfn_by_fond(), noErr, NULL, parse_fond(), PATH_MAX, PREFER_LWFN, and TTAG_FOND.
FT_New_Face_From_FSRef | ( | FT_Library | library, | |
const FSRef * | ref, | |||
FT_Long | face_index, | |||
FT_Face * | aface | |||
) |
Definition at line 992 of file ftmac.c.
References error, FT_Open_Args_::flags, FT_New_Face_From_Resource(), FT_Open_Face(), FT_OPEN_PATHNAME, FT_UNUSED, NULL, PATH_MAX, and FT_Open_Args_::pathname.
FT_New_Face_From_FSSpec | ( | FT_Library | library, | |
const FSSpec * | spec, | |||
FT_Long | face_index, | |||
FT_Face * | aface | |||
) |
Definition at line 1032 of file ftmac.c.
References error, FT_Open_Args_::flags, FT_New_Face_From_FSRef(), FT_New_Face_From_Resource(), FT_Open_Face(), FT_OPEN_PATHNAME, FT_UNUSED, noErr, NULL, PATH_MAX, and FT_Open_Args_::pathname.
static FT_Error FT_New_Face_From_LWFN | ( | FT_Library | library, | |
const UInt8 * | pathname, | |||
FT_Long | face_index, | |||
FT_Face * | aface | |||
) | [static] |
Definition at line 694 of file ftmac.c.
References error, FT_FSPathMakeRes(), FT_LibraryRec_::memory, noErr, NULL, open_face_from_buffer(), and read_lwfn().
static FT_Error FT_New_Face_From_Resource | ( | FT_Library | library, | |
const UInt8 * | pathname, | |||
FT_Long | face_index, | |||
FT_Face * | aface | |||
) | [static] |
Definition at line 910 of file ftmac.c.
References error, FT_New_Face_From_LWFN(), FT_New_Face_From_Suitcase(), get_file_type_from_path(), NULL, and TTAG_LWFN.
static FT_Error FT_New_Face_From_SFNT | ( | FT_Library | library, | |
ResID | sfnt_id, | |||
FT_Long | face_index, | |||
FT_Face * | aface | |||
) | [static] |
Definition at line 726 of file ftmac.c.
References error, FT_ALLOC, FT_FREE, ft_memcmp, ft_memcpy, FT_NEW, FT_Stream_Close(), FT_Stream_OpenMemory(), FT_LibraryRec_::memory, NULL, open_face_from_buffer(), open_face_PS_from_sfnt_stream(), size_t, PC3::stream(), and TTAG_sfnt.
static FT_Error FT_New_Face_From_Suitcase | ( | FT_Library | library, | |
const UInt8 * | pathname, | |||
FT_Long | face_index, | |||
FT_Face * | aface | |||
) | [static] |
Definition at line 793 of file ftmac.c.
References count_faces(), error, FT_FSPathMakeRes(), FT_New_Face_From_FOND(), noErr, NULL, and TTAG_FOND.
static OSType get_file_type_from_path | ( | const UInt8 * | pathname | ) | [static] |