ttcmap0.h 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. /***************************************************************************/
  2. /* */
  3. /* ttcmap0.h */
  4. /* */
  5. /* TrueType new character mapping table (cmap) support (specification). */
  6. /* */
  7. /* Copyright 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 __TTCMAP0_H__
  18. #define __TTCMAP0_H__
  19. #include <ft2build.h>
  20. #include FT_INTERNAL_TRUETYPE_TYPES_H
  21. #include FT_INTERNAL_OBJECTS_H
  22. FT_BEGIN_HEADER
  23. typedef struct TT_CMapRec_
  24. {
  25. FT_CMapRec cmap;
  26. FT_Byte* data; /* pointer to in-memory cmap table */
  27. } TT_CMapRec, *TT_CMap;
  28. typedef const struct TT_CMap_ClassRec_* TT_CMap_Class;
  29. typedef FT_Error
  30. (*TT_CMap_ValidateFunc)( FT_Byte* data,
  31. FT_Validator valid );
  32. typedef struct TT_CMap_ClassRec_
  33. {
  34. FT_CMap_ClassRec clazz;
  35. FT_UInt format;
  36. TT_CMap_ValidateFunc validate;
  37. } TT_CMap_ClassRec;
  38. typedef struct TT_ValidatorRec_
  39. {
  40. FT_ValidatorRec validator;
  41. FT_UInt num_glyphs;
  42. } TT_ValidatorRec, *TT_Validator;
  43. #define TT_VALIDATOR( x ) ((TT_Validator)( x ))
  44. #define TT_VALID_GLYPH_COUNT( x ) TT_VALIDATOR( x )->num_glyphs
  45. FT_LOCAL( FT_Error )
  46. tt_face_build_cmaps( TT_Face face );
  47. FT_END_HEADER
  48. #endif /* __TTCMAP0_H__ */
  49. /* END */