/src/compiler/android-ndk/jni/freetype/include/freetype/internal/services/svsfnt.h

http://ftk.googlecode.com/ · C++ Header · 102 lines · 45 code · 27 blank · 30 comment · 0 complexity · 492107f7ef92cfafbf36bcf9b5c34946 MD5 · raw file

  1. /***************************************************************************/
  2. /* */
  3. /* svsfnt.h */
  4. /* */
  5. /* The FreeType SFNT table loading service (specification). */
  6. /* */
  7. /* Copyright 2003, 2004 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 __SVSFNT_H__
  18. #define __SVSFNT_H__
  19. #include FT_INTERNAL_SERVICE_H
  20. #include FT_TRUETYPE_TABLES_H
  21. FT_BEGIN_HEADER
  22. /*
  23. * SFNT table loading service.
  24. */
  25. #define FT_SERVICE_ID_SFNT_TABLE "sfnt-table"
  26. /*
  27. * Used to implement FT_Load_Sfnt_Table().
  28. */
  29. typedef FT_Error
  30. (*FT_SFNT_TableLoadFunc)( FT_Face face,
  31. FT_ULong tag,
  32. FT_Long offset,
  33. FT_Byte* buffer,
  34. FT_ULong* length );
  35. /*
  36. * Used to implement FT_Get_Sfnt_Table().
  37. */
  38. typedef void*
  39. (*FT_SFNT_TableGetFunc)( FT_Face face,
  40. FT_Sfnt_Tag tag );
  41. /*
  42. * Used to implement FT_Sfnt_Table_Info().
  43. */
  44. typedef FT_Error
  45. (*FT_SFNT_TableInfoFunc)( FT_Face face,
  46. FT_UInt idx,
  47. FT_ULong *tag,
  48. FT_ULong *offset,
  49. FT_ULong *length );
  50. FT_DEFINE_SERVICE( SFNT_Table )
  51. {
  52. FT_SFNT_TableLoadFunc load_table;
  53. FT_SFNT_TableGetFunc get_table;
  54. FT_SFNT_TableInfoFunc table_info;
  55. };
  56. #ifndef FT_CONFIG_OPTION_PIC
  57. #define FT_DEFINE_SERVICE_SFNT_TABLEREC(class_, load_, get_, info_) \
  58. static const FT_Service_SFNT_TableRec class_ = \
  59. { \
  60. load_, get_, info_ \
  61. };
  62. #else /* FT_CONFIG_OPTION_PIC */
  63. #define FT_DEFINE_SERVICE_SFNT_TABLEREC(class_, load_, get_, info_) \
  64. void \
  65. FT_Init_Class_##class_( FT_Service_SFNT_TableRec* clazz ) \
  66. { \
  67. clazz->load_table = load_; \
  68. clazz->get_table = get_; \
  69. clazz->table_info = info_; \
  70. }
  71. #endif /* FT_CONFIG_OPTION_PIC */
  72. /* */
  73. FT_END_HEADER
  74. #endif /* __SVSFNT_H__ */
  75. /* END */