Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

90 lines
3.9 KiB

  1. /*
  2. * Adobe Universal Font Library
  3. *
  4. * Copyright (c) 1996 Adobe Systems Inc.
  5. * All Rights Reserved
  6. *
  7. * UFOttt1.h - TrueType downloaded as type 1 implementation.
  8. *
  9. *
  10. * $Header:
  11. */
  12. #ifndef _H_UFOTTT1
  13. #define _H_UFOTTT1
  14. /*===============================================================================*
  15. * Include files used by this interface *
  16. *===============================================================================*/
  17. #include "UFO.h"
  18. /*===============================================================================*
  19. * Theory of Operation *
  20. *===============================================================================*/
  21. /*
  22. TrueType downloaded as type 1 implementation (Unhinted outline font).
  23. */
  24. /*===============================================================================*
  25. * Constants *
  26. *===============================================================================*/
  27. /*===============================================================================*
  28. * Scalar Types *
  29. *===============================================================================*/
  30. /* CSBufStruct uses to buffer and encrypt CharString */
  31. typedef struct {
  32. char* pBuf;
  33. char* pPos; // points to current position within buffer.
  34. char* pEnd ;
  35. unsigned long ulSize;
  36. UFLMemObj* pMemObj; /* Memory object */
  37. } CSBufStruct;
  38. /* Public functions */
  39. /* These three functions should have "static" in front... --jfu */
  40. static CSBufStruct* CSBufInit( const UFLMemObj *pMem );
  41. static void CSBufCleanUp( CSBufStruct *h );
  42. static UFLErrCode CSBufAddNumber( CSBufStruct *h, long dw );
  43. #define CSBufBuffer( h ) (((CSBufStruct *)h)->pBuf)
  44. #define CSBufRewind( h ) (((CSBufStruct *)h)->pPos = ((CSBufStruct *)h)->pBuf)
  45. #define CSBufCurrentSize( h) (((CSBufStruct *)h)->pEnd - ((CSBufStruct *)h)->pBuf) /* Return the current availability size of the CharString Buffer */
  46. #define CSBufCurrentLen( h ) (((CSBufStruct *)h)->pPos - ((CSBufStruct *)h)->pBuf) /* Return the current usage of the CharString buffer */
  47. #define CSBufAddChar( h, c ) ( *(((CSBufStruct *)h)->pPos)++ = c )
  48. #define CSBufFreeLen( h ) (((CSBufStruct *)h)->pEnd - ((CSBufStruct *)h)->pPos) /* The left room usable in the CharString buffer */
  49. #ifdef DEBUG_ENGLISH
  50. void CSBufAddString( CSBufStruct *h, char* str );
  51. void CSBufAddFixed( CSBufStruct *h, UFLFixed f );
  52. #endif
  53. /*==================================================================================================*
  54. * UFOTTT1Font - type 1 *
  55. *==================================================================================================*/
  56. typedef struct {
  57. /* TT1 Data starts from here */
  58. CSBufStruct *pCSBuf; /* CharString buffer */
  59. UFLTTT1FontInfo info; /* True Type Font info. */
  60. unsigned short eexecKey;
  61. } TTT1FontStruct;
  62. UFOStruct *TTT1FontInit( const UFLMemObj *pMem, const UFLStruct *pUFL, const UFLRequest *pRequest );
  63. #endif