home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / header45.zip / pmfont.h < prev    next >
C/C++ Source or Header  |  1999-04-30  |  9KB  |  295 lines

  1. /****************************** Module Header ******************************\
  2. *
  3. * Module Name: PMFONT.H
  4. *
  5. * OS/2 Presentation Manager type declarations for Fonts.
  6. *
  7. * Copyright (c) International Business Machines Corporation 1981, 1988-1992
  8. *
  9. * ===========================================================================
  10. *
  11. * Comments at the end of each typedef line give the name tags used in
  12. * the assembler include version of this file.
  13. *
  14. *
  15. \***************************************************************************/
  16.  
  17. /* XLATOFF */
  18. #if __IBMC__ || __IBMCPP__
  19.    #pragma info( none )
  20.    #ifndef __CHKHDR__
  21.       #pragma info( none )
  22.    #endif
  23.    #pragma info( restore )
  24. #endif
  25. #ifdef __cplusplus
  26.       extern "C" {
  27. #endif
  28. /* XLATON */
  29.  
  30. /* XLATOFF */
  31. #ifndef PMFONT_INCLUDED
  32.    /* XLATON */
  33.    #define PMFONT_INCLUDED
  34.    
  35.    /***************************************************************************\
  36.    *  FontRangeEntry
  37.    *
  38.    *     ulRun         = number of consecutive glyphs contained in the font
  39.    *     ulSkip        = number of consecutive glyphs skipped in the font,
  40.    *                     ulSkip == 0 --> Last FontRangeEntry in table
  41.    \***************************************************************************/
  42.    
  43.    typedef struct _FONTRANGEENTRY       /* fre */
  44.    {
  45.       ULONG   ulRun;
  46.       ULONG   ulSkip;
  47.    } FONTRANGEENTRY;
  48.    typedef FONTRANGEENTRY *PFONTRANGEENTRY;
  49.    
  50.    /***************************************************************************\
  51.    *  FontCharDef
  52.    *
  53.    *     ulGlyphOffset = offset to rendered character bitmap (0 from driver)
  54.    *     sAspace       = pre-character space
  55.    *     sBspace       = character width (always non-zero)
  56.    *     sCspace       = post-character space
  57.    \***************************************************************************/
  58.    
  59.    typedef struct _FONTCHARDEF          /* fcd */
  60.    {
  61.       ULONG   ulGlyphOffset;
  62.       SHORT   sAspace;
  63.       USHORT  sBspace;
  64.       SHORT   sCspace;
  65.    } FONTCHARDEF;
  66.    typedef FONTCHARDEF *PFONTCHARDEF;
  67.    
  68.    /***************************************************************************\
  69.    *  FocaMetricsExtension
  70.    \***************************************************************************/
  71.    
  72.    typedef struct _FOCAMETRICSEXT /* fme */
  73.    {
  74.       ULONG          ulSize;            /* Total size of extension  */
  75.       ULONG          ulFlags;           /* Reserved, must be 0      */
  76.       ULONG          ulGlyphCount;
  77.       ULONG          ulDefaultIndex;
  78.       ULONG          ulRangeTableEntries;
  79.       FONTRANGEENTRY afreRangeTable[1];
  80.       
  81.    } FOCAMETRICSEXT;
  82.    typedef FOCAMETRICSEXT *PFOCAMETRICSEXT;
  83.    
  84.    /***************************************************************************/
  85.    
  86.    typedef struct _FOCAMETRICS    /* foca */
  87.    {
  88.       ULONG   ulIdentity;
  89.       ULONG   ulSize;
  90.       CHAR    szFamilyname[32];
  91.       CHAR    szFacename[32];
  92.       SHORT   usRegistryId;
  93.       SHORT   usCodePage;
  94.       SHORT   yEmHeight;
  95.       SHORT   yXHeight;
  96.       SHORT   yMaxAscender;
  97.       SHORT   yMaxDescender;
  98.       SHORT   yLowerCaseAscent;
  99.       SHORT   yLowerCaseDescent;
  100.       SHORT   yInternalLeading;
  101.       SHORT   yExternalLeading;
  102.       SHORT   xAveCharWidth;
  103.       SHORT   xMaxCharInc;
  104.       SHORT   xEmInc;
  105.       SHORT   yMaxBaselineExt;
  106.       SHORT   sCharSlope;
  107.       SHORT   sInlineDir;
  108.       SHORT   sCharRot;
  109.       USHORT  usWeightClass;
  110.       USHORT  usWidthClass;
  111.       SHORT   xDeviceRes;
  112.       SHORT   yDeviceRes;
  113.       SHORT   usFirstChar;
  114.       SHORT   usLastChar;
  115.       SHORT   usDefaultChar;
  116.       SHORT   usBreakChar;
  117.       SHORT   usNominalPointSize;
  118.       SHORT   usMinimumPointSize;
  119.       SHORT   usMaximumPointSize;
  120.       SHORT   fsTypeFlags;
  121.       SHORT   fsDefn;
  122.       SHORT   fsSelectionFlags;
  123.       SHORT   fsCapabilities;
  124.       SHORT   ySubscriptXSize;
  125.       SHORT   ySubscriptYSize;
  126.       SHORT   ySubscriptXOffset;
  127.       SHORT   ySubscriptYOffset;
  128.       SHORT   ySuperscriptXSize;
  129.       SHORT   ySuperscriptYSize;
  130.       SHORT   ySuperscriptXOffset;
  131.       SHORT   ySuperscriptYOffset;
  132.       SHORT   yUnderscoreSize;
  133.       SHORT   yUnderscorePosition;
  134.       SHORT   yStrikeoutSize;
  135.       SHORT   yStrikeoutPosition;
  136.       SHORT   usKerningPairs;
  137.       SHORT   sFamilyClass;
  138.       PSZ     pszDeviceNameOffset;
  139.    } FOCAMETRICS;
  140.    typedef FOCAMETRICS *PFOCAMETRICS;
  141.    
  142.    /* XLATOFF */
  143.    /* REUSE - long offset to extension relative to FocaMetrics  */
  144.    #define loffExtension pszDeviceNameOffset
  145.    /* XLATON */
  146.    
  147.    typedef struct _FONTFILEMETRICS    /* ffm */
  148.    {
  149.       ULONG   ulIdentity;
  150.       ULONG   ulSize;
  151.       CHAR    szFamilyname[32];
  152.       CHAR    szFacename[32];
  153.       SHORT   usRegistryId;
  154.       SHORT   usCodePage;
  155.       SHORT   yEmHeight;
  156.       SHORT   yXHeight;
  157.       SHORT   yMaxAscender;
  158.       SHORT   yMaxDescender;
  159.       SHORT   yLowerCaseAscent;
  160.       SHORT   yLowerCaseDescent;
  161.       SHORT   yInternalLeading;
  162.       SHORT   yExternalLeading;
  163.       SHORT   xAveCharWidth;
  164.       SHORT   xMaxCharInc;
  165.       SHORT   xEmInc;
  166.       SHORT   yMaxBaselineExt;
  167.       SHORT   sCharSlope;
  168.       SHORT   sInlineDir;
  169.       SHORT   sCharRot;
  170.       USHORT  usWeightClass;
  171.       USHORT  usWidthClass;
  172.       SHORT   xDeviceRes;
  173.       SHORT   yDeviceRes;
  174.       SHORT   usFirstChar;
  175.       SHORT   usLastChar;
  176.       SHORT   usDefaultChar;
  177.       SHORT   usBreakChar;
  178.       SHORT   usNominalPointSize;
  179.       SHORT   usMinimumPointSize;
  180.       SHORT   usMaximumPointSize;
  181.       SHORT   fsTypeFlags;
  182.       SHORT   fsDefn;
  183.       SHORT   fsSelectionFlags;
  184.       SHORT   fsCapabilities;
  185.       SHORT   ySubscriptXSize;
  186.       SHORT   ySubscriptYSize;
  187.       SHORT   ySubscriptXOffset;
  188.       SHORT   ySubscriptYOffset;
  189.       SHORT   ySuperscriptXSize;
  190.       SHORT   ySuperscriptYSize;
  191.       SHORT   ySuperscriptXOffset;
  192.       SHORT   ySuperscriptYOffset;
  193.       SHORT   yUnderscoreSize;
  194.       SHORT   yUnderscorePosition;
  195.       SHORT   yStrikeoutSize;
  196.       SHORT   yStrikeoutPosition;
  197.       SHORT   usKerningPairs;
  198.       SHORT   sFamilyClass;
  199.       ULONG   ulReserved;
  200.       PANOSE  panose;
  201.    } FONTFILEMETRICS;
  202.    typedef FONTFILEMETRICS *PFONTFILEMETRICS;
  203.    
  204.    typedef struct _FONTDEFINITIONHEADER    /* fdh */
  205.    {
  206.       ULONG   ulIdentity;
  207.       ULONG   ulSize;
  208.       SHORT   fsFontdef;
  209.       SHORT   fsChardef;
  210.       SHORT   usCellSize;
  211.       SHORT   xCellWidth;
  212.       SHORT   yCellHeight;
  213.       SHORT   xCellIncrement;
  214.       SHORT   xCellA;
  215.       SHORT   xCellB;
  216.       SHORT   xCellC;
  217.       SHORT   pCellBaseOffset;
  218.    } FONTDEFINITIONHEADER;
  219.    typedef FONTDEFINITIONHEADER *PFONTDEFINITIONHEADER;
  220.    
  221.    #define FONTDEFFONT1     0x0047  /* set width, height, inc. & base offset */
  222.    #define FONTDEFFONT2     0x0042  /* set height & base offset            */
  223.    #define FONTDEFFONT3     0x0042  /* set height & base offset            */
  224.    #define FONTDEFCHAR1     0x0081  /* set char offset and width           */
  225.    #define FONTDEFCHAR2     0x0081  /* set char offset and width           */
  226.    #define FONTDEFCHAR3     0x00b8  /* set char offset, A, B, and C space  */
  227.    #define SPACE_UNDEF      0x8000  /* space undefined = take default      */
  228.    #define FONTDEFFOCA32    0x4000
  229.    #define FONTDEFDEVFONT   0x2000  /* Device or Downloadable font         */
  230.    
  231.    typedef struct _FONTSIGNATURE    /* fs */
  232.    {
  233.       ULONG   ulIdentity;
  234.       ULONG   ulSize;
  235.       CHAR    achSignature[12];
  236.    } FONTSIGNATURE;
  237.    typedef FONTSIGNATURE *PFONTSIGNATURE;
  238.    
  239.    typedef struct _ADDITIONALMETRICS    /* am */
  240.    {
  241.       ULONG   ulIdentity;
  242.       ULONG   ulSize;
  243.       PANOSE  panose;
  244.    } ADDITIONALMETRICS;
  245.    typedef ADDITIONALMETRICS *PADDITIONALMETRICS;
  246.    
  247.    typedef struct _FOCAFONT    /* ff */
  248.    {
  249.       FONTSIGNATURE     fsSignature;
  250.       FOCAMETRICS       fmMetrics;
  251.       FONTDEFINITIONHEADER fdDefinitions;
  252.    } FOCAFONT;
  253.    typedef FOCAFONT *PFOCAFONT;
  254.    
  255.    #define FONT_SIGNATURE          0xfffffffe /* Identity header start    */
  256.    #define FONT_METRICS            0x00000001 /* Identity metrics         */
  257.    #define FONT_DEFINITION         0x00000002 /* Identity definition      */
  258.    #define FONT_KERNPAIRS          0x00000003 /* Identity Kern Pairs      */
  259.    #define FONT_ADDITIONALMETRICS  0x00000004 /* Identity Additional Metrics */
  260.    #define FONT_ENDRECORD          0xffffffff /* Identity record end      */
  261.    
  262.    typedef  FOCAFONT       FOCAFONT32;
  263.    typedef  FOCAFONT32     *PFOCAFONT32;
  264.    
  265.    /* Options for QueryFonts */
  266.    
  267.    #define QUERY_PUBLIC_FONTS      0x0001
  268.    #define QUERY_PRIVATE_FONTS     0x0002
  269.    
  270.    #define CDEF_GENERIC            0x0001
  271.    #define CDEF_BOLD               0x0002
  272.    #define CDEF_ITALIC             0x0004
  273.    #define CDEF_UNDERSCORE         0x0008
  274.    #define CDEF_STRIKEOUT          0x0010
  275.    #define CDEF_OUTLINE            0x0020
  276.    
  277.    /* XLATOFF */
  278. #endif /* PMFONT_INCLUDED */
  279. /* XLATON */
  280.  
  281. /* XLATOFF */
  282. #ifdef __cplusplus
  283.         }
  284. #endif
  285. #if __IBMC__ || __IBMCPP__
  286.    #pragma info( none )
  287.    #ifndef __CHKHDR__
  288.       #pragma info( restore )
  289.    #endif
  290.    #pragma info( restore )
  291. #endif
  292. /* XLATON */
  293.  
  294. /**************************** end of file **********************************/
  295.