home *** CD-ROM | disk | FTP | other *** search
/ Frozen Fish 1: Amiga / FrozenFish-Apr94.iso / bbs / cbm / os-include.lha / os-include / graphics / text.i < prev    next >
Text File  |  1993-10-15  |  6KB  |  150 lines

  1.     IFND    GRAPHICS_TEXT_I
  2. GRAPHICS_TEXT_I    SET    1
  3. **
  4. **    $VER: text.i 39.0 (21.8.91)
  5. **    Includes Release 40.15
  6. **
  7. **    graphics library text structures
  8. **
  9. **    (C) Copyright 1985-1993 Commodore-Amiga, Inc.
  10. **        All Rights Reserved
  11. **
  12.  
  13.     IFND    EXEC_PORTS_I
  14.     INCLUDE    "exec/ports.i"
  15.     ENDC    ; EXEC_PORTS_I
  16.  
  17.     IFND    UTILITY_TAGITEM_I
  18.     INCLUDE    "utility/tagitem.i"
  19.     ENDC    ; UTILITY_TAGITEM_I
  20.  
  21. *------ Font Styles --------------------------------------------------
  22. FS_NORMAL    EQU    0    ; normal text (no style attributes set)
  23.     BITDEF  FS,UNDERLINED,0    ; underlined (under baseline)
  24.     BITDEF  FS,BOLD,1        ; bold face text (ORed w/ shifted right 1)
  25.     BITDEF  FS,ITALIC,2        ; italic (slanted 1:2 right)
  26.     BITDEF  FS,EXTENDED,3    ; extended face (must be designed)
  27.  
  28.     BITDEF  FS,COLORFONT,6    ; this uses ColorTextFont structure
  29.     BITDEF  FS,TAGGED,7        ; the TextAttr is really an TTextAttr,
  30.  
  31. *------ Font Flags ---------------------------------------------------
  32.     BITDEF  FP,ROMFONT,0    ; font is in rom
  33.     BITDEF  FP,DISKFONT,1    ; font is from diskfont.library
  34.     BITDEF  FP,REVPATH,2    ; designed path is reversed (e.g. left)
  35.     BITDEF  FP,TALLDOT,3    ; designed for hires non-interlaced
  36.     BITDEF  FP,WIDEDOT,4    ; designed for lores interlaced
  37.     BITDEF  FP,PROPORTIONAL,5    ; character sizes vary from tf_XSize
  38.     BITDEF  FP,DESIGNED,6    ; size is "designed", not constructed
  39. *                ; note: if you do not set this bit in your
  40. *                ; textattr, then a font may be constructed
  41. *                ; for you by scaling an existing rom or disk
  42. *                ; font (under V36 and above).
  43.     ;-- bit 7 is always clear for fonts on the graphics font list
  44.     BITDEF  FP,REMOVED,7    ; the font has been removed
  45.  
  46.  
  47. ******* TextAttr node ************************************************
  48.  STRUCTURE  TextAttr,0
  49.     APTR    ta_Name        ; name of the desired font
  50.     UWORD   ta_YSize        ; height of the desired font
  51.     UBYTE   ta_Style        ; desired font style
  52.     UBYTE   ta_Flags        ; font preferences flags
  53.     LABEL   ta_SIZEOF
  54.  
  55.  STRUCTURE  TTextAttr,0
  56.     APTR    tta_Name        ; name of the desired font
  57.     UWORD   tta_YSize        ; height of the desired font
  58.     UBYTE   tta_Style        ; desired font style
  59.     UBYTE   tta_Flags        ; font preferences flags
  60.     APTR    tta_Tags        ; extended attributes
  61.     LABEL   tta_SIZEOF
  62.  
  63. ******* Text Tags ****************************************************
  64. TA_DeviceDPI    EQU    1!TAG_USER    ; Tag value is Point union:
  65.                     ; Hi word XDPI, Lo word YDPI
  66.  
  67.  
  68. MAXFONTMATCHWEIGHT    EQU    32767    ; perfect match from WeighTAMatch
  69.  
  70.  
  71. ******* TextFont node ************************************************
  72.  STRUCTURE    TextFont,MN_SIZE ; reply message for font removal
  73.                 ; font name in LN_NAME    \ used in this
  74.     UWORD   tf_YSize        ; font height        | order to best
  75.     UBYTE   tf_Style        ; font style        | match a font
  76.     UBYTE   tf_Flags        ; preference attributes    / request.
  77.     UWORD   tf_XSize        ; nominal font width
  78.     UWORD   tf_Baseline        ; distance from the top of char to baseline
  79.     UWORD   tf_BoldSmear    ; smear to affect a bold enhancement
  80.  
  81.     UWORD   tf_Accessors    ; access count
  82.  
  83.     UBYTE   tf_LoChar        ; the first character described here
  84.     UBYTE   tf_HiChar        ; the last character described here
  85.     APTR    tf_CharData        ; the bit character data
  86.  
  87.     UWORD   tf_Modulo        ; the row modulo for the strike font data
  88.     APTR    tf_CharLoc        ; ptr to location data for the strike font
  89.                 ;   2 words: bit offset then size
  90.     APTR    tf_CharSpace    ; ptr to words of proportional spacing data
  91.     APTR    tf_CharKern        ; ptr to words of kerning data
  92.     LABEL   tf_SIZEOF
  93.  
  94. tf_Extension    EQU    MN_REPLYPORT
  95.  
  96. ;------    tfe_Flags0 (partial definition) ------------------------------
  97.     BITDEF  TE0,NOREMFONT,0    ; disallow RemFont for this font
  98.  
  99.  STRUCTURE    TextFontExtension,0    ; this structure is read-only
  100.     UWORD   tfe_MatchWord    ; a magic cookie for the extension
  101.     UBYTE   tfe_Flags0        ; (system private flags)
  102.     UBYTE   tfe_Flags1        ; (system private flags)
  103.     APTR    tfe_BackPtr        ; validation of compilation
  104.     APTR    tfe_OrigReplyPort    ; original value in tf_Extension
  105.     APTR    tfe_Tags        ; Text Tags for the font
  106.     APTR    tfe_OFontPatchS    ; (system private use)
  107.     APTR    tfe_OFontPatchK    ; (system private use)
  108.     ; this space is reserved for future expansion
  109.     LABEL   tfe_SIZEOF        ; (but allocated only by the system)
  110.  
  111.  
  112. *******    ColorTextFont node *******************************************
  113. ;------    ctf_Flags ----------------------------------------------------
  114. CT_COLORFONT    EQU    $0001    ; color map contains designer's colors
  115. CT_GREYFONT    EQU    $0002    ; color map describes even-stepped brightnesses
  116.                 ; from low to high
  117. CT_ANTIALIAS    EQU    $0004    ; zero background thru fully saturated char
  118.  
  119.     BITDEF    CT,MAPCOLOR,0    ; map ctf_FgColor to the rp_FgPen if the former
  120.                 ; is a valid color within ctf_Low..ctf_High
  121.  
  122. ;------ ColorFontColors ----------------------------------------------
  123.  STRUCTURE    ColorFontColors,0
  124.     UWORD   cfc_Reserved    ; must be zero
  125.     UWORD   cfc_Count        ; number of entries in cfc_ColorTable
  126.     APTR    cfc_ColorTable    ; 4 bit per component color map packed xRGB
  127.     LABEL   cfc_SIZEOF
  128.  
  129. ;------    ColorTextFont ------------------------------------------------
  130.  STRUCTURE    ColorTextFont,tf_SIZEOF
  131.     UWORD   ctf_Flags        ; extended flags
  132.     UBYTE   ctf_Depth        ; number of bit planes
  133.     UBYTE   ctf_FgColor        ; color that is remapped to FgPen
  134.     UBYTE   ctf_Low        ; lowest color represented here
  135.     UBYTE   ctf_High        ; highest color represented here
  136.     UBYTE   ctf_PlanePick    ; PlanePick ala Images
  137.     UBYTE   ctf_PlaneOnOff    ; PlaneOnOff ala Images
  138.     APTR    ctf_ColorFontColors    ; struct ColorFontColors * for font
  139.     STRUCT  ctf_CharData,8*4    ; pointers to bit planes ala tf_CharData
  140.     LABEL   ctf_SIZEOF
  141.  
  142. ******* TextExtent node **********************************************
  143.  STRUCTURE    TextExtent,0
  144.     UWORD   te_Width        ; same as TextLength
  145.     UWORD   te_Height        ; same as tf_YSize
  146.     STRUCT  te_Extent,8        ; WORD MinX, MinY, MaxX, MaxY relative to CP
  147.     LABEL   te_SIZEOF
  148.  
  149.     ENDC    ; GRAPHICS_TEXT_I
  150.