2000-07-28 01:08:32 +00:00
|
|
|
/***************************************************************************/
|
|
|
|
/* */
|
|
|
|
/* ftmac.h */
|
|
|
|
/* */
|
|
|
|
/* Additional Mac-specific API. */
|
|
|
|
/* */
|
2013-09-03 09:33:10 +00:00
|
|
|
/* Copyright 1996-2001, 2004, 2006, 2007, 2013 by */
|
2000-07-28 01:08:32 +00:00
|
|
|
/* Just van Rossum, David Turner, Robert Wilhelm, and Werner Lemberg. */
|
|
|
|
/* */
|
|
|
|
/* This file is part of the FreeType project, and may only be used, */
|
|
|
|
/* modified, and distributed under the terms of the FreeType project */
|
|
|
|
/* license, LICENSE.TXT. By continuing to use, modify, or distribute */
|
|
|
|
/* this file you indicate that you have read the license and */
|
|
|
|
/* understand and accept it fully. */
|
|
|
|
/* */
|
|
|
|
/***************************************************************************/
|
|
|
|
|
|
|
|
|
2000-11-04 08:33:38 +00:00
|
|
|
/***************************************************************************/
|
|
|
|
/* */
|
2013-11-13 07:55:46 +00:00
|
|
|
/* NOTE: Include this file after FT_FREETYPE_H and after any */
|
2007-12-06 05:43:36 +00:00
|
|
|
/* Mac-specific headers (because this header uses Mac types such as */
|
|
|
|
/* Handle, FSSpec, FSRef, etc.) */
|
2000-11-04 08:33:38 +00:00
|
|
|
/* */
|
|
|
|
/***************************************************************************/
|
2000-07-28 01:08:32 +00:00
|
|
|
|
|
|
|
|
2001-12-07 21:56:32 +00:00
|
|
|
#ifndef __FTMAC_H__
|
|
|
|
#define __FTMAC_H__
|
2000-07-28 01:08:32 +00:00
|
|
|
|
|
|
|
|
2000-12-09 00:45:38 +00:00
|
|
|
#include <ft2build.h>
|
|
|
|
|
|
|
|
|
|
|
|
FT_BEGIN_HEADER
|
2000-08-01 13:17:04 +00:00
|
|
|
|
2001-01-11 09:27:49 +00:00
|
|
|
|
2007-02-08 08:54:09 +00:00
|
|
|
/* gcc-3.4.1 and later can warn about functions tagged as deprecated */
|
2007-02-05 04:07:46 +00:00
|
|
|
#ifndef FT_DEPRECATED_ATTRIBUTE
|
2007-02-08 08:54:09 +00:00
|
|
|
#if defined(__GNUC__) && \
|
|
|
|
((__GNUC__ >= 4) || ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 1)))
|
|
|
|
#define FT_DEPRECATED_ATTRIBUTE __attribute__((deprecated))
|
2007-02-05 04:07:46 +00:00
|
|
|
#else
|
|
|
|
#define FT_DEPRECATED_ATTRIBUTE
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
2001-01-11 09:27:49 +00:00
|
|
|
/*************************************************************************/
|
|
|
|
/* */
|
|
|
|
/* <Section> */
|
2001-02-13 17:42:49 +00:00
|
|
|
/* mac_specific */
|
2001-01-11 09:27:49 +00:00
|
|
|
/* */
|
|
|
|
/* <Title> */
|
Adding OpenType validation module. The code is based on the
(unfinished) `otlayout' module but has been heavily modified to make
it much more compact.
* src/otvalid/*: New module.
* include/freetype/ftotval.h, src/base/ftotval.c,
include/freetype/internal/services/svotval.h: New files.
* include/freetype/config/ftmodule.h: Add otv_module_class.
* include/freetype/config/ftheader.h (FT_OPENTYPE_VALIDATE_H): New
macro.
* include/freetype/internal/ftserv.h
(FT_SERVICE_OPENTYPE_VALIDATE_H): New macro.
* include/freetype/internal/fttrace.h (otvmodule, otvcommon,
otvbase, otvgdef, otvgpos, otvgsub, otvjstf): New trace components.
* include/freetype/ftchapters.h: Updated.
* src/base/Jamfile (Library), src/base/descrip.mms (OBJS),
src/base/rules.mk (BASE_EXT_SRC): Updated.
* docs/CHANGES: Updated.
2004-09-10 14:39:00 +00:00
|
|
|
/* Mac Specific Interface */
|
2001-01-11 09:27:49 +00:00
|
|
|
/* */
|
|
|
|
/* <Abstract> */
|
|
|
|
/* Only available on the Macintosh. */
|
|
|
|
/* */
|
|
|
|
/* <Description> */
|
|
|
|
/* The following definitions are only available if FreeType is */
|
|
|
|
/* compiled on a Macintosh. */
|
|
|
|
/* */
|
|
|
|
/*************************************************************************/
|
|
|
|
|
2000-08-01 13:17:04 +00:00
|
|
|
|
2000-07-28 01:08:32 +00:00
|
|
|
/*************************************************************************/
|
|
|
|
/* */
|
|
|
|
/* <Function> */
|
|
|
|
/* FT_New_Face_From_FOND */
|
|
|
|
/* */
|
|
|
|
/* <Description> */
|
2006-01-12 08:49:24 +00:00
|
|
|
/* Create a new face object from a FOND resource. */
|
2000-07-28 01:08:32 +00:00
|
|
|
/* */
|
|
|
|
/* <InOut> */
|
|
|
|
/* library :: A handle to the library resource. */
|
|
|
|
/* */
|
|
|
|
/* <Input> */
|
2006-05-12 08:00:13 +00:00
|
|
|
/* fond :: A FOND resource. */
|
2000-07-28 01:08:32 +00:00
|
|
|
/* */
|
2000-11-07 17:21:11 +00:00
|
|
|
/* face_index :: Only supported for the -1 `sanity check' special */
|
|
|
|
/* case. */
|
2000-07-28 01:08:32 +00:00
|
|
|
/* */
|
|
|
|
/* <Output> */
|
|
|
|
/* aface :: A handle to a new face object. */
|
|
|
|
/* */
|
|
|
|
/* <Return> */
|
2008-06-26 19:56:51 +00:00
|
|
|
/* FreeType error code. 0~means success. */
|
2000-07-28 01:08:32 +00:00
|
|
|
/* */
|
|
|
|
/* <Notes> */
|
2006-05-12 08:00:13 +00:00
|
|
|
/* This function can be used to create @FT_Face objects from fonts */
|
2006-01-12 08:49:24 +00:00
|
|
|
/* that are installed in the system as follows. */
|
2000-11-07 17:21:11 +00:00
|
|
|
/* */
|
2001-01-10 11:15:48 +00:00
|
|
|
/* { */
|
2000-07-28 01:08:32 +00:00
|
|
|
/* fond = GetResource( 'FOND', fontName ); */
|
|
|
|
/* error = FT_New_Face_From_FOND( library, fond, 0, &face ); */
|
2001-01-10 11:15:48 +00:00
|
|
|
/* } */
|
|
|
|
/* */
|
2001-06-28 07:17:51 +00:00
|
|
|
FT_EXPORT( FT_Error )
|
|
|
|
FT_New_Face_From_FOND( FT_Library library,
|
|
|
|
Handle fond,
|
|
|
|
FT_Long face_index,
|
2007-11-16 15:48:58 +00:00
|
|
|
FT_Face *aface )
|
|
|
|
FT_DEPRECATED_ATTRIBUTE;
|
2000-07-28 01:08:32 +00:00
|
|
|
|
2001-01-11 09:27:49 +00:00
|
|
|
|
2001-12-06 17:52:40 +00:00
|
|
|
/*************************************************************************/
|
|
|
|
/* */
|
|
|
|
/* <Function> */
|
2001-12-07 21:56:32 +00:00
|
|
|
/* FT_GetFile_From_Mac_Name */
|
2001-12-06 17:52:40 +00:00
|
|
|
/* */
|
|
|
|
/* <Description> */
|
2006-01-12 08:49:24 +00:00
|
|
|
/* Return an FSSpec for the disk file containing the named font. */
|
2001-12-06 17:52:40 +00:00
|
|
|
/* */
|
|
|
|
/* <Input> */
|
2006-01-12 08:49:24 +00:00
|
|
|
/* fontName :: Mac OS name of the font (e.g., Times New Roman */
|
|
|
|
/* Bold). */
|
2001-12-06 17:52:40 +00:00
|
|
|
/* */
|
|
|
|
/* <Output> */
|
2007-02-08 08:54:09 +00:00
|
|
|
/* pathSpec :: FSSpec to the file. For passing to */
|
2007-02-05 02:46:27 +00:00
|
|
|
/* @FT_New_Face_From_FSSpec. */
|
2001-12-06 17:52:40 +00:00
|
|
|
/* */
|
2007-02-08 08:54:09 +00:00
|
|
|
/* face_index :: Index of the face. For passing to */
|
2007-02-05 02:46:27 +00:00
|
|
|
/* @FT_New_Face_From_FSSpec. */
|
2001-12-06 17:52:40 +00:00
|
|
|
/* */
|
|
|
|
/* <Return> */
|
2008-06-26 19:56:51 +00:00
|
|
|
/* FreeType error code. 0~means success. */
|
2001-12-06 17:52:40 +00:00
|
|
|
/* */
|
2004-02-17 13:46:17 +00:00
|
|
|
FT_EXPORT( FT_Error )
|
2006-01-12 03:33:16 +00:00
|
|
|
FT_GetFile_From_Mac_Name( const char* fontName,
|
2004-02-26 21:56:27 +00:00
|
|
|
FSSpec* pathSpec,
|
2007-02-05 04:07:46 +00:00
|
|
|
FT_Long* face_index )
|
|
|
|
FT_DEPRECATED_ATTRIBUTE;
|
2004-02-26 21:56:27 +00:00
|
|
|
|
|
|
|
|
2006-01-12 03:33:16 +00:00
|
|
|
/*************************************************************************/
|
|
|
|
/* */
|
|
|
|
/* <Function> */
|
|
|
|
/* FT_GetFile_From_Mac_ATS_Name */
|
|
|
|
/* */
|
|
|
|
/* <Description> */
|
2006-01-12 08:49:24 +00:00
|
|
|
/* Return an FSSpec for the disk file containing the named font. */
|
2006-01-12 03:33:16 +00:00
|
|
|
/* */
|
|
|
|
/* <Input> */
|
|
|
|
/* fontName :: Mac OS name of the font in ATS framework. */
|
|
|
|
/* */
|
|
|
|
/* <Output> */
|
2007-02-05 02:46:27 +00:00
|
|
|
/* pathSpec :: FSSpec to the file. For passing to */
|
|
|
|
/* @FT_New_Face_From_FSSpec. */
|
2006-01-12 03:33:16 +00:00
|
|
|
/* */
|
2007-02-05 02:46:27 +00:00
|
|
|
/* face_index :: Index of the face. For passing to */
|
|
|
|
/* @FT_New_Face_From_FSSpec. */
|
2006-01-12 03:33:16 +00:00
|
|
|
/* */
|
|
|
|
/* <Return> */
|
2008-06-26 19:56:51 +00:00
|
|
|
/* FreeType error code. 0~means success. */
|
2006-01-12 03:33:16 +00:00
|
|
|
/* */
|
|
|
|
FT_EXPORT( FT_Error )
|
|
|
|
FT_GetFile_From_Mac_ATS_Name( const char* fontName,
|
|
|
|
FSSpec* pathSpec,
|
2007-02-05 04:07:46 +00:00
|
|
|
FT_Long* face_index )
|
|
|
|
FT_DEPRECATED_ATTRIBUTE;
|
2006-01-12 03:33:16 +00:00
|
|
|
|
|
|
|
|
2007-02-05 03:28:29 +00:00
|
|
|
/*************************************************************************/
|
|
|
|
/* */
|
|
|
|
/* <Function> */
|
|
|
|
/* FT_GetFilePath_From_Mac_ATS_Name */
|
|
|
|
/* */
|
|
|
|
/* <Description> */
|
|
|
|
/* Return a pathname of the disk file and face index for given font */
|
2013-09-03 09:33:10 +00:00
|
|
|
/* name that is handled by ATS framework. */
|
2007-02-05 03:28:29 +00:00
|
|
|
/* */
|
|
|
|
/* <Input> */
|
|
|
|
/* fontName :: Mac OS name of the font in ATS framework. */
|
|
|
|
/* */
|
|
|
|
/* <Output> */
|
2007-02-08 08:54:09 +00:00
|
|
|
/* path :: Buffer to store pathname of the file. For passing */
|
|
|
|
/* to @FT_New_Face. The client must allocate this */
|
2007-02-05 03:28:29 +00:00
|
|
|
/* buffer before calling this function. */
|
|
|
|
/* */
|
|
|
|
/* maxPathSize :: Lengths of the buffer `path' that client allocated. */
|
|
|
|
/* */
|
|
|
|
/* face_index :: Index of the face. For passing to @FT_New_Face. */
|
|
|
|
/* */
|
|
|
|
/* <Return> */
|
2008-06-26 19:56:51 +00:00
|
|
|
/* FreeType error code. 0~means success. */
|
2007-02-05 03:28:29 +00:00
|
|
|
/* */
|
|
|
|
FT_EXPORT( FT_Error )
|
|
|
|
FT_GetFilePath_From_Mac_ATS_Name( const char* fontName,
|
|
|
|
UInt8* path,
|
|
|
|
UInt32 maxPathSize,
|
2007-11-16 15:48:58 +00:00
|
|
|
FT_Long* face_index )
|
|
|
|
FT_DEPRECATED_ATTRIBUTE;
|
2007-02-05 03:28:29 +00:00
|
|
|
|
|
|
|
|
2004-02-26 21:56:27 +00:00
|
|
|
/*************************************************************************/
|
|
|
|
/* */
|
|
|
|
/* <Function> */
|
|
|
|
/* FT_New_Face_From_FSSpec */
|
|
|
|
/* */
|
|
|
|
/* <Description> */
|
2006-01-12 08:49:24 +00:00
|
|
|
/* Create a new face object from a given resource and typeface index */
|
2004-02-26 21:56:27 +00:00
|
|
|
/* using an FSSpec to the font file. */
|
|
|
|
/* */
|
|
|
|
/* <InOut> */
|
|
|
|
/* library :: A handle to the library resource. */
|
|
|
|
/* */
|
|
|
|
/* <Input> */
|
|
|
|
/* spec :: FSSpec to the font file. */
|
|
|
|
/* */
|
|
|
|
/* face_index :: The index of the face within the resource. The */
|
2008-06-26 19:56:51 +00:00
|
|
|
/* first face has index~0. */
|
2004-02-26 21:56:27 +00:00
|
|
|
/* <Output> */
|
|
|
|
/* aface :: A handle to a new face object. */
|
|
|
|
/* */
|
|
|
|
/* <Return> */
|
2008-06-26 19:56:51 +00:00
|
|
|
/* FreeType error code. 0~means success. */
|
2004-02-26 21:56:27 +00:00
|
|
|
/* */
|
|
|
|
/* <Note> */
|
|
|
|
/* @FT_New_Face_From_FSSpec is identical to @FT_New_Face except */
|
|
|
|
/* it accepts an FSSpec instead of a path. */
|
|
|
|
/* */
|
|
|
|
FT_EXPORT( FT_Error )
|
|
|
|
FT_New_Face_From_FSSpec( FT_Library library,
|
|
|
|
const FSSpec *spec,
|
|
|
|
FT_Long face_index,
|
2007-02-05 04:07:46 +00:00
|
|
|
FT_Face *aface )
|
|
|
|
FT_DEPRECATED_ATTRIBUTE;
|
2001-12-07 21:56:32 +00:00
|
|
|
|
2006-01-12 03:33:16 +00:00
|
|
|
|
|
|
|
/*************************************************************************/
|
|
|
|
/* */
|
|
|
|
/* <Function> */
|
|
|
|
/* FT_New_Face_From_FSRef */
|
|
|
|
/* */
|
|
|
|
/* <Description> */
|
2006-01-12 08:49:24 +00:00
|
|
|
/* Create a new face object from a given resource and typeface index */
|
2006-01-12 03:33:16 +00:00
|
|
|
/* using an FSRef to the font file. */
|
|
|
|
/* */
|
|
|
|
/* <InOut> */
|
|
|
|
/* library :: A handle to the library resource. */
|
|
|
|
/* */
|
|
|
|
/* <Input> */
|
|
|
|
/* spec :: FSRef to the font file. */
|
|
|
|
/* */
|
|
|
|
/* face_index :: The index of the face within the resource. The */
|
2008-06-26 19:56:51 +00:00
|
|
|
/* first face has index~0. */
|
2006-01-12 03:33:16 +00:00
|
|
|
/* <Output> */
|
|
|
|
/* aface :: A handle to a new face object. */
|
|
|
|
/* */
|
|
|
|
/* <Return> */
|
2008-06-26 19:56:51 +00:00
|
|
|
/* FreeType error code. 0~means success. */
|
2006-01-12 03:33:16 +00:00
|
|
|
/* */
|
|
|
|
/* <Note> */
|
|
|
|
/* @FT_New_Face_From_FSRef is identical to @FT_New_Face except */
|
|
|
|
/* it accepts an FSRef instead of a path. */
|
|
|
|
/* */
|
|
|
|
FT_EXPORT( FT_Error )
|
2006-01-12 08:49:24 +00:00
|
|
|
FT_New_Face_From_FSRef( FT_Library library,
|
|
|
|
const FSRef *ref,
|
|
|
|
FT_Long face_index,
|
2007-02-05 04:07:46 +00:00
|
|
|
FT_Face *aface )
|
|
|
|
FT_DEPRECATED_ATTRIBUTE;
|
2006-01-12 03:33:16 +00:00
|
|
|
|
2001-01-10 11:15:48 +00:00
|
|
|
/* */
|
2000-07-28 01:08:32 +00:00
|
|
|
|
2001-01-11 09:27:49 +00:00
|
|
|
|
2000-12-09 00:45:38 +00:00
|
|
|
FT_END_HEADER
|
2000-08-01 13:17:04 +00:00
|
|
|
|
|
|
|
|
2001-12-07 21:56:32 +00:00
|
|
|
#endif /* __FTMAC_H__ */
|
2000-11-06 04:33:56 +00:00
|
|
|
|
|
|
|
|
|
|
|
/* END */
|