cffobjs.h 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160
  1. /***************************************************************************/
  2. /* */
  3. /* cffobjs.h */
  4. /* */
  5. /* OpenType objects manager (specification). */
  6. /* */
  7. /* Copyright 1996-2001, 2002 by */
  8. /* 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. #ifndef __CFFOBJS_H__
  18. #define __CFFOBJS_H__
  19. #include <ft2build.h>
  20. #include FT_INTERNAL_OBJECTS_H
  21. #include FT_INTERNAL_CFF_TYPES_H
  22. #include FT_INTERNAL_TRUETYPE_TYPES_H
  23. #include FT_INTERNAL_POSTSCRIPT_NAMES_H
  24. FT_BEGIN_HEADER
  25. /*************************************************************************/
  26. /* */
  27. /* <Type> */
  28. /* CFF_Driver */
  29. /* */
  30. /* <Description> */
  31. /* A handle to an OpenType driver object. */
  32. /* */
  33. typedef struct CFF_DriverRec_* CFF_Driver;
  34. typedef TT_Face CFF_Face;
  35. /*************************************************************************/
  36. /* */
  37. /* <Type> */
  38. /* CFF_Size */
  39. /* */
  40. /* <Description> */
  41. /* A handle to an OpenType size object. */
  42. /* */
  43. typedef FT_Size CFF_Size;
  44. /*************************************************************************/
  45. /* */
  46. /* <Type> */
  47. /* CFF_GlyphSlot */
  48. /* */
  49. /* <Description> */
  50. /* A handle to an OpenType glyph slot object. */
  51. /* */
  52. typedef struct CFF_GlyphSlotRec_
  53. {
  54. FT_GlyphSlotRec root;
  55. FT_Bool hint;
  56. FT_Bool scaled;
  57. FT_Fixed x_scale;
  58. FT_Fixed y_scale;
  59. } CFF_GlyphSlotRec, *CFF_GlyphSlot;
  60. /*************************************************************************/
  61. /* */
  62. /* Subglyph transformation record. */
  63. /* */
  64. typedef struct CFF_Transform_
  65. {
  66. FT_Fixed xx, xy; /* transformation matrix coefficients */
  67. FT_Fixed yx, yy;
  68. FT_F26Dot6 ox, oy; /* offsets */
  69. } CFF_Transform;
  70. /* this is only used in the case of a pure CFF font with no charmap */
  71. typedef struct CFF_CharMapRec_
  72. {
  73. TT_CharMapRec root;
  74. PS_Unicodes unicodes;
  75. } CFF_CharMapRec, *CFF_CharMap;
  76. /***********************************************************************/
  77. /* */
  78. /* TrueType driver class. */
  79. /* */
  80. typedef struct CFF_DriverRec_
  81. {
  82. FT_DriverRec root;
  83. void* extension_component;
  84. } CFF_DriverRec;
  85. FT_LOCAL( FT_Error )
  86. cff_size_init( CFF_Size size );
  87. FT_LOCAL( void )
  88. cff_size_done( CFF_Size size );
  89. FT_LOCAL( FT_Error )
  90. cff_size_reset( CFF_Size size );
  91. FT_LOCAL( void )
  92. cff_slot_done( CFF_GlyphSlot slot );
  93. FT_LOCAL( FT_Error )
  94. cff_slot_init( CFF_GlyphSlot slot );
  95. /*************************************************************************/
  96. /* */
  97. /* Face functions */
  98. /* */
  99. FT_LOCAL( FT_Error )
  100. cff_face_init( FT_Stream stream,
  101. CFF_Face face,
  102. FT_Int face_index,
  103. FT_Int num_params,
  104. FT_Parameter* params );
  105. FT_LOCAL( void )
  106. cff_face_done( CFF_Face face );
  107. /*************************************************************************/
  108. /* */
  109. /* Driver functions */
  110. /* */
  111. FT_LOCAL( FT_Error )
  112. cff_driver_init( CFF_Driver driver );
  113. FT_LOCAL( void )
  114. cff_driver_done( CFF_Driver driver );
  115. FT_END_HEADER
  116. #endif /* __CFFOBJS_H__ */
  117. /* END */