home *** CD-ROM | disk | FTP | other *** search
/ Java 1.2 How-To / JavaHowTo.iso / 3rdParty / jbuilder / unsupported / JDK1.2beta3 / SOURCE / SRC.ZIP / java / awt / font / MultipleMaster.java < prev    next >
Encoding:
Java Source  |  1998-03-20  |  2.8 KB  |  82 lines

  1. /*
  2.  * @(#)MultipleMaster.java    1.11 98/03/18
  3.  *
  4.  * Copyright 1997, 1998 by Sun Microsystems, Inc.,
  5.  * 901 San Antonio Road, Palo Alto, California, 94303, U.S.A.
  6.  * All rights reserved.
  7.  *
  8.  * This software is the confidential and proprietary information
  9.  * of Sun Microsystems, Inc. ("Confidential Information").  You
  10.  * shall not disclose such Confidential Information and shall use
  11.  * it only in accordance with the terms of the license agreement
  12.  * you entered into with Sun.
  13.  */
  14. package java.awt.font;
  15.  
  16. import java.awt.Font;
  17.  
  18. /**
  19.  * This is an interface representing Type 1 Multiple Master fonts.
  20.  * A particular Font object may implement this interface.
  21.  * @version 10 Feb 1997    
  22.  */
  23. public interface MultipleMaster {
  24.  
  25.   /**
  26.    * Returns the number of multiple master design controls.
  27.    * Design axes include things like width, weight and optical scaling.
  28.    */
  29.   public  int getNumDesignAxes();
  30.  
  31.   /**
  32.    * Returns an array of design limits interleaved in the form [from->to]
  33.    * for each axis.  For example,
  34.    * design limits for weight could be from 0.1 to 1.0. The values will be
  35.    * returned in the same order returned by getDesignAxisNames().
  36.    */
  37.   public  float[]  getDesignAxisRanges();
  38.  
  39.   /**
  40.    * Returns an array of default design values for each axis.  For example,
  41.    * the default value for weight could be 1.6. The values will be returned
  42.    * in the same order returned by getDesignAxisNames().
  43.    */
  44.   public  float[]  getDesignAxisDefaults();
  45.  
  46.   /**
  47.    * Returns the name for each design axis. This also determines the order in
  48.    * which the values for each axis will be returned.
  49.    */
  50.   public  String[] getDesignAxisNames();
  51.  
  52.   /**
  53.    * Creates a new instance of a multiple master font based on the design axes
  54.    * values specified by the array. The size of the array
  55.    * must correspond to the value returned from getNumDesignAxes() and the
  56.    * values of the array elements must fall within limits specified by
  57.    * getDesignAxesLimits(). In case of an error, NULL is returned.
  58.    */
  59.   public Font deriveMMFont(float[] axes);
  60.  
  61.   /**
  62.    * Creates a new instance of a multiple master font based on detailed metric
  63.    * information. In case of an error, NULL is returned.
  64.    * @param glyphWidths An array of floats representing the desired width of 
  65.    * each glyph in font space.
  66.    * @param avgStemWidth The average stem width for the overall font in font
  67.    * space.
  68.    * @param typicalCapHeight The height of a typical upper case char.
  69.    * @param typicalXHeight The height of a typical lower case char.
  70.    * @param italicAngle The angle at which the italics lean, in degrees
  71.    * counterclockwise from vertical.
  72.    */
  73.   public Font deriveMMFont(
  74.                    float[] glyphWidths,
  75.                    float avgStemWidth,
  76.                    float typicalCapHeight,
  77.                    float typicalXHeight,
  78.                    float italicAngle);
  79.  
  80.  
  81. }
  82.