#include <ft2build.h>
#include "ftbase.h"
#include <Resources.h>
#include <Fonts.h>
#include <Endian.h>
#include <Errors.h>
#include <Files.h>
#include <TextUtils.h>
Go to the source code of this file.
Defines | |
#define | PATH_MAX 1024 |
#define | FT_DEPRECATED_ATTRIBUTE |
#define | HAVE_FSSPEC 0 |
#define | HAVE_FSREF 0 |
#define | HAVE_QUICKDRAW_CARBON 0 |
#define | HAVE_ATS 0 |
#define | HAVE_TYPE_RESOURCE_INDEX 0 |
#define | PREFER_LWFN 1 |
Typedefs | |
typedef short | ResourceIndex |
Functions | |
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) | |
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, int 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 PATH_MAX 1024 |
Definition at line 92 of file ftmac.c.
Referenced by asim_my_scandir_ext(), count_faces(), FT_New_Face_From_FOND(), FT_New_Face_From_FSRef(), and FT_New_Face_From_FSSpec().
#define PREFER_LWFN 1 |
typedef short ResourceIndex |
static short count_faces | ( | Handle | fond, | |
const UInt8 * | pathname | |||
) | [static] |
Definition at line 921 of file ftmac.c.
References count_faces_scalable(), lookup_lwfn_by_fond(), parse_fond(), PATH_MAX, and PREFER_LWFN.
Referenced by FT_New_Face_From_Suitcase().
static short count_faces_scalable | ( | char * | fond_data | ) | [static] |
static short count_faces_sfnt | ( | char * | fond_data | ) | [static] |
static void create_lwfn_name | ( | char * | ps_name, | |
Str255 | lwfn_file_name | |||
) | [static] |
Definition at line 654 of file ftmac.c.
References ft_isalnum, ft_isupper, and max.
Referenced by parse_fond().
static OSErr FT_FSPathMakeRes | ( | const UInt8 * | pathname, | |
ResFileRefNum * | res | |||
) | [static] |
Definition at line 571 of file ftmac.c.
References FALSE, noErr, and NULL.
Referenced by FT_New_Face_From_LWFN(), and FT_New_Face_From_Suitcase().
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 | |||
) |
FT_New_Face | ( | FT_Library | library, | |
const char * | pathname, | |||
FT_Long | face_index, | |||
FT_Face * | aface | |||
) |
Definition at line 1380 of file ftmac.c.
Referenced by ExecuteTest(), FTFace::FTFace(), open_freetype_font_int(), and TTF::SetTextFont().
FT_New_Face_From_FOND | ( | FT_Library | library, | |
Handle | fond, | |||
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 | |||
) |
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 1078 of file ftmac.c.
References error, FT_FSPathMakeRes(), FT_LibraryRec_::memory, noErr, NULL, open_face_from_buffer(), and read_lwfn().
Referenced by FT_New_Face_From_FOND(), and FT_New_Face_From_Resource().
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 1339 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.
Referenced by FT_New_Face(), FT_New_Face_From_FSRef(), and FT_New_Face_From_FSSpec().
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 1110 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.
Referenced by FT_New_Face_From_FOND().
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 1179 of file ftmac.c.
References count_faces(), error, FT_FSPathMakeRes(), FT_New_Face_From_FOND(), noErr, NULL, and TTAG_FOND.
Referenced by FT_New_Face_From_Resource().
static OSType get_file_type_from_path | ( | const UInt8 * | pathname | ) | [static] |
static FT_Error lookup_lwfn_by_fond | ( | const UInt8 * | path_fond, | |
ConstStr255Param | base_lwfn, | |||
UInt8 * | path_lwfn, | |||
int | path_size | |||
) | [static] |
static void parse_fond | ( | char * | fond_data, | |
short * | have_sfnt, | |||
ResID * | sfnt_id, | |||
Str255 | lwfn_file_name, | |||
short | face_index | |||
) | [static] |
Definition at line 725 of file ftmac.c.
References count_faces_sfnt(), create_lwfn_name(), for(), ft_memcpy, FT_MIN, i, j, names, NULL, s, short, and size_t.
Referenced by count_faces(), and FT_New_Face_From_FOND().