home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / ddkx86v1.zip / DDKX86 / IBMH / PMFONT.H < prev    next >
Text File  |  1995-04-14  |  8KB  |  238 lines

  1. /*DDK*************************************************************************/
  2. /*                                                                           */
  3. /* COPYRIGHT    Copyright (C) 1995 IBM Corporation                           */
  4. /*                                                                           */
  5. /*    The following IBM OS/2 WARP source code is provided to you solely for  */
  6. /*    the purpose of assisting you in your development of OS/2 WARP device   */
  7. /*    drivers. You may use this code in accordance with the IBM License      */
  8. /*    Agreement provided in the IBM Device Driver Source Kit for OS/2. This  */
  9. /*    Copyright statement may not be removed.                                */
  10. /*                                                                           */
  11. /*****************************************************************************/
  12. /****************************** Module Header ******************************\
  13. *
  14. * Module Name: PMFONT.H
  15. *
  16. * OS/2 Presentation Manager type declarations for Fonts.
  17. *
  18. *
  19. * ===========================================================================
  20. *
  21. * Comments at the end of each typedef line give the name tags used in
  22. * the assembler include version of this file.
  23. *
  24. *
  25. \***************************************************************************/
  26.  
  27. /* XLATOFF */
  28. #ifdef __IBMC__
  29.    #pragma checkout( suspend )
  30.    #ifndef __CHKHDR__
  31.       #pragma checkout( suspend )
  32.    #endif
  33.    #pragma checkout( resume )
  34. #endif
  35. /* XLATON */
  36.  
  37. /* XLATOFF */
  38. #ifndef PMFONT_INCLUDED
  39.    /* XLATON */
  40.    #define PMFONT_INCLUDED
  41.    
  42.    typedef struct _FOCAMETRICS    /* foca */
  43.    {
  44.       ULONG   ulIdentity;
  45.       ULONG   ulSize;
  46.       CHAR    szFamilyname[32];
  47.       CHAR    szFacename[32];
  48.       SHORT   usRegistryId;
  49.       SHORT   usCodePage;
  50.       SHORT   yEmHeight;
  51.       SHORT   yXHeight;
  52.       SHORT   yMaxAscender;
  53.       SHORT   yMaxDescender;
  54.       SHORT   yLowerCaseAscent;
  55.       SHORT   yLowerCaseDescent;
  56.       SHORT   yInternalLeading;
  57.       SHORT   yExternalLeading;
  58.       SHORT   xAveCharWidth;
  59.       SHORT   xMaxCharInc;
  60.       SHORT   xEmInc;
  61.       SHORT   yMaxBaselineExt;
  62.       SHORT   sCharSlope;
  63.       SHORT   sInlineDir;
  64.       SHORT   sCharRot;
  65.       USHORT  usWeightClass;
  66.       USHORT  usWidthClass;
  67.       SHORT   xDeviceRes;
  68.       SHORT   yDeviceRes;
  69.       SHORT   usFirstChar;
  70.       SHORT   usLastChar;
  71.       SHORT   usDefaultChar;
  72.       SHORT   usBreakChar;
  73.       SHORT   usNominalPointSize;
  74.       SHORT   usMinimumPointSize;
  75.       SHORT   usMaximumPointSize;
  76.       SHORT   fsTypeFlags;
  77.       SHORT   fsDefn;
  78.       SHORT   fsSelectionFlags;
  79.       SHORT   fsCapabilities;
  80.       SHORT   ySubscriptXSize;
  81.       SHORT   ySubscriptYSize;
  82.       SHORT   ySubscriptXOffset;
  83.       SHORT   ySubscriptYOffset;
  84.       SHORT   ySuperscriptXSize;
  85.       SHORT   ySuperscriptYSize;
  86.       SHORT   ySuperscriptXOffset;
  87.       SHORT   ySuperscriptYOffset;
  88.       SHORT   yUnderscoreSize;
  89.       SHORT   yUnderscorePosition;
  90.       SHORT   yStrikeoutSize;
  91.       SHORT   yStrikeoutPosition;
  92.       SHORT   usKerningPairs;
  93.       SHORT   sFamilyClass;
  94.       PSZ      pszDeviceNameOffset;
  95.    } FOCAMETRICS;
  96.    typedef FOCAMETRICS *PFOCAMETRICS;
  97.    
  98.    typedef struct _FONTFILEMETRICS    /* ffm */
  99.    {
  100.       ULONG   ulIdentity;
  101.       ULONG   ulSize;
  102.       CHAR    szFamilyname[32];
  103.       CHAR    szFacename[32];
  104.       SHORT   usRegistryId;
  105.       SHORT   usCodePage;
  106.       SHORT   yEmHeight;
  107.       SHORT   yXHeight;
  108.       SHORT   yMaxAscender;
  109.       SHORT   yMaxDescender;
  110.       SHORT   yLowerCaseAscent;
  111.       SHORT   yLowerCaseDescent;
  112.       SHORT   yInternalLeading;
  113.       SHORT   yExternalLeading;
  114.       SHORT   xAveCharWidth;
  115.       SHORT   xMaxCharInc;
  116.       SHORT   xEmInc;
  117.       SHORT   yMaxBaselineExt;
  118.       SHORT   sCharSlope;
  119.       SHORT   sInlineDir;
  120.       SHORT   sCharRot;
  121.       USHORT  usWeightClass;
  122.       USHORT  usWidthClass;
  123.       SHORT   xDeviceRes;
  124.       SHORT   yDeviceRes;
  125.       SHORT   usFirstChar;
  126.       SHORT   usLastChar;
  127.       SHORT   usDefaultChar;
  128.       SHORT   usBreakChar;
  129.       SHORT   usNominalPointSize;
  130.       SHORT   usMinimumPointSize;
  131.       SHORT   usMaximumPointSize;
  132.       SHORT   fsTypeFlags;
  133.       SHORT   fsDefn;
  134.       SHORT   fsSelectionFlags;
  135.       SHORT   fsCapabilities;
  136.       SHORT   ySubscriptXSize;
  137.       SHORT   ySubscriptYSize;
  138.       SHORT   ySubscriptXOffset;
  139.       SHORT   ySubscriptYOffset;
  140.       SHORT   ySuperscriptXSize;
  141.       SHORT   ySuperscriptYSize;
  142.       SHORT   ySuperscriptXOffset;
  143.       SHORT   ySuperscriptYOffset;
  144.       SHORT   yUnderscoreSize;
  145.       SHORT   yUnderscorePosition;
  146.       SHORT   yStrikeoutSize;
  147.       SHORT   yStrikeoutPosition;
  148.       SHORT   usKerningPairs;
  149.       SHORT   sFamilyClass;
  150.       ULONG   ulReserved;
  151.       PANOSE  panose;
  152.    } FONTFILEMETRICS;
  153.    typedef FONTFILEMETRICS *PFONTFILEMETRICS;
  154.    
  155.    typedef struct _FONTDEFINITIONHEADER    /* fdh */
  156.    {
  157.       ULONG   ulIdentity;
  158.       ULONG   ulSize;
  159.       SHORT   fsFontdef;
  160.       SHORT   fsChardef;
  161.       SHORT   usCellSize;
  162.       SHORT   xCellWidth;
  163.       SHORT   yCellHeight;
  164.       SHORT   xCellIncrement;
  165.       SHORT   xCellA;
  166.       SHORT   xCellB;
  167.       SHORT   xCellC;
  168.       SHORT   pCellBaseOffset;
  169.    } FONTDEFINITIONHEADER;
  170.    typedef FONTDEFINITIONHEADER *PFONTDEFINITIONHEADER;
  171.    
  172.    #define FONTDEFFONT1     0x0047  /* set width, height, inc. & base offset */
  173.    #define FONTDEFFONT2     0x0042  /* set height & base offset            */
  174.    #define FONTDEFFONT3     0x0042  /* set height & base offset            */
  175.    #define FONTDEFCHAR1     0x0081  /* set char offset and width           */
  176.    #define FONTDEFCHAR2     0x0081  /* set char offset and width           */
  177.    #define FONTDEFCHAR3     0x00b8  /* set char offset, A, B, and C space  */
  178.    #define SPACE_UNDEF      0x8000  /* space undefined = take default      */
  179.    
  180.    typedef struct _FONTSIGNATURE    /* fs */
  181.    {
  182.       ULONG   ulIdentity;
  183.       ULONG   ulSize;
  184.       CHAR    achSignature[12];
  185.    } FONTSIGNATURE;
  186.    typedef FONTSIGNATURE *PFONTSIGNATURE;
  187.    
  188.    typedef struct _ADDITIONALMETRICS    /* am */
  189.    {
  190.       ULONG   ulIdentity;
  191.       ULONG   ulSize;
  192.       PANOSE  panose;
  193.    } ADDITIONALMETRICS;
  194.    typedef ADDITIONALMETRICS *PADDITIONALMETRICS;
  195.    
  196.    typedef struct _FOCAFONT    /* ff */
  197.    {
  198.       FONTSIGNATURE     fsSignature;
  199.       FOCAMETRICS       fmMetrics;
  200.       FONTDEFINITIONHEADER fdDefinitions;
  201.    } FOCAFONT;
  202.    typedef FOCAFONT *PFOCAFONT;
  203.    
  204.    #define FONT_SIGNATURE          0xfffffffe /* Identity header start    */
  205.    #define FONT_METRICS            0x00000001 /* Identity metrics         */
  206.    #define FONT_DEFINITION         0x00000002 /* Identity definition      */
  207.    #define FONT_KERNPAIRS          0x00000003 /* Identity Kern Pairs      */
  208.    #define FONT_ADDITIONALMETRICS  0x00000004 /* Identity Additional Metrics */
  209.    #define FONT_ENDRECORD          0xffffffff /* Identity record end      */
  210.    
  211.    /* Options for QueryFonts */
  212.    
  213.    #define QUERY_PUBLIC_FONTS      0x0001
  214.    #define QUERY_PRIVATE_FONTS     0x0002
  215.    
  216.    #define CDEF_GENERIC            0x0001
  217.    #define CDEF_BOLD               0x0002
  218.    #define CDEF_ITALIC             0x0004
  219.    #define CDEF_UNDERSCORE         0x0008
  220.    #define CDEF_STRIKEOUT          0x0010
  221.    #define CDEF_OUTLINE            0x0020
  222.    
  223.    /* XLATOFF */
  224. #endif /* PMFONT_INCLUDED */
  225. /* XLATON */
  226.  
  227. /* XLATOFF */
  228. #ifdef __IBMC__
  229.    #pragma checkout( suspend )
  230.    #ifndef __CHKHDR__
  231.       #pragma checkout( resume )
  232.    #endif
  233.    #pragma checkout( resume )
  234. #endif
  235. /* XLATON */
  236.  
  237. /**************************** end of file **********************************/
  238.