home *** CD-ROM | disk | FTP | other *** search
/ Geek Gadgets 1 / ADE-1.bin / ade-dist / at-inc-bin.lha / os-include / diskfont / diskfonttag.i < prev    next >
Text File  |  1993-10-15  |  12KB  |  303 lines

  1.     IFND    DISKFONT_DISKFONTTAG_I
  2. DISKFONT_DISKFONTTAG_I    SET    1
  3.  
  4. **    $VER: diskfonttag.i 38.4 (14.7.92)
  5. **    Includes Release 40.15
  6. **
  7. **    diskfonttag.i -- tag definitions for .otag files
  8. **
  9. **    Copyright 1992-1993 Commodore-Amiga Inc.
  10. **        All Rights Reserved
  11.  
  12.     IFND    EXEC_TYPES_I
  13.     INCLUDE    "exec/types.i"
  14.     ENDC
  15.  
  16.     IFND    UTILITY_TAGITEM_I
  17.     INCLUDE "utility/tagitem.i"
  18.     ENDC
  19.  
  20. * Level 0 entries never appear in the .otag list, but appear in font
  21. * specifications
  22.  
  23. OT_Level0    EQU    TAG_USER
  24. * Level 1 entries are required to exist in the .otag tag list
  25. OT_Level1    EQU    (TAG_USER!$1000)
  26. * Level 2 entries are optional typeface metric tags
  27. OT_Level2    EQU    (TAG_USER!$2000)
  28. * Level 3 entries are required for some OT_Engines
  29. OT_Level3    EQU    (TAG_USER!$3000)
  30. * Indirect entries are at (tag address + data offset)
  31. OT_Indirect    EQU    $8000
  32.  
  33. ********************************************************************
  34. * font specification and inquiry tags
  35. *
  36. *! tags flagged with an exclaimation mark are valid for
  37. *    specification.
  38. *  ? tags flagged with a question mark are valid for inquiry
  39. *
  40. * fixed binary numbers are encoded as 16 bits of integer and
  41. * 16 bits of fraction.    Negative values are indicated by twos
  42. * complement of all 32 bits.
  43.  
  44.  
  45. *! OT_DeviceDPI specifies the target device dots per inch -- X DPI is
  46. *    in the high word, Y DPI in the low word.  OT_DeviceDPI == TA_DeviceDPI.
  47. OT_DeviceDPI    EQU    (OT_Level0!$01)
  48.  
  49. *! OT_DotSize specifies the target device dot size as a percent of
  50. *    it's resolution-implied size -- X percent in high word, Y percent
  51. *    in low word.
  52. OT_DotSize    EQU    (OT_Level0!$02)
  53.  
  54. *! OT_PointHeight specifies the requested point height of a typeface,
  55. *    specifically, the height and nominal width of the em-square.
  56. *    The point referred to here is 1/72".  It is encoded as a fixed
  57. *    binary number.
  58. OT_PointHeight    EQU    (OT_Level0!$08)
  59.  
  60. *! OT_SetFactor specifies the requested set width of a typeface.
  61. *    It distorts the width of the em-square from that specified by
  62. *    OT_PointHeight.  To compensate for a device with different
  63. *    horizontal and vertical resolutions, OT_DeviceDPI should be used
  64. *    instead.  For a normal aspect ratio, set to 1.0 (encoded as
  65. *    0x00010000).  This is the default value.
  66. OT_SetFactor    EQU    (OT_Level0!$09)
  67.  
  68. *! OT_Shear... specifies the Sine and Cosine of the vertical stroke
  69. *    angle, as two fixed point binary fractions.  Both must be specified:
  70. *    first the Sine and then the Cosine.  Setting the sine component
  71. *    changes the Shear to an undefined value, setting the cosine
  72. *    component completes the Shear change to the new composite value.
  73. *    For no shear, set to 0.0, 1.0 (encoded as 0x00000000, 0x00010000).
  74. *    This is the default value.
  75. OT_ShearSin    EQU    (OT_Level0!$0a)
  76. OT_ShearCos    EQU    (OT_Level0!$0b)
  77.  
  78. *! OT_Rotate... specifies the Sine and Cosine of the baselin rotation
  79. *    angle, as two fixed point binary fractions.  Both must be specified:
  80. *    first the Sine and then the Cosine.  Setting the sine component
  81. *    changes the Shear to an undefined value, setting the cosine
  82. *    component completes the Shear change to the new composite value.
  83. *    For no shear, set to 0.0, 1.0 (encoded as 0x00000000, 0x00010000).
  84. *    This is the default value.
  85. OT_RotateSin    EQU    (OT_Level0!$0c)
  86. OT_RotateCos    EQU    (OT_Level0!$0d)
  87.  
  88. *! OT_Embolden... specifies values to algorithimically embolden -- or,
  89. *    when negative, lighten -- the glyph.  It is encoded as a fixed point
  90. *    binary fraction of the em-square.  The X and Y components can be
  91. *    changed indendently.  For normal characters, set to 0.0, 0.0
  92. *    (encoded as 0x00000000, 0x00000000).  This is the default value.
  93. OT_EmboldenX    EQU    (OT_Level0!$0e)
  94. OT_EmboldenY    EQU    (OT_Level0!$0f)
  95.  
  96. *! OT_PointSize is an old method of specifying the point size,
  97. *    encoded as (points * 16).
  98. OT_PointSize    EQU    (OT_Level0!$10)
  99.  
  100. *! OT_GlyphCode specifies the glyph (character) code to use with
  101. *    subsequent operations.  For example, this is the code for an
  102. *    OT_Glyph inquiry
  103. OT_GlyphCode    EQU    (OT_Level0!$11)
  104.  
  105. *! OT_GlyphCode2 specifies the second glyph code.  For example,
  106. *    this is the right glyph of the two glyphs of an OT_KernPair
  107. *    inquiry
  108. OT_GlyphCode2    EQU    (OT_Level0!$12)
  109.  
  110. *! OT_GlyphWidth specifies a specific width for a glyph.
  111. *    It sets a specific escapement (advance) width for subsequent
  112. *    glyphs.  It is encoded as a fixed binary fraction of the em-square.
  113. *    To revert to using the font-defined escapement for each glyph, set
  114. *    to 0.0 (encoded as 0x00000000).  This is the default value.
  115. OT_GlyphWidth    EQU    (OT_Level0!$13)
  116.  
  117. *! OT_OTagPath and
  118. *! OT_OTagList specify the selected typeface.  Both must be specified:
  119. *    first the Path and then the List.  Setting the path name changes
  120. *    changes the typeface to an undefined value, providing the List
  121. *    completes the typeface selection to the new typeface.  OTagPath
  122. *    is the null terminated full file path of the .otag file associated
  123. *    with the typeface.  OTagList is a memory copy of the processed
  124. *    contents of that .otag file (i.e. with indirections resolved).
  125. *    There are no default values for the typeface.
  126. OT_OTagPath    EQU    (OT_Level0!OT_Indirect!$14)
  127. OT_OTagList    EQU    (OT_Level0!OT_Indirect!$15)
  128.  
  129. *  ? OT_GlyphMap supplies a read-only struct GlyphMap pointer that
  130. *    describes a bitmap for a glyph with the current attributes.
  131. OT_GlyphMap    EQU    (OT_Level0!OT_Indirect!$20)
  132.  
  133. *  ? OT_WidthList supplies a read-only struct MinList of struct
  134. *    GlyphWidthEntry nodes for glyphs that are defined from GlyphCode
  135. *    to GlyphCode2, inclusive.  The widths are represented as fixed
  136. *    binary fractions of the em-square, ignoring any effect of
  137. *    SetFactor or GlyphWidth.  A width would need to be converted to
  138. *    a distance along the baseline in device units by the
  139. *    application.
  140. OT_WidthList    EQU    (OT_Level0!OT_Indirect!$21)
  141.  
  142. *  ? OT_...KernPair supplies the kern adjustment to be added to the
  143. *    current position after placement of the GlyphCode glyph and
  144. *    before placement of the GlyphCode2 glyph.  Text kern pairs are
  145. *    for rendering body text.  Display kern pairs are generally
  146. *    tighter values for display (e.g. headline) purposes.  The
  147. *    adjustment is represented as a fixed binary fraction of the
  148. *    em-square, ignoring any effect of SetFactor.  This number would
  149. *    need to be converted to a distance along the baseline in device
  150. *    units by the application.
  151. OT_TextKernPair        EQU    (OT_Level0!OT_Indirect!$22)
  152. OT_DesignKernPair    EQU    (OT_Level0!OT_Indirect!$23)
  153.  
  154. *  ? OT_Underlined is an unsigned word which is used to request
  155. *    algorithimic underlining for the engine when rendering the glyph.
  156. *    Bullet.library currently does not support this tag, though it
  157. *    may be used by other engines in the future.  The default for
  158. *    any engine which supports this tag must be OTUL_None.  Engines which
  159. *    do not support this tag should return an appropriate OTERR value.
  160. *
  161. *    As of V39, diskfont.library will request underlining if specified
  162. *    in the TextAttr, or TTextAttr passed to OpenDiskFont().  Diskfont
  163. *    will first request Broken underlining (like the Text() function
  164. *    does when SetSoftStyle() is used), and then Solid underlining if
  165. *    the engine returns an error.  If the engine returns an error for
  166. *    both, then diskfont.library attempts to find, or create the best
  167. *    non-underlined font that it can.
  168. OT_UnderLined        EQU    (OT_Level0!$24)
  169.  
  170. OTUL_None        EQU    0
  171. OTUL_Solid        EQU    1
  172. OTUL_Broken        EQU    2
  173. OTUL_DoubleSolid    EQU    3
  174. OUTL_DoubleBroken    EQU    4
  175.  
  176. *  ? OT_StrikeThrough is a boolean which is used to request
  177. *    algorithimic strike through when rendering the glyph.
  178. *    Bullet.library currently does not support this tag, though it
  179. *    may be used by other engines in the future.  The default for
  180. *    any engined which supports this tag must be FALSE.  Engines which
  181. *    do not support this tag should return an appropriate OTERR value.
  182. OT_StrikeThrough    EQU    (OT_Level0!$25)
  183.  
  184.  
  185.  
  186. ********************************************************************
  187. * .otag tags
  188.  
  189. * suffix for files in FONTS: that contain these tags
  190. OTSUFFIX    MACRO    ; ".otag" text
  191.         dc.b    '.otag',0
  192.         ds.w    0
  193.         ENDM
  194.  
  195. * OT_FileIdent both identifies this file and verifies its size.
  196. * It is required to be the first tag in the file.
  197. OT_FileIdent    EQU    (OT_Level1!$01)
  198.  
  199. * OT_Engine specifies the font engine this file is designed to use
  200. OT_Engine    EQU    (OT_Level1!OT_Indirect!$02)
  201.  
  202. OTE_Bullet    MACRO    ; "bullet" text
  203.         dc.b    'bullet',0
  204.         ds.w    0
  205.         ENDM
  206.  
  207. * OT_Family is the family name of this typeface
  208. OT_Family    EQU    (OT_Level1!OT_Indirect!$03)
  209.  
  210. * The name of this typeface is implicit in the name of the .otag file
  211. * OT_BName is used to find the bold variant of this typeface
  212. OT_BName    EQU    (OT_Level2!OT_Indirect!$05)
  213. * OT_IName is used to find the italic variant of this typeface
  214. OT_IName    EQU    (OT_Level2!OT_Indirect!$06)
  215. * OT_BIName is used to find the bold italic variant of this typeface
  216. OT_BIName    EQU    (OT_Level2!OT_Indirect!$07)
  217.  
  218. * OT_SymSet is used to select the symbol set that has the OT_YSizeFactor
  219. * described here.  Other symbol sets might have different extremes
  220. OT_SymbolSet    EQU    (OT_Level1!$10)
  221.  
  222. * OT_YSizeFactor is a ratio to assist in calculating the Point height
  223. * to BlackHeight relationship -- high word: Point height term, low
  224. * word: Black height term -- pointSize = ysize*<high>/<low>
  225. OT_YSizeFactor    EQU    (OT_Level1!$11)
  226.  
  227. * OT_SpaceWidth specifies the width of the space character relative
  228. * to the character height
  229. OT_SpaceWidth    EQU    (OT_Level2!$12)
  230.  
  231. * OT_IsFixed is a boolean indicating that all the characters in the
  232. * typeface are intended to have the same character advance
  233. OT_IsFixed    EQU    (OT_Level2!$13)
  234.  
  235. * OT_SerifFlag is a boolean indicating if the character has serifs
  236. OT_SerifFlag    EQU    (OT_Level1!$14)
  237.  
  238. * OT_StemWeight is an unsigned byte indicating the weight of the character
  239. OT_StemWeight    EQU    (OT_Level1!$15)
  240.  
  241. OTS_UltraThin    EQU     8    ;   0- 15
  242. OTS_ExtraThin    EQU     24    ;  16- 31
  243. OTS_Thin    EQU     40    ;  32- 47
  244. OTS_ExtraLight    EQU     56    ;  48- 63
  245. OTS_Light    EQU     72    ;  64- 79
  246. OTS_DemiLight    EQU     88    ;  80- 95
  247. OTS_SemiLight    EQU    104    ;  96-111
  248. OTS_Book    EQU    120    ; 112-127
  249. OTS_Medium    EQU    136    ; 128-143
  250. OTS_SemiBold    EQU    152    ; 144-159
  251. OTS_DemiBold    EQU    168    ; 160-175
  252. OTS_Bold    EQU    184    ; 176-191
  253. OTS_ExtraBold    EQU    200    ; 192-207
  254. OTS_Black    EQU    216    ; 208-223
  255. OTS_ExtraBlack    EQU    232    ; 224-239
  256. OTS_UltraBlack    EQU    248    ; 240-255
  257.  
  258. * OT_SlantStyle is an unsigned byte indicating the font posture
  259. OT_SlantStyle    EQU    (OT_Level1!$16)
  260. OTS_Upright    EQU    0
  261. OTS_Italic    EQU    1    ; Oblique, Slanted, etc.
  262. OTS_LeftItalic    EQU    2    ; Reverse Slant
  263.  
  264. * OT_HorizStyle is an unsigned byte indicating the appearance width
  265. OT_HorizStyle        EQU    (OT_Level1!$17)
  266. OTH_UltraCompressed    EQU     16    ;   0- 31
  267. OTH_ExtraCompressed    EQU     48    ;  32- 63
  268. OTH_Compressed        EQU     80    ;  64- 95
  269. OTH_Condensed        EQU    112    ;  96-127
  270. OTH_Normal        EQU    144    ; 128-159
  271. OTH_SemiExpanded    EQU    176    ; 160-191
  272. OTH_Expanded        EQU    208    ; 192-223
  273. OTH_ExtraExpanded    EQU    240    ; 224-255
  274.  
  275. * OT_SpaceFactor specifies the width of the space character relative
  276. * to the character height
  277. OT_SpaceFactor        EQU    (OT_Level2!$18)
  278.  
  279. * OT_InhibitAlgoStyle indicates which ta_Style bits, if any, should
  280. * be ignored even if the font does not already have that quality.
  281. * For example, if FSF_BOLD is set and the typeface is not bold but
  282. * the user specifies bold, the application or diskfont library is
  283. * not to use OT_Embolden to achieve a bold result.
  284. OT_InhibitAlgoStyle     EQU    (OT_Level2!$19)
  285.  
  286. * OT_AvailSizes is an indirect pointer to sorted UWORDs, 0th is count
  287. OT_AvailSizes        EQU    (OT_Level1!OT_Indirect!$20)
  288.  
  289. OT_MAXAVAILSIZES    EQU    20    ; no more than 20 sizes allowed
  290.  
  291. * OT_SpecCount is the count number of parameters specified here
  292. OT_SpecCount        EQU    (OT_Level1!$100)
  293.  
  294. * Specs can be created as appropriate for the engine by ORing in the
  295. * parameter number (1 is first, 2 is second, ... up to 15th)
  296. OT_Spec            EQU    (OT_Level1!$100)
  297. * OT_Spec1 is the (first) parameter to the font engine to select
  298. * this particular typeface
  299. OT_Spec1        EQU    (OT_Level1!$101)
  300.  
  301.  
  302.     ENDC    ; DISKFONT_DISKFONTTAG_I
  303.