1 #ifndef LIBRARIES_TTENGINE_H
    2 #define LIBRARIES_TTENGINE_H
    3 
    4 /* $VER: ttengine.h 10.15 (11.02.2022) (c) by Grzegorz Kraszewski 2002 - 2019, Harry Sintonen 2019-2022 */
    5 
    6 #define TTENGINENAME "ttengine.library"
    7 #define TTENGINEVERSION 10
    8 #define TTENGINEMINVERSION 10
    9 
   10 /* Tags */
   11 
   12 /* Tags applicability legend: */
   13 /* O - TT_OpenFont() */
   14 /* G - TT_GetAttrs() */
   15 /* S - TT_SetAttrs() */
   16 /* P - TT_GetPixmap() */
   17 
   18 /* ---- name -------------------- value ----- applicability */
   19 
   20 #define TT_FontFile             0x6EDA0000    /* OG.. */
   21 
   22 #define TT_FontStyle            0x6EDA0001    /* OG.. */
   23 
   24 #define TT_FontStyle_Regular    0
   25 #define TT_FontStyle_Italic     1
   26 
   27 #define TT_FamilyTable          0x6EDA0002    /* O... */
   28 #define TT_FontSize             0x6EDA0003    /* OG.. */
   29 
   30 #define TT_FontWeight           0x6EDA0004    /* OG.. */
   31 
   32 #define TT_FontWeight_Normal    400
   33 #define TT_FontWeight_Bold      700
   34 
   35 #define TT_ColorMap             0x6EDA0005    /* O... */
   36 #define TT_Screen               0x6EDA0006    /* O... */
   37 #define TT_Window               0x6EDA0007    /* O... */
   38 #define TT_FontAscender         0x6EDA0008    /* .G.. */
   39 #define TT_FontDescender        0x6EDA0009    /* .G.. */
   40 
   41 #define TT_Antialias            0x6EDA000F    /* .GSP */
   42 
   43 #define TT_Antialias_Auto       0
   44 #define TT_Antialias_Off        1
   45 #define TT_Antialias_On         2
   46 
   47 #define TT_Encoding             0x6EDA0010    /* .GSP */
   48 
   49 /* All encoding numbers (excluding TT_Encoding_Default) are equal to IANA */
   50 /* registered encoding numbers                                            */
   51 
   52 #define TT_Encoding_System      -3            /* Same encoding as MIBENUM_SYSTEM (V10) */
   53 #define TT_Encoding_System_UTF8 -1            /* Use locale.library/DecodeUTF8() (V8) */
   54 #define TT_Encoding_Default     0             /* use ENV:ttfcodepage or ISO-8859-1 if not found */
   55 #define TT_Encoding_ISO8859_1   4             /* Western Europe and US */
   56 #define TT_Encoding_ISO8859_2   5             /* Eastern Europe */
   57 #define TT_Encoding_ISO8859_3   6
   58 #define TT_Encoding_ISO8859_4   7
   59 #define TT_Encoding_ISO8859_5   8
   60 #define TT_Encoding_ISO8859_6   9
   61 #define TT_Encoding_ISO8859_7   10
   62 #define TT_Encoding_ISO8859_8   11
   63 #define TT_Encoding_ISO8859_9   12
   64 #define TT_Encoding_ISO8859_10  13
   65 #define TT_Encoding_ISO8859_11  14
   66 #define TT_Encoding_ISO8859_13  109
   67 #define TT_Encoding_ISO8859_14  110
   68 #define TT_Encoding_ISO8859_15  111
   69 #define TT_Encoding_ISO8859_16  112
   70 #define TT_Encoding_UTF16_BE    1013
   71 #define TT_Encoding_UTF32_BE    1018
   72 #define TT_Encoding_UTF8        106
   73 #define TT_Encoding_UTF16_LE    1014
   74 #define TT_Encoding_UTF32_LE    1019
   75 #define TT_Encoding_UTF16       1015
   76 #define TT_Encoding_UTF32       1017
   77 
   78 #define TT_FontName             0x6EDA0011    /* .G.. */
   79 #define TT_FamilyName           0x6EDA0012    /* .G.. */
   80 #define TT_SubfamilyName        0x6EDA0013    /* .G.. */
   81 #define TT_Transparency         0x6EDA0014    /* .GS.  from 0 to 255 */
   82 
   83 #define TT_Transparency_UseRastPort  0xFFFFFF00 /* since V10.15 */
   84 
   85 #define TT_ScaleX               0x6EDA0015    /* O.SP  16.16 scaled integer */
   86 
   87 #define TT_SoftStyle            0x6EDA0017    /* ..SP (V5) */
   88 
   89 #define TT_SoftStyle_None           0x0000
   90 #define TT_SoftStyle_Underlined     0x0001
   91 #define TT_SoftStyle_DblUnderlined  0x0002
   92 #define TT_SoftStyle_Overstriked    0x0004
   93 #define TT_SoftStyle_DblOverstriked 0x0008
   94 
   95 #define TT_Foreground           0x6EDA0018    /* ..S.  foreground RGB value*/
   96 
   97 #define TT_Foreground_UseRastPort  0xFFFFFFFF
   98 
   99 #define TT_Background           0x6EDA0019    /* ..S.  background RGB value*/
  100 
  101 #define TT_Background_UseRastPort  0xFFFFFFFF
  102 
  103 #define TT_FontMaxTop           0x6EDA001E    /* .G.. */
  104 #define TT_FontMaxBottom        0x6EDA001F    /* .G.. */
  105 #define TT_FontDesignHeight     0x6EDA0020    /* .G.. */
  106 #define TT_FontRealAscender     0x6EDA0021    /* .G.. */
  107 #define TT_FontRealDescender    0x6EDA0022    /* .G.. */
  108 #define TT_FontAccentedAscender 0x6EDA0023    /* .G.. */
  109 #define TT_CustomEncoding       0x6EDA0024    /* ..SP */
  110 #define TT_Gamma                0x6EDA0025    /* .GS. */  /* gettable from V7.2 */
  111 #define TT_FontBaseline         TT_FontMaxTop             /* V6.7 */
  112 #define TT_FontFixedWidth       0x6EDA0026    /* OG.. */  /* V6.7 */
  113 #define TT_FontHeight           0x6EDA0027    /* .G.. */  /* V6.7 */
  114 #define TT_FontWidth            0x6EDA0028    /* .G.. */  /* V6.7 */
  115 #define TT_DiskFontMetrics      0x6EDA0029    /* ..SP */  /* V6.7 */
  116 #define TT_ForceFixedWidth      0x6EDA0030    /* ..SP */  /* V7.2 */
  117 #define TT_PrintMode            0x6EDA0033    /* .GS. */  /* V10.10 */
  118 #define TT_DestAlpha            0x6EDA0034    /* .GS. */  /* V10.14 */
  119 
  120 /* Different TT_DestAlpha modes (V10.14) */
  121 
  122 #define TT_DestAlpha_UseRastPort 0 /* Set alpha according to current rpattrs (default) */
  123 #define TT_DestAlpha_One         1 /* Set alpha to all ones 0xff */
  124 #define TT_DestAlpha_Dst         2 /* Keep destination alpha unchanged */
  125 #define TT_DestAlpha_Src         3 /* Use source alpha */
  126 #define TT_DestAlpha_Mix         4 /* Mix source alpha with destination */
  127 
  128 /* Structure returned by TT_GetPixmap() (V5)*/
  129 
  130 struct TT_Pixmap
  131 {
  132 	ULONG     ttp_Size;       /* size of the structure including this field */
  133 	ULONG     ttp_Width;      /* also equal to bytes per row */
  134 	ULONG     ttp_Height;     /* number of rows */
  135 	UBYTE    *ttp_Data;       /* grayscale pixmap data */
  136 };
  137 
  138 /* font requester attributes (V6) */
  139 
  140                                             /* type,             default value     */
  141 
  142 #define TTRQ_Window             0x6EDA2000  /* struct Window*,   NULL              */
  143 #define TTRQ_PubScreenName      0x6EDA2001  /* STRPTR,           NULL [Workbench]  */
  144 #define TTRQ_Screen             0x6EDA2002  /* struct Screen*,   NULL              */
  145 #define TTRQ_SleepWindow        0x6EDA2003  /* BOOL,             FALSE             */
  146 #define TTRQ_TitleText          0x6EDA2004  /* STRPTR,           "Select TrueType font" or localized */
  147 #define TTRQ_PositiveText       0x6EDA2005  /* STRPTR,           "OK" or localized */
  148 #define TTRQ_NegativeText       0x6EDA2006  /* STRPTR,           "Cancel" or localized */
  149 #define TTRQ_InitialLeftEdge    0x6EDA2007  /* WORD,             centered on screen */
  150 #define TTRQ_InitialTopEdge     0x6EDA2008  /* WORD,             centered on screen */
  151 #define TTRQ_InitialWidth       0x6EDA2009  /* WORD,             max(200, 25% of sceeen width) */
  152 #define TTRQ_InitialHeight      0x6EDA200A  /* WORD,             max(200, 50% of screen height) */
  153 #define TTRQ_DoSizes            0x6EDA200B  /* BOOL,             TRUE              */
  154 #define TTRQ_DoWeight           0x6EDA200C  /* BOOL,             FALSE             */
  155 #define TTRQ_DoStyle            0x6EDA200D  /* BOOL,             FALSE             */
  156 #define TTRQ_Activate           0x6EDA200E  /* BOOL,             TRUE              */
  157 #define TTRQ_InitialSize        0x6EDA200F  /* LONG,             0 [no size]       */
  158 #define TTRQ_InitialName        0x6EDA2010  /* STRPTR,           NULL [no name]    */
  159 #define TTRQ_InitialStyle       0x6EDA2011  /* LONG,             TT_FontStyle_Regular */
  160 #define TTRQ_DoPreview          0x6EDA2012  /* BOOL,             FALSE             */
  161 #define TTRQ_FixedWidthOnly     0x6EDA2013  /* BOOL,             FALSE             */
  162 
  163 #endif /* LIBRARIES_TTENGINE_H */
  164