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.

154 lines
5.0 KiB

  1. //
  2. // Copyright (c) 1997-1999 Microsoft Corporation.
  3. //
  4. /*****
  5. * FITCONIC.C
  6. *****/
  7. int FitConic(int inLst,int outLst,int level,int ufp);
  8. /*****
  9. * BMPOPE.C
  10. *****/
  11. void BMPInit(void);
  12. int BMPDefine(unsigned char *buf,int xWid,int yWid);
  13. int BMPFreDef(int bmpno);
  14. int BMPMkCont(int BMPNo,int wkBMP,int refBMP,int lsthdl);
  15. int rdot(int BMP,int x,int y);
  16. void wdot(int BMP,int x,int y,int onoff);
  17. int ReverseRight(int BMPNo,int x,int y);
  18. int BMPReverse(int bmpNo);
  19. int BMPClear(int bmpNo);
  20. /*****
  21. * W31JEUDC.C
  22. *****/
  23. int OpenW31JEUDC(TCHAR *path);
  24. void CloseW31JEUDC(void);
  25. int GetW31JEUDCFont(unsigned short code, LPBYTE buf,int bufsiz,int *xsiz,int *ysiz, BOOL bUnicode);
  26. int PutW31JEUDCFont(unsigned short code, LPBYTE buf,int xsiz,int ysiz, BOOL bUniocde);
  27. int IsWin95EUDCBmp(LPTSTR szBmpPath);
  28. BOOL GetGlyph(TCHAR *path, BYTE* pGlyph);
  29. /*****
  30. * SMOOTH.C
  31. *****/
  32. struct SMOOTHPRM {
  33. int SmoothLevel;
  34. int UseConic;
  35. };
  36. #define SMOOTHLEVELMAX 8
  37. int SmoothVector(int lstHdl,int tmpLst,int xinMesh,int yinMesh, int outMesh,struct SMOOTHPRM *prm,int fp);
  38. int searchanchor(int sn,struct VDATA *sp,struct VDATA * *ep,int lim);
  39. int RemoveFp(int lstHdl,int outMesh,int uFp);
  40. int toTTFFrame(int lstH,struct BBX *bbx);
  41. int SmoothLight(int ioLst,int tmpLst,int width,int height, int oWidth,int ufpVal);
  42. int ConvMesh(int lstH,int inMesh,int outMesh);
  43. /*****
  44. * DATAIF.C
  45. *****/
  46. int OInit(void);
  47. int OTerm(void);
  48. #ifdef BUILD_ON_WINNT
  49. int OExistUserFont( TCHAR*path);
  50. #endif // BUILD_ON_WINNT
  51. int OExistTTF( TCHAR *path);
  52. int OCreateTTF( HDC hDC, TCHAR *path, int fontType);
  53. int OMakeOutline( UCHAR *buf,int siz,int level);
  54. int OOutTTF(HDC hDC, TCHAR *path,unsigned short code, BOOL bUnicode);
  55. /*****
  56. * TTFFILE.C
  57. *****/
  58. void smtoi(short *sval);
  59. void lmtoi(long *lval);
  60. void sitom(short *sval);
  61. void litom(long *lval);
  62. int TTFReadHdr(HANDLE fHdl,struct TTFHeader *hdr);
  63. int TTFWriteHdr(HANDLE fHdl,struct TTFHeader *hdr);
  64. int TTFReadDirEntry(HANDLE fHdl,struct TableEntry *entry,int eCnt);
  65. int TTFWriteDirEntry(HANDLE fHdl,struct TableEntry *entry,int eCnt);
  66. int TTFGetTableEntry(HANDLE fH,struct TableEntry *entry,char *tag);
  67. int TTFReadTable(HANDLE fH,struct TableEntry *entry,void *buf,int bufsiz);
  68. int TTFReadFixedTable(HANDLE fH,char *buf,int bufsiz,char *tag);
  69. int TTFReadVarTable(HANDLE fH,char * *buf,unsigned int *bufsiz,char *tag);
  70. int TTFWriteTable(HANDLE fH,struct TableEntry *entry,void *buf,int bufsiz);
  71. int TTFAppendTable(HANDLE fH,struct TableEntry *entry,void *buf,int siz);
  72. int TTFReadOrgFixedTable(HDC hDC,char *buf,int bufsiz,char *tag);
  73. int TTFReadOrgVarTable(HDC hDC,char * *buf,unsigned int *bufsiz,char *tag);
  74. int TTFCreate(HDC hDC,TCHAR *newf,struct BBX *bbx,int lstHdl,int fontType);
  75. int TTFGetBBX(HDC hDC,struct BBX *bbx,short *uPEm);
  76. int TTFTmpPath(TCHAR *path,TCHAR *tmpPath);
  77. int TTFAddEUDCChar(TCHAR *path,unsigned short code,struct BBX *bbx,int lstH);
  78. int TTFOpen(TCHAR *path);
  79. int TTFClose(void);
  80. int TTFGetEUDCBBX(TCHAR *path,struct BBX *bbx,short *upem);
  81. int TTFAppend(unsigned short code,struct BBX *bbx,int lsthdl);
  82. int TTFImpCopy(TCHAR *sPath,TCHAR *dPath);
  83. int TTFImpGlyphCopy(HANDLE sFh,int glyphID);
  84. int TTFImpGlyphWrite(int glyphID, char *buf, int siz);
  85. int TTFImpTerm( HANDLE orgFh, int glyphID);
  86. int TTFLastError( void);
  87. /*
  88. * Create.c
  89. */
  90. int creatW31JEUDC( TCHAR *path);
  91. /*
  92. * makepoly.c
  93. */
  94. int MkPoly( int inlst, int outLst);
  95. /*
  96. * W31JBMP.C
  97. */
  98. int isW31JEUDCBMP( TCHAR *path);
  99. int OpenW31JBMP(TCHAR *path,int omd);
  100. int CloseW31JBMP(void);
  101. int GetW31JBMPnRecs( int *nRec, int *nGlyph, int *xsiz, int *ysiz);
  102. int GetW31JBMP(unsigned short code,char *buf,int bufsiz,int *xsiz,int *ysiz);
  103. int GetW31JBMPRec(int rec,LPBYTE buf,int bufsiz,int *xsiz,int *ysiz,unsigned short *code);
  104. int PutW31JBMPRec(int rec,LPBYTE buf,int xsiz,int ysiz);
  105. int W31JrecTbl(int * *recTbl, BOOL bIsWin95EUDC);
  106. int GetW31JBMPMeshSize( int *xsiz, int *ysiz);
  107. /*
  108. * code.c
  109. */
  110. void makeUniCodeTbl(void);
  111. unsigned short sjisToUniEUDC(unsigned short code);
  112. unsigned short getMaxUniCode(void);
  113. /*
  114. * IMPORT.C
  115. */
  116. int Import(TCHAR *eudcPath,TCHAR *bmpPath,TCHAR *ttfPath,int oWidth,int oHeight, int level, BOOL bIsWin95EUDC);
  117. /*
  118. * eten.c
  119. */
  120. int openETENBMP(TCHAR *path,int md);
  121. int closeETENBMP(void);
  122. int createETENBMP(TCHAR *path,int wid,int hei);
  123. int getETENBMPInf(int *nRec, int *nGlyph,int *wid,int *hei, char *sign,
  124. WORD *bID);
  125. int readETENBMPRec(int rec, LPBYTE buf,int bufsiz,unsigned short *code);
  126. int appendETENBMP(LPBYTE buf,unsigned short code);
  127. int isETENBMP(TCHAR *path);
  128. int ETENrecTbl(int * *recTbl);
  129. #ifdef BUILD_ON_WINNT
  130. /*
  131. * EUDCRANG.CPP
  132. */
  133. void CorrectTrailByteRange(int nIndex);
  134. void SetTrailByteRange(UINT LocalCP);
  135. #endif // BUILD_ON_WINNT