2000-07-28 03:08:32 +02:00
|
|
|
/***************************************************************************/
|
|
|
|
/* */
|
|
|
|
/* ftmac.h */
|
|
|
|
/* */
|
|
|
|
/* Additional Mac-specific API. */
|
|
|
|
/* */
|
2004-02-17 14:46:17 +01:00
|
|
|
/* Copyright 1996-2001, 2004 by */
|
2000-07-28 03:08:32 +02: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 09:33:38 +01:00
|
|
|
/***************************************************************************/
|
|
|
|
/* */
|
|
|
|
/* NOTE: Include this file after <freetype/freetype.h> and after the */
|
|
|
|
/* Mac-specific <Types.h> header (or any other Mac header that */
|
|
|
|
/* includes <Types.h>); we use Handle type. */
|
|
|
|
/* */
|
|
|
|
/***************************************************************************/
|
2000-07-28 03:08:32 +02:00
|
|
|
|
|
|
|
|
2001-12-07 22:56:32 +01:00
|
|
|
#ifndef __FTMAC_H__
|
|
|
|
#define __FTMAC_H__
|
2000-07-28 03:08:32 +02:00
|
|
|
|
|
|
|
|
2000-12-09 01:45:38 +01:00
|
|
|
#include <ft2build.h>
|
|
|
|
|
|
|
|
|
|
|
|
FT_BEGIN_HEADER
|
2000-08-01 15:17:04 +02:00
|
|
|
|
2001-01-11 10:27:49 +01:00
|
|
|
|
|
|
|
/*************************************************************************/
|
|
|
|
/* */
|
|
|
|
/* <Section> */
|
2001-02-13 18:42:49 +01:00
|
|
|
/* mac_specific */
|
2001-01-11 10:27:49 +01: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 16:39:00 +02:00
|
|
|
/* Mac Specific Interface */
|
2001-01-11 10:27:49 +01:00
|
|
|
/* */
|
|
|
|
/* <Abstract> */
|
|
|
|
/* Only available on the Macintosh. */
|
|
|
|
/* */
|
|
|
|
/* <Description> */
|
|
|
|
/* The following definitions are only available if FreeType is */
|
|
|
|
/* compiled on a Macintosh. */
|
|
|
|
/* */
|
|
|
|
/*************************************************************************/
|
|
|
|
|
2000-08-01 15:17:04 +02:00
|
|
|
|
2000-07-28 03:08:32 +02:00
|
|
|
/*************************************************************************/
|
|
|
|
/* */
|
|
|
|
/* <Function> */
|
|
|
|
/* FT_New_Face_From_FOND */
|
|
|
|
/* */
|
|
|
|
/* <Description> */
|
|
|
|
/* Creates a new face object from an FOND resource. */
|
|
|
|
/* */
|
|
|
|
/* <InOut> */
|
|
|
|
/* library :: A handle to the library resource. */
|
|
|
|
/* */
|
|
|
|
/* <Input> */
|
|
|
|
/* fond :: An FOND resource. */
|
|
|
|
/* */
|
2000-11-07 18:21:11 +01:00
|
|
|
/* face_index :: Only supported for the -1 `sanity check' special */
|
|
|
|
/* case. */
|
2000-07-28 03:08:32 +02:00
|
|
|
/* */
|
|
|
|
/* <Output> */
|
|
|
|
/* aface :: A handle to a new face object. */
|
|
|
|
/* */
|
|
|
|
/* <Return> */
|
|
|
|
/* FreeType error code. 0 means success. */
|
|
|
|
/* */
|
|
|
|
/* <Notes> */
|
|
|
|
/* This function can be used to create FT_Face abjects from fonts */
|
|
|
|
/* that are installed in the system like so: */
|
2000-11-07 18:21:11 +01:00
|
|
|
/* */
|
2001-01-10 12:15:48 +01:00
|
|
|
/* { */
|
2000-07-28 03:08:32 +02:00
|
|
|
/* fond = GetResource( 'FOND', fontName ); */
|
|
|
|
/* error = FT_New_Face_From_FOND( library, fond, 0, &face ); */
|
2001-01-10 12:15:48 +01:00
|
|
|
/* } */
|
|
|
|
/* */
|
2001-06-28 09:17:51 +02:00
|
|
|
FT_EXPORT( FT_Error )
|
|
|
|
FT_New_Face_From_FOND( FT_Library library,
|
|
|
|
Handle fond,
|
|
|
|
FT_Long face_index,
|
|
|
|
FT_Face *aface );
|
2000-07-28 03:08:32 +02:00
|
|
|
|
2001-01-11 10:27:49 +01:00
|
|
|
|
2001-12-06 18:52:40 +01:00
|
|
|
/*************************************************************************/
|
|
|
|
/* */
|
|
|
|
/* <Function> */
|
2001-12-07 22:56:32 +01:00
|
|
|
/* FT_GetFile_From_Mac_Name */
|
2001-12-06 18:52:40 +01:00
|
|
|
/* */
|
|
|
|
/* <Description> */
|
|
|
|
/* Returns an FSSpec for the disk file containing the named font. */
|
|
|
|
/* */
|
|
|
|
/* <Input> */
|
2001-12-07 22:56:32 +01:00
|
|
|
/* fontName :: Mac OS name of the font (eg. Times New Roman Bold). */
|
2001-12-06 18:52:40 +01:00
|
|
|
/* */
|
|
|
|
/* <Output> */
|
2001-12-07 22:56:32 +01:00
|
|
|
/* pathSpec :: FSSpec to the file. For passing to @FT_New_Face. */
|
2001-12-06 18:52:40 +01:00
|
|
|
/* */
|
2001-12-07 22:56:32 +01:00
|
|
|
/* face_index :: Index of the face. For passing to @FT_New_Face. */
|
2001-12-06 18:52:40 +01:00
|
|
|
/* */
|
|
|
|
/* <Return> */
|
|
|
|
/* FreeType error code. 0 means success. */
|
|
|
|
/* */
|
2004-02-17 14:46:17 +01:00
|
|
|
FT_EXPORT( FT_Error )
|
2004-02-26 22:56:27 +01:00
|
|
|
FT_GetFile_From_Mac_Name( const char* fontName,
|
|
|
|
FSSpec* pathSpec,
|
|
|
|
FT_Long* face_index );
|
|
|
|
|
|
|
|
|
|
|
|
/*************************************************************************/
|
|
|
|
/* */
|
|
|
|
/* <Function> */
|
|
|
|
/* FT_New_Face_From_FSSpec */
|
|
|
|
/* */
|
|
|
|
/* <Description> */
|
|
|
|
/* Creates a new face object from a given resource and typeface index */
|
|
|
|
/* 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 */
|
|
|
|
/* first face has index 0. */
|
|
|
|
/* <Output> */
|
|
|
|
/* aface :: A handle to a new face object. */
|
|
|
|
/* */
|
|
|
|
/* <Return> */
|
|
|
|
/* FreeType error code. 0 means success. */
|
|
|
|
/* */
|
|
|
|
/* <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,
|
|
|
|
FT_Face *aface );
|
2001-12-07 22:56:32 +01:00
|
|
|
|
2001-01-10 12:15:48 +01:00
|
|
|
/* */
|
2000-07-28 03:08:32 +02:00
|
|
|
|
2001-01-11 10:27:49 +01:00
|
|
|
|
2000-12-09 01:45:38 +01:00
|
|
|
FT_END_HEADER
|
2000-08-01 15:17:04 +02:00
|
|
|
|
|
|
|
|
2001-12-07 22:56:32 +01:00
|
|
|
#endif /* __FTMAC_H__ */
|
2000-11-06 05:33:56 +01:00
|
|
|
|
|
|
|
|
|
|
|
/* END */
|