home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Source Code 1993 July / THE_SOURCE_CODE_CD_ROM.iso / X / mit / fonts / server / MacFS / OutlineCalls.h < prev    next >
Encoding:
C/C++ Source or Header  |  1991-07-29  |  3.3 KB  |  102 lines

  1. /***********************************************************************
  2. Copyright 1991 by Apple Computer, Inc, Cupertino, California
  3.             All Rights Reserved
  4.  
  5. Permission to use, copy, modify, and distribute this software
  6. for any purpose and without fee is hereby granted, provided
  7. that the above copyright notice appear in all copies.
  8.  
  9. APPLE MAKES NO WARRANTY OR REPRESENTATION, EITHER EXPRESS,
  10. OR IMPLIED, WITH RESPECT TO THIS SOFTWARE, ITS QUALITY,
  11. PERFORMANCE, MERCHANABILITY, OR FITNESS FOR A PARTICULAR
  12. PURPOSE. AS A RESULT, THIS SOFTWARE IS PROVIDED "AS IS,"
  13. AND YOU THE USER ARE ASSUMING THE ENTIRE RISK AS TO ITS
  14. QUALITY AND PERFORMANCE. IN NO EVENT WILL APPLE BE LIABLE 
  15. FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL
  16. DAMAGES RESULTING FROM ANY DEFECT IN THE SOFTWARE.
  17.  
  18. THE WARRANTY AND REMEDIES SET FORTH ABOVE ARE EXCLUSIVE
  19. AND IN LIEU OF ALL OTHERS, ORAL OR WRITTEN, EXPRESS OR
  20. IMPLIED.
  21.  
  22. ***********************************************************************/
  23. /**********/
  24. /* ERRORS */
  25. /**********/
  26. #define BITFONT_ERR                    0x8099                /* Outline metrics was called with a bitmap font */
  27.  
  28. #define IS_OUTLINE                    0x0000        
  29. #define SET_OUTLINEPREFERRED        0x0001
  30.  
  31. #define OUTLINE_METRICS                0x0008
  32. #define GET_OUTLINEPREFERRED        0x0009
  33. #define SET_PRESERVE_GLYPHS            0x000a
  34. #define GET_PRESERVE_GLYPHS            0x000b
  35. #define FLUSH_FONTS                    0x000c
  36.  
  37.  
  38. /*                        Boolean IsOutline
  39. **
  40. **    IsOutline indicates whether or not the current grafport setting
  41. **    with the numer and denom loads a Spline Font.  FMSwapFont is called
  42. **    from inside of this function.
  43. **
  44. */
  45. extern pascal Boolean IsOutline(Point numer, Point denom)
  46.     = {0x7000 + IS_OUTLINE,0xA854};
  47.  
  48. /*                        SetOutlinePreferred
  49. **
  50. **    Sets a mode to choose a matching spline font over an exact bitmap match.
  51. **
  52. */
  53. extern pascal SetOutlinePreferred(Boolean outlinePreferred)
  54.     = {0x7000 + SET_OUTLINEPREFERRED,0xA854};
  55.  
  56. /*                        Boolean GetOutlinePreferred
  57. **
  58. **    Gets the state of the OutlinePreferred flag.
  59. **
  60. */
  61. extern pascal Boolean GetOutlinePreferred()
  62.     = {0x7000 + GET_OUTLINEPREFERRED,0xA854};
  63.  
  64. /*                        OSErr OutlineMetrics
  65. **
  66. **    Uses count, textPtr, numer and denom with the current grafport to
  67. **    load a spline font and return yMax, yMin, advance widths, left side bearings and
  68. **    Rects.  A nil is passed for metrics not wanted.
  69. **
  70. */
  71. extern pascal OSErr OutlineMetrics(    short count, Ptr textPtr, Point numer, Point denom,
  72.                                     short *yMax, short *yMin, Fixed *awArray, Fixed *lsbArray, Rect *boundsArray)
  73.     = {0x7000 + OUTLINE_METRICS,0xA854};
  74.  
  75. /*                        SetPreserveGlyph
  76. **
  77. **    Sets a line height state specifying that all bits of the spline font bitmaps
  78. **    should be blitted (e.g., characters above the ascender or chars below the descender).
  79. **    Otherwise, squash the character to fit into the ascender and descender.
  80. **    Set the flag true if all bits should be blitted outside of the line height.  
  81. **    Set false if characters that go outside line height should be squashed.
  82. **
  83. */
  84. extern pascal SetPreserveGlyph(Boolean preserveGlyphs)
  85.     = {0x7000 + SET_PRESERVE_GLYPHS,0xA854};
  86.  
  87. /*                        GetPreserveGlyph
  88. **
  89. **    Gets the mode of the state of preserving glyphs.
  90. **
  91. */
  92. extern pascal Boolean GetPreserveGlyph()
  93.     = {0x7000 + GET_PRESERVE_GLYPHS,0xA854};
  94.  
  95. /*                        FlushFonts
  96. **
  97. **    FlushFonts flushed the font managers caches (i.e., width tables, sfnt caches)
  98. **
  99. */
  100. extern pascal OSErr FlushFonts()
  101.     = {0x7000 + FLUSH_FONTS,0xA854};
  102.