ftapi.c 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121
  1. /***************************************************************************/
  2. /* */
  3. /* ftapi.c */
  4. /* */
  5. /* The FreeType compatibility functions (body). */
  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. #include <ft2build.h>
  18. #include FT_LIST_H
  19. #include FT_OUTLINE_H
  20. #include FT_INTERNAL_OBJECTS_H
  21. #include FT_INTERNAL_DEBUG_H
  22. #include FT_INTERNAL_STREAM_H
  23. #include FT_TRUETYPE_TABLES_H
  24. #include FT_OUTLINE_H
  25. /*************************************************************************/
  26. /*************************************************************************/
  27. /*************************************************************************/
  28. /**** ****/
  29. /**** ****/
  30. /**** C O M P A T I B I L I T Y ****/
  31. /**** ****/
  32. /**** ****/
  33. /*************************************************************************/
  34. /*************************************************************************/
  35. /*************************************************************************/
  36. /* backwards compatibility API */
  37. FT_BASE_DEF( void )
  38. FT_New_Memory_Stream( FT_Library library,
  39. FT_Byte* base,
  40. FT_ULong size,
  41. FT_Stream stream )
  42. {
  43. FT_UNUSED( library );
  44. FT_Stream_OpenMemory( stream, base, size );
  45. }
  46. FT_BASE_DEF( FT_Error )
  47. FT_Seek_Stream( FT_Stream stream,
  48. FT_ULong pos )
  49. {
  50. return FT_Stream_Seek( stream, pos );
  51. }
  52. FT_BASE_DEF( FT_Error )
  53. FT_Skip_Stream( FT_Stream stream,
  54. FT_Long distance )
  55. {
  56. return FT_Stream_Skip( stream, distance );
  57. }
  58. FT_BASE_DEF( FT_Error )
  59. FT_Read_Stream( FT_Stream stream,
  60. FT_Byte* buffer,
  61. FT_ULong count )
  62. {
  63. return FT_Stream_Read( stream, buffer, count );
  64. }
  65. FT_BASE_DEF( FT_Error )
  66. FT_Read_Stream_At( FT_Stream stream,
  67. FT_ULong pos,
  68. FT_Byte* buffer,
  69. FT_ULong count )
  70. {
  71. return FT_Stream_ReadAt( stream, pos, buffer, count );
  72. }
  73. FT_BASE_DEF( FT_Error )
  74. FT_Extract_Frame( FT_Stream stream,
  75. FT_ULong count,
  76. FT_Byte** pbytes )
  77. {
  78. return FT_Stream_ExtractFrame( stream, count, pbytes );
  79. }
  80. FT_BASE_DEF( void )
  81. FT_Release_Frame( FT_Stream stream,
  82. FT_Byte** pbytes )
  83. {
  84. FT_Stream_ReleaseFrame( stream, pbytes );
  85. }
  86. FT_BASE_DEF( FT_Error )
  87. FT_Access_Frame( FT_Stream stream,
  88. FT_ULong count )
  89. {
  90. return FT_Stream_EnterFrame( stream, count );
  91. }
  92. FT_BASE_DEF( void )
  93. FT_Forget_Frame( FT_Stream stream )
  94. {
  95. FT_Stream_ExitFrame( stream );
  96. }
  97. /* END */