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

http://ftk.googlecode.com/ · C++ Header · 79 lines · 29 code · 23 blank · 27 comment · 0 complexity · 06a64c24933cda71a4e9fe5ba22ea038 MD5 · raw file

  1. /***************************************************************************/
  2. /* */
  3. /* svpostnm.h */
  4. /* */
  5. /* The FreeType PostScript name services (specification). */
  6. /* */
  7. /* Copyright 2003, 2007 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 __SVPOSTNM_H__
  18. #define __SVPOSTNM_H__
  19. #include FT_INTERNAL_SERVICE_H
  20. FT_BEGIN_HEADER
  21. /*
  22. * A trivial service used to retrieve the PostScript name of a given
  23. * font when available. The `get_name' field should never be NULL.
  24. *
  25. * The corresponding function can return NULL to indicate that the
  26. * PostScript name is not available.
  27. *
  28. * The name is owned by the face and will be destroyed with it.
  29. */
  30. #define FT_SERVICE_ID_POSTSCRIPT_FONT_NAME "postscript-font-name"
  31. typedef const char*
  32. (*FT_PsName_GetFunc)( FT_Face face );
  33. FT_DEFINE_SERVICE( PsFontName )
  34. {
  35. FT_PsName_GetFunc get_ps_font_name;
  36. };
  37. #ifndef FT_CONFIG_OPTION_PIC
  38. #define FT_DEFINE_SERVICE_PSFONTNAMEREC(class_, get_ps_font_name_) \
  39. static const FT_Service_PsFontNameRec class_ = \
  40. { \
  41. get_ps_font_name_ \
  42. };
  43. #else /* FT_CONFIG_OPTION_PIC */
  44. #define FT_DEFINE_SERVICE_PSFONTNAMEREC(class_, get_ps_font_name_) \
  45. void \
  46. FT_Init_Class_##class_( FT_Library library, \
  47. FT_Service_PsFontNameRec* clazz) \
  48. { \
  49. FT_UNUSED(library); \
  50. clazz->get_ps_font_name = get_ps_font_name_; \
  51. }
  52. #endif /* FT_CONFIG_OPTION_PIC */
  53. /* */
  54. FT_END_HEADER
  55. #endif /* __SVPOSTNM_H__ */
  56. /* END */