ftmac.h 7.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128
  1. /***************************************************************************/
  2. /* */
  3. /* ftmac.h */
  4. /* */
  5. /* Additional Mac-specific API. */
  6. /* */
  7. /* Copyright 1996-2001 by */
  8. /* Just van Rossum, David Turner, Robert Wilhelm, and Werner Lemberg. */
  9. /* */
  10. /* This file is part of the FreeType project, and may only be used, */
  11. /* modified, and distributed under the terms of the FreeType project */
  12. /* license, LICENSE.TXT. By continuing to use, modify, or distribute */
  13. /* this file you indicate that you have read the license and */
  14. /* understand and accept it fully. */
  15. /* */
  16. /***************************************************************************/
  17. /***************************************************************************/
  18. /* */
  19. /* NOTE: Include this file after <freetype/freetype.h> and after the */
  20. /* Mac-specific <Types.h> header (or any other Mac header that */
  21. /* includes <Types.h>); we use Handle type. */
  22. /* */
  23. /***************************************************************************/
  24. #ifndef __FTMAC_H__
  25. #define __FTMAC_H__
  26. #include <ft2build.h>
  27. FT_BEGIN_HEADER
  28. /*************************************************************************/
  29. /* */
  30. /* <Section> */
  31. /* mac_specific */
  32. /* */
  33. /* <Title> */
  34. /* Mac-Specific Interface */
  35. /* */
  36. /* <Abstract> */
  37. /* Only available on the Macintosh. */
  38. /* */
  39. /* <Description> */
  40. /* The following definitions are only available if FreeType is */
  41. /* compiled on a Macintosh. */
  42. /* */
  43. /*************************************************************************/
  44. /*************************************************************************/
  45. /* */
  46. /* <Function> */
  47. /* FT_New_Face_From_FOND */
  48. /* */
  49. /* <Description> */
  50. /* Creates a new face object from an FOND resource. */
  51. /* */
  52. /* <InOut> */
  53. /* library :: A handle to the library resource. */
  54. /* */
  55. /* <Input> */
  56. /* fond :: An FOND resource. */
  57. /* */
  58. /* face_index :: Only supported for the -1 `sanity check' special */
  59. /* case. */
  60. /* */
  61. /* <Output> */
  62. /* aface :: A handle to a new face object. */
  63. /* */
  64. /* <Return> */
  65. /* FreeType error code. 0 means success. */
  66. /* */
  67. /* <Notes> */
  68. /* This function can be used to create FT_Face abjects from fonts */
  69. /* that are installed in the system like so: */
  70. /* */
  71. /* { */
  72. /* fond = GetResource( 'FOND', fontName ); */
  73. /* error = FT_New_Face_From_FOND( library, fond, 0, &face ); */
  74. /* } */
  75. /* */
  76. FT_EXPORT( FT_Error )
  77. FT_New_Face_From_FOND( FT_Library library,
  78. Handle fond,
  79. FT_Long face_index,
  80. FT_Face *aface );
  81. /*************************************************************************/
  82. /* */
  83. /* <Function> */
  84. /* FT_GetFile_From_Mac_Name */
  85. /* */
  86. /* <Description> */
  87. /* Returns an FSSpec for the disk file containing the named font. */
  88. /* */
  89. /* <Input> */
  90. /* fontName :: Mac OS name of the font (eg. Times New Roman Bold). */
  91. /* */
  92. /* <Output> */
  93. /* pathSpec :: FSSpec to the file. For passing to @FT_New_Face. */
  94. /* */
  95. /* face_index :: Index of the face. For passing to @FT_New_Face. */
  96. /* */
  97. /* <Return> */
  98. /* FreeType error code. 0 means success. */
  99. /* */
  100. FT_EXPORT_DEF( FT_Error )
  101. FT_GetFile_From_Mac_Name( char* fontName,
  102. FSSpec* pathSpec,
  103. FT_Long* face_index );
  104. /* */
  105. FT_END_HEADER
  106. #endif /* __FTMAC_H__ */
  107. /* END */