/src/freetype/src/cff/cffobjs.h

https://bitbucket.org/cabalistic/ogredeps/ · C++ Header · 181 lines · 70 code · 46 blank · 65 comment · 0 complexity · 6db5ee8d843e529859a15941925e69df MD5 · raw file

  1. /***************************************************************************/
  2. /* */
  3. /* cffobjs.h */
  4. /* */
  5. /* OpenType objects manager (specification). */
  6. /* */
  7. /* Copyright 1996-2001, 2002, 2003, 2004, 2006, 2007, 2008 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 "cfftypes.h"
  22. #include FT_INTERNAL_TRUETYPE_TYPES_H
  23. #include FT_SERVICE_POSTSCRIPT_CMAPS_H
  24. #include FT_INTERNAL_POSTSCRIPT_HINTS_H
  25. FT_BEGIN_HEADER
  26. /*************************************************************************/
  27. /* */
  28. /* <Type> */
  29. /* CFF_Driver */
  30. /* */
  31. /* <Description> */
  32. /* A handle to an OpenType driver object. */
  33. /* */
  34. typedef struct CFF_DriverRec_* CFF_Driver;
  35. typedef TT_Face CFF_Face;
  36. /*************************************************************************/
  37. /* */
  38. /* <Type> */
  39. /* CFF_Size */
  40. /* */
  41. /* <Description> */
  42. /* A handle to an OpenType size object. */
  43. /* */
  44. typedef struct CFF_SizeRec_
  45. {
  46. FT_SizeRec root;
  47. FT_ULong strike_index; /* 0xFFFFFFFF to indicate invalid */
  48. } CFF_SizeRec, *CFF_Size;
  49. /*************************************************************************/
  50. /* */
  51. /* <Type> */
  52. /* CFF_GlyphSlot */
  53. /* */
  54. /* <Description> */
  55. /* A handle to an OpenType glyph slot object. */
  56. /* */
  57. typedef struct CFF_GlyphSlotRec_
  58. {
  59. FT_GlyphSlotRec root;
  60. FT_Bool hint;
  61. FT_Bool scaled;
  62. FT_Fixed x_scale;
  63. FT_Fixed y_scale;
  64. } CFF_GlyphSlotRec, *CFF_GlyphSlot;
  65. /*************************************************************************/
  66. /* */
  67. /* <Type> */
  68. /* CFF_Internal */
  69. /* */
  70. /* <Description> */
  71. /* The interface to the `internal' field of `FT_Size'. */
  72. /* */
  73. typedef struct CFF_InternalRec_
  74. {
  75. PSH_Globals topfont;
  76. PSH_Globals subfonts[CFF_MAX_CID_FONTS];
  77. } CFF_InternalRec, *CFF_Internal;
  78. /*************************************************************************/
  79. /* */
  80. /* Subglyph transformation record. */
  81. /* */
  82. typedef struct CFF_Transform_
  83. {
  84. FT_Fixed xx, xy; /* transformation matrix coefficients */
  85. FT_Fixed yx, yy;
  86. FT_F26Dot6 ox, oy; /* offsets */
  87. } CFF_Transform;
  88. /***********************************************************************/
  89. /* */
  90. /* TrueType driver class. */
  91. /* */
  92. typedef struct CFF_DriverRec_
  93. {
  94. FT_DriverRec root;
  95. void* extension_component;
  96. } CFF_DriverRec;
  97. FT_LOCAL( FT_Error )
  98. cff_size_init( FT_Size size ); /* CFF_Size */
  99. FT_LOCAL( void )
  100. cff_size_done( FT_Size size ); /* CFF_Size */
  101. FT_LOCAL( FT_Error )
  102. cff_size_request( FT_Size size,
  103. FT_Size_Request req );
  104. #ifdef TT_CONFIG_OPTION_EMBEDDED_BITMAPS
  105. FT_LOCAL( FT_Error )
  106. cff_size_select( FT_Size size,
  107. FT_ULong strike_index );
  108. #endif
  109. FT_LOCAL( void )
  110. cff_slot_done( FT_GlyphSlot slot );
  111. FT_LOCAL( FT_Error )
  112. cff_slot_init( FT_GlyphSlot slot );
  113. /*************************************************************************/
  114. /* */
  115. /* Face functions */
  116. /* */
  117. FT_LOCAL( FT_Error )
  118. cff_face_init( FT_Stream stream,
  119. FT_Face face, /* CFF_Face */
  120. FT_Int face_index,
  121. FT_Int num_params,
  122. FT_Parameter* params );
  123. FT_LOCAL( void )
  124. cff_face_done( FT_Face face ); /* CFF_Face */
  125. /*************************************************************************/
  126. /* */
  127. /* Driver functions */
  128. /* */
  129. FT_LOCAL( FT_Error )
  130. cff_driver_init( FT_Module module );
  131. FT_LOCAL( void )
  132. cff_driver_done( FT_Module module );
  133. FT_END_HEADER
  134. #endif /* __CFFOBJS_H__ */
  135. /* END */