home *** CD-ROM | disk | FTP | other *** search
/ Amiga ISO Collection / AmigaUtilCD2.iso / Programming / Misc / OB3.2D3.DMS / in.adf / Interfaces / DiskFont.mod < prev    next >
Encoding:
Text File  |  1993-05-23  |  20.4 KB  |  488 lines

  1. (*-------------------------------------------------------------------------*)
  2. (*                                                                         *)
  3. (*  Amiga Oberon Interface Module:                    Date: 02-Nov-92      *)
  4. (*                                                                         *)
  5. (*   © 1992 by Fridtjof Siebert                                            *)
  6. (*   updated for V39 by hartmut Goebel                                     *)
  7. (*                                                                         *)
  8. (*-------------------------------------------------------------------------*)
  9.  
  10. MODULE DiskFont;
  11.  
  12. IMPORT e * := Exec,
  13.        g * := Graphics,
  14.        I * := Intuition,
  15.        u * := Utility;
  16.  
  17. CONST
  18.   maxFontPath * = 256;    (* including null terminator *)
  19.   diskfontName * = "diskfont.library";
  20.  
  21. TYPE
  22.   FontContentsPtr * = UNTRACED POINTER TO FontContents;
  23.   FontContents * = STRUCT
  24.     fileName * : ARRAY maxFontPath OF CHAR;
  25.     ySize * : INTEGER;
  26.     style * : SHORTSET;
  27.     flags * : SHORTSET;
  28.   END;
  29.  
  30.  
  31.   TFontContentsPtr * = UNTRACED POINTER TO TFontContents;
  32.   TFontContents * = STRUCT
  33.     fileName * : ARRAY maxFontPath-2 OF CHAR;
  34.     tagCount * : INTEGER;
  35.     (*
  36.      *  if tfc_TagCount is non-zero, tfc_FileName is overlayed with
  37.      *  Text Tags starting at:  (struct TagItem * )
  38.      *      &tfc_FileName[MAXFONTPATH-(tfc_TagCount*sizeof(struct TagItem))]
  39.      *)
  40.     ySize * : INTEGER;
  41.     style * : SHORTSET;
  42.     flags * : SHORTSET;
  43.   END;
  44.  
  45. CONST
  46.   fchId     * = 00F00H;  (* FontContentsHeader, then FontContents *)
  47.   tfchId    * = 00F02H;  (* FontContentsHeader, then TFontContents *)
  48.   ofchID    * = 00F03H;  (* FontContentsHeader, then TFontContents,
  49.                           * associated with outline font *)
  50.  
  51. TYPE
  52.   FontContentsHeaderPtr * = UNTRACED POINTER TO FontContentsHeader;
  53.   FontContentsHeader * = STRUCT
  54.     fileID * : INTEGER;         (* FCH_ID *)
  55.     numEntries * : INTEGER;     (* the number of FontContents elements *)
  56.  (* fc  * : ARRAY numEntries OF FontContents or
  57.     tfc * : ARRAY numEntries OF TFontContents    *)
  58.   END;
  59.  
  60. CONST
  61.  
  62.   dfhId       * = 00F80H;
  63.   maxFontName * = 32;     (* font name including ".font\0" *)
  64.  
  65. TYPE
  66.   DiskFontHeaderPtr * = UNTRACED POINTER TO DiskFontHeader;
  67.   DiskFontHeader * = STRUCT (df * : e.Node)  (* node to link disk fonts *)
  68.     (* the following 8 bytes are not actually considered a part of the  *)
  69.     (* DiskFontHeader, but immediately preceed it. The NextSegment is   *)
  70.     (* supplied by the linker/loader, and the ReturnCode is the code    *)
  71.     (* at the beginning of the font in case someone runs it...          *)
  72.     (*   ULONG dfh_NextSegment;                 \* actually a BPTR      *)
  73.     (*   ULONG dfh_ReturnCode;                  \* MOVEQ #0,D0 : RTS    *)
  74.     (* here then is the official start of the DiskFontHeader...         *)
  75.     fileID   * : INTEGER;        (* DFH_ID *)
  76.     revision * : INTEGER;        (* the font revision *)
  77.     segment  * : e.BPTR;         (* the segment address when loaded *)
  78.     name     * : ARRAY maxFontName OF CHAR; (* the font name (null terminated) *)
  79.     tf       * : g.TextFont;     (* loaded TextFont structure *)
  80.   END;
  81.  
  82. (* unfortunately, this needs to be explicitly typed *)
  83. (* used only if dfh_TF.tf_Style FSB_TAGGED bit is set *)
  84. (*#define dfh_TagList     dfh_Segment     (* destroyed during loading *)*)
  85.  
  86.  
  87. CONST
  88.   memory  * = 0;
  89.   disk    * = 1;
  90.   scaled  * = 2;
  91.   bitmap  * = 3;
  92.  
  93.   tagged  * = 16;  (* return TAvailFont *)
  94.  
  95. TYPE
  96.   AvailFontPtr * = UNTRACED POINTER TO AvailFont;
  97.   AvailFont * = STRUCT
  98.     type * : SET;            (* MEMORY, DISK, or SCALED *)
  99.     attr * : g.TextAttr;     (* text attributes for font *)
  100.   END;
  101.  
  102.   TAvailFontPtr * = UNTRACED POINTER TO TAvailFont;
  103.   TAvailFont * = STRUCT
  104.     type * : SET;          (* MEMORY, DISK, or SCALED *)
  105.     attr * : g.TTextAttr;  (* text attributes for font *)
  106.   END;
  107.  
  108.   AvailFontsHeaderPtr * = UNTRACED POINTER TO AvailFontsHeader;
  109.   AvailFontsHeader * = STRUCT
  110.     numEntries * : INTEGER;      (* number of AvailFont elements *)
  111.  (* af  * : ARRAY numEntries OF AvailFont or
  112.     taf * : ARRAY numEntries OF TAvailFont   *)
  113.   END;
  114.  
  115. (* ---------------------------------------------------------------- *)
  116. CONST
  117.  
  118. (* Level 0 entries never appear in the .otag tag list, but appear in font
  119.  * specifications *)
  120.   level0 * =      u.user;
  121. (* Level 1 entries are required to exist in the .otag tag list *)
  122.   level1 * =      u.user + 1000H;
  123. (* Level 2 entries are optional typeface metric tags *)
  124.   level2 * =      u.user + 2000H;
  125. (* Level 3 entries are required for some OT_Engines *)
  126.   level3 * =      u.user + 3000H;
  127. (* Indirect entries are at (tag address + data offset) *)
  128.   indirect * =    08000H;
  129.  
  130.  
  131. (********************************************************************)
  132. (* font specification and inquiry tags *)
  133.  
  134. (* !  tags flagged with an exclaimation mark are valid for
  135.  *    specification.
  136.  *  ? tags flagged with a question mark are valid for inquiry
  137.  *
  138.  * fixed binary numbers are encoded as 16 bits of integer and
  139.  * 16 bits of fraction.  Negative values are indicated by twos
  140.  * complement of all 32 bits.
  141.  *)
  142.  
  143. (* !  OT_DeviceDPI specifies the target device dots per inch -- X DPI is
  144.  *    in the high word, Y DPI in the low word. *)
  145.   deviceDPI * =   level0 + 001H;      (* == TA_DeviceDPI *)
  146.  
  147. (* !  OT_DotSize specifies the target device dot size as a percent of
  148.  *    it's resolution-implied size -- X percent in high word, Y percent
  149.  *    in low word. *)
  150.   dotSize * =     level0 + 002H;
  151.  
  152. (* !  OT_PointHeight specifies the requested point height of a typeface,
  153.  *    specifically, the height and nominal width of the em-square.
  154.  *    The point referred to here is 1/72".  It is encoded as a fixed
  155.  *    binary number. *)
  156.   pointHeight * = level0 + 008H;
  157.  
  158. (* !  OT_SetFactor specifies the requested set width of a typeface.
  159.  *    It distorts the width of the em-square from that specified by
  160.  *    OT_PointHeight.  To compensate for a device with different
  161.  *    horizontal and vertical resolutions, OT_DeviceDPI should be used
  162.  *    instead.  For a normal aspect ratio, set to 1.0 (encoded as
  163.  *    0x00010000.  This is the default value. *)
  164.   setFactor * =   level0 + 009H;
  165.  
  166. (* !  OT_Shear... specifies the Sine and Cosine of the vertical stroke
  167.  *    angle, as two fixed point binary fractions.  Both must be specified:
  168.  *    first the Sine and then the Cosine.  Setting the sine component
  169.  *    changes the Shear to an undefined value, setting the cosine
  170.  *    component completes the Shear change to the new composite value.
  171.  *    For no shear, set to 0.0, 1.0 (encoded as 000000000, 0x00010000).
  172.  *    This is the default value. *)
  173.   shearSin * =    level0 + 00AH;
  174.   shearCos * =    level0 + 00BH;
  175.  
  176. (* !  OT_Rotate... specifies the Sine and Cosine of the baselin rotation
  177.  *    angle, as two fixed point binary fractions.  Both must be specified:
  178.  *    first the Sine and then the Cosine.  Setting the sine component
  179.  *    changes the Shear to an undefined value, setting the cosine
  180.  *    component completes the Shear change to the new composite value.
  181.  *    For no shear, set to 0.0, 1.0 (encoded as 0x00000000, 0x00010000).
  182.  *    This is the default value. *)
  183.   rotateSin * =   level0 + 00CH;
  184.   rotateCos * =   level0 + 00DH;
  185.  
  186. (* !  OT_Embolden... specifies values to algorithimically embolden -- or,
  187.  *    when negative, lighten -- the glyph.  It is encoded as a fixed point
  188.  *    binary fraction of the em-square.  The X and Y components can be
  189.  *    changed indendently.  For normal characters, set to 0.0, 0.0
  190.  *    (encoded as 0x00000000, 0x00000000).  This is the default value. *)
  191.   emboldenX * =   level0 + 00EH;
  192.   emboldenY * =   level0 + 00FH;
  193.  
  194. (* !  OT_PointSize is an old method of specifying the point size,
  195.  *    encoded as (points * 16). *)
  196.   pointSize * =   level0 + 010H;
  197.  
  198. (* !  OT_GlyphCode specifies the glyph (character) code to use with
  199.  *    subsequent operations.  For example, this is the code for an
  200.  *    OT_Glyph inquiry *)
  201.   glyphCode * =   level0 + 011H;
  202.  
  203. (* !  OT_GlyphCode2 specifies the second glyph code.  For example,
  204.  *    this is the right glyph of the two glyphs of an OT_KernPair
  205.  *    inquiry *)
  206.   glyphCode2 * =  level0 + 012H;
  207.  
  208. (* !  OT_GlyphWidth specifies a specific width for a glyph.
  209.  *    It sets a specific escapement (advance) width for subsequent
  210.  *    glyphs.  It is encoded as a fixed binary fraction of the em-square.
  211.  *    To revert to using the font-defined escapement for each glyph, set
  212.  *    to 0.0 (encoded as 0x00000000).  This is the default value. *)
  213.   glyphWidth * =  level0 + 013H;
  214.  
  215. (* !  OT_OTagPath and
  216.  * !  OT_OTagList specify the selected typeface.  Both must be specified:
  217.  *    first the Path and then the List.  Setting the path name changes
  218.  *    changes the typeface to an undefined value, providing the List
  219.  *    completes the typeface selection to the new typeface.  OTagPath
  220.  *    is the null terminated full file path of the .otag file associated
  221.  *    with the typeface.  OTagList is a memory copy of the processed
  222.  *    contents of that .otag file (i.e. with indirections resolved).
  223.  *    There are no default values for the typeface. *)
  224.   oTagPath * =    level0 + indirect + 014H;
  225.   oTagList * =    level0 + indirect + 015H;
  226.  
  227. (*  ? OT_GlyphMap supplies a read-only struct GlyphMap pointer that
  228.  *    describes a bitmap for a glyph with the current attributes. *)
  229.   glyphMap * =    level0 + indirect + 020H;
  230.  
  231. (*  ? OT_WidthList supplies a read-only struct MinList of struct
  232.  *    GlyphWidthEntry nodes for glyphs that are defined from GlyphCode
  233.  *    to GlyphCode2, inclusive.  The widths are represented as fixed
  234.  *    binary fractions of the em-square, ignoring any effect of
  235.  *    SetFactor or GlyphWidth.  A width would need to be converted to
  236.  *    a distance along the baseline in device units by the
  237.  *    application. *)
  238.   widthList * =   level0 + indirect + 021H;
  239.  
  240. (*  ? OT_...KernPair supplies the kern adjustment to be added to the
  241.  *    current position after placement of the GlyphCode glyph and
  242.  *    before placement of the GlyphCode2 glyph.  Text kern pairs are
  243.  *    for rendering body text.  Display kern pairs are generally
  244.  *    tighter values for display (e.g. headline) purposes.  The
  245.  *    adjustment is represented as a fixed binary fraction of the
  246.  *    em-square, ignoring any effect of SetFactor.  This number would
  247.  *    need to be converted to a distance along the baseline in device
  248.  *    units by the application. *)
  249.   textKernPair   * = level0 + indirect + 022H;
  250.   designKernPair * = level0 + indirect + 023H;
  251.  
  252. (*  ? OT_Underlined is an unsigned word which is used to request
  253.  *    algorithimic underlining for the engine when rendering the glyph.
  254.  *    Bullet.library currently does not support this tag, though it
  255.  *    may be used by other engines in the future.  The default for
  256.  *    any engine which supports this tag must be OTUL_None.  Engines which
  257.  *    do not support this tag should return an appropriate OTERR value.
  258.  *
  259.  *    As of V39, diskfont.library will request underlining if specified
  260.  *    in the TextAttr, or TTextAttr passed to OpenDiskFont().  Diskfont
  261.  *    will first request Broken underlining (like the Text() function
  262.  *    does when SetSoftStyle() is used), and then Solid underlining if
  263.  *    the engine returns an error.  If the engine returns an error for
  264.  *    both, then diskfont.library attempts to find, or create the best
  265.  *    non-underlined font that it can. *)
  266.   underLined * =          level0 + 024H;
  267.  
  268.   ulNone           * = 0;
  269.   ulSolid          * = 1;
  270.   ulBroken         * = 2;
  271.   ulDoubleSolid    * = 3;
  272.   outlDoubleBroken * = 4;
  273.  
  274. (*  ? OT_StrikeThrough is a boolean which is used to request
  275.  *    algorithimic strike through when rendering the glyph.
  276.  *    Bullet.library currently does not support this tag, though it
  277.  *    may be used by other engines in the future.  The default for
  278.  *    any engined which supports this tag must be FALSE.  Engines which
  279.  *    do not support this tag should return an appropriate OTERR value. *)
  280.   strikeThrough * =       level0 + 025H;
  281.  
  282.  
  283. (********************************************************************)
  284. (* .otag tags *)
  285.  
  286. (* suffix for files in FONTS: that contain these tags *)
  287.   suffix  * = ".otag";
  288.  
  289. (* OT_FileIdent both identifies this file and verifies its size.
  290.  * It is required to be the first tag in the file. *)
  291.   fileIdent * =   level1 + 001H;
  292.  
  293. (* OT_Engine specifies the font engine this file is designed to use *)
  294.   engine  * =     level1 + indirect + 002H;
  295.   eBullet * =     "bullet";
  296.  
  297. (* OT_Family is the family name of this typeface *)
  298.   family * =      level1 + indirect + 003H;
  299.  
  300. (* The name of this typeface is implicit in the name of the .otag file *)
  301. (* OT_BName is used to find the bold variant of this typeface *)
  302.   bName * =       level2 + indirect + 005H;
  303. (* OT_IName is used to find the italic variant of this typeface *)
  304.   iName * =       level2 + indirect + 006H;
  305. (* OT_BIName is used to find the bold italic variant of this typeface *)
  306.   biName * =      level2 + indirect + 007H;
  307.  
  308. (* OT_SymSet is used to select the symbol set that has the OT_YSizeFactor
  309.  * described here.  Other symbol sets might have different extremes *)
  310.   symbolSet * =   level1 + 010H;
  311.  
  312. (* OT_YSizeFactor is a ratio to assist in calculating the Point height
  313.  * to BlackHeight relationship -- high word: Point height term, low
  314.  * word: Black height term -- pointSize = ysize*<high>/<low> *)
  315.   ySizeFactor * = level1 + 011H;
  316.  
  317. (* OT_SpaceWidth specifies the width of the space character relative
  318.  * to the character height *)
  319.   spaceWidth * =  level2 + 012H;
  320.  
  321. (* OT_IsFixed is a boolean indicating that all the characters in the
  322.  * typeface are intended to have the same character advance *)
  323.   isFixed * =     level2 + 013H;
  324.  
  325. (* OT_SerifFlag is a boolean indicating if the character has serifs *)
  326.   serifFlag * =   level1 + 014H;
  327.  
  328. (* OT_StemWeight is an unsigned byte indicating the weight of the character *)
  329.   stemWeight * =  level1 + 015H;
  330.  
  331.   sUltraThin  * = 8;   (*   0- 15 *)
  332.   sExtraThin  * = 24;  (*  16- 31 *)
  333.   sThin       * = 40;  (*  32- 47 *)
  334.   sExtraLight * = 56;  (*  48- 63 *)
  335.   sLight      * = 72;  (*  64- 79 *)
  336.   sDemiLight  * = 88;  (*  80- 95 *)
  337.   sSemiLight  * = 104; (*  96-111 *)
  338.   sBook       * = 120; (* 112-127 *)
  339.   sMedium     * = 136; (* 128-143 *)
  340.   sSemiBold   * = 152; (* 144-159 *)
  341.   sDemiBold   * = 168; (* 160-175 *)
  342.   sBold       * = 184; (* 176-191 *)
  343.   sExtraBold  * = 200; (* 192-207 *)
  344.   sBlack      * = 216; (* 208-223 *)
  345.   sExtraBlack * = 232; (* 224-239 *)
  346.   sUltraBlack * = 248; (* 240-255 *)
  347.  
  348. (* OT_SlantStyle is an unsigned byte indicating the font posture *)
  349.   slantStyle * =  level1 + 016H;
  350.   sUpright    * = 0;
  351.   sItalic     * = 1;       (* Oblique, Slanted, etc. *)
  352.   sLeftItalic * = 2;       (* Reverse Slant *)
  353.  
  354. (* OT_HorizStyle is an unsigned byte indicating the appearance width *)
  355.   horizStyle       * = level1 + 017H;
  356.   hUltraCompressed * = 16;     (*   0- 31 *)
  357.   hExtraCompressed * = 48;     (*  32- 63 *)
  358.   hCompressed      * = 80;     (*  64- 95 *)
  359.   hCondensed       * = 112;    (*  96-127 *)
  360.   hNormal          * = 144;    (* 128-159 *)
  361.   hSemiExpanded    * = 176;    (* 160-191 *)
  362.   hExpanded        * = 208;    (* 192-223 *)
  363.   hExtraExpanded   * = 240;    (* 224-255 *)
  364.  
  365. (* OT_SpaceFactor specifies the width of the space character relative
  366.  * to the character height *)
  367.   spaceFactor * = level2 + 018H;
  368.  
  369. (* OT_InhibitAlgoStyle indicates which ta_Style bits, if any, should
  370.  * be ignored even if the font does not already have that quality.
  371.  * For example, if FSF_BOLD is set and the typeface is not bold but
  372.  * the user specifies bold, the application or diskfont library is
  373.  * not to use OT_Embolden to achieve a bold result. *)
  374.   inhibitAlgoStyle * = level2 + 019H;
  375.  
  376. (* OT_AvailSizes is an indirect pointer to sorted UWORDs, 0th is count *)
  377.   availSizes    * =  level1 + indirect + 020H;
  378.   maxAvailSizes * =  20;      (* no more than 20 sizes allowed *)
  379.  
  380. (* OT_SpecCount is the count number of parameters specified here *)
  381.   specCount * =   level1 + 0100H;
  382.  
  383. (* Specs can be created as appropriate for the engine by ORing in the
  384.  * parameter number (1 is first, 2 is second, ... up to 15th) *)
  385.   spec * =        level1 + 0100H;
  386. (* OT_Spec1 is the (first) parameter to the font engine to select
  387.  * this particular typeface *)
  388.   spec1 * =       level1 + 0101H;
  389.  
  390.  
  391. (* ---------------------------------------------------------------- *)
  392. TYPE
  393. (*
  394.  *      glyph.h -- structures for glyph libraries
  395.  *)
  396.  
  397. (* A GlyphEngine must be acquired via OpenEngine and is read-only *)
  398.   GlyphEnginePtr * = UNTRACED POINTER TO GlyphEngine;
  399.   GlyphEngine * = STRUCT
  400.     library   * : e.LibraryPtr; (* engine library *)
  401.     name      * : e.STRPTR;     (* library basename: e.g. "bullet" *)
  402.     (* private library data follows... *)
  403.   END;
  404.  
  405.   FIXED * = LONGINT;          (* 32 bit signed w/ 16 bits of fraction *)
  406.  
  407.   GlyphMapPtr * = UNTRACED POINTER TO GlyphMap;
  408.   GlyphMap  * = STRUCT
  409.     bmModulo    * : INTEGER;  (* # of bytes in row: always multiple of 4 *)
  410.     bmRows      * : INTEGER;  (* # of rows in bitmap *)
  411.     blackLeft   * : INTEGER;  (* # of blank pixel columns at left *)
  412.     blackTop    * : INTEGER;  (* # of blank rows at top *)
  413.     blackWidth  * : INTEGER;  (* span of contiguous non-blank columns *)
  414.     blackHeight * : INTEGER;  (* span of contiguous non-blank rows *)
  415.     xOrigin     * : FIXED;    (* distance from upper left corner of bitmap *)
  416.     yOrigin     * : FIXED;    (*   to initial CP, in fractional pixels *)
  417.     x0          * : INTEGER;  (* approximation of XOrigin in whole pixels *)
  418.     y0          * : INTEGER;  (* approximation of YOrigin in whole pixels *)
  419.     x1          * : INTEGER;  (* approximation of XOrigin + Width *)
  420.     y1          * : INTEGER;  (* approximation of YOrigin + Width *)
  421.     width       * : FIXED;    (* character advance, as fraction of em width *)
  422.     bitMap      * : e.APTR;   (* actual glyph bitmap *)
  423.   END;
  424.  
  425.   GlyphWidthEntryPtr * = UNTRACED POINTER TO GlyphWidthEntry;
  426.   GlyphWidthEntry * = STRUCT (node: e.MinNode);
  427.                               (* on list returned by OT_WidthList inquiry *)
  428.     code  * : INTEGER;        (* entry's character code value *)
  429.     width * : FIXED;          (* character advance, as fraction of em width *)
  430.   END;
  431.  
  432. (* ---------------------------------------------------------------- *)
  433. CONST
  434. (*
  435.  *      oterrors.h -- error results from outline libraries
  436.  *)
  437.  
  438. (* PRELIMINARY *)
  439.   errFailure * =          -1;      (* catch-all for error *)
  440.   errSuccess * =          0;       (* no error *)
  441.   errBadTag * =           1;       (* inappropriate tag for function *)
  442.   errUnknownTag * =       2;       (* unknown tag for function *)
  443.   errBadData * =          3;       (* catch-all for bad tag data *)
  444.   errNoMemory * =         4;       (* insufficient memory for operation *)
  445.   errNoFace * =           5;       (* no typeface currently specified *)
  446.   errBadFace * =          6;       (* typeface specification problem *)
  447.   errNoGlyph * =          7;       (* no glyph specified *)
  448.   errBadGlyph * =         8;       (* bad glyph code or glyph range *)
  449.   errNoShear * =          9;       (* shear only partially specified *)
  450.   errNoRotate * =         10;      (* rotate only partially specified *)
  451.   errTooSmall * =         11;      (* typeface metrics yield tiny glyphs *)
  452.   errUnknownGlyph * =     12;      (* glyph not known by engine *)
  453.  
  454. (* ---------------------------------------------------------------- *)
  455.  
  456. VAR
  457.   base * : e.LibraryPtr;
  458.  
  459. PROCEDURE OpenDiskFont       *{base,- 30}(VAR textAttr{8}     : g.TextAttr): g.TextFontPtr;
  460. PROCEDURE AvailFonts         *{base,- 36}(VAR buffer{8}       : ARRAY OF e.BYTE;
  461.                                           long{0}             : LONGINT;
  462.                                           flags{1}            : LONGSET): LONGSET;
  463. (* ---   functions in V34 or higher  (distributed as Release 1.3)   --- *)
  464. (* --- REMEMBER: You are to check the version BEFORE you use this ! --- *)
  465. PROCEDURE NewFontContents    *{base,- 42}(fontsLock{8}        : e.BPTR;
  466.                                           fontName{9}         : ARRAY OF CHAR): FontContentsHeaderPtr;
  467. PROCEDURE DisposeFontContents*{base,- 48}(fontConstentsHeader{9} : FontContentsHeaderPtr);
  468. (* ---   functions in V36 or higher  (distributed as Release 2.0)   --- *)
  469. (* --- REMEMBER: You are to check the version BEFORE you use this ! --- *)
  470. PROCEDURE NewScaledDiskFont  *{base,- 54}(sourceFont{8}       : g.TextFontPtr;
  471.                                           VAR destTextAttr{9} : g.TextAttr): DiskFontHeaderPtr;
  472.  
  473.  
  474. (* $OvflChk- $RangeChk- $StackChk- $NilChk- $ReturnChk- $CaseChk- *)
  475.  
  476. BEGIN
  477.   base :=  e.OpenLibrary(diskfontName,33);
  478.   IF base=NIL THEN
  479.     IF I.DisplayAlert(0,"\x00\x64\x14missing diskfont.library!\o\o",50) THEN END;
  480.     HALT(0)
  481.   END;
  482.  
  483. CLOSE
  484.   IF base#NIL THEN e.CloseLibrary(base) END;
  485.  
  486. END DiskFont.
  487.  
  488.