19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20 *
21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22 * or visit www.oracle.com if you need additional information or have any
23 * questions.
24 *
25 */
26
27 /*
28 * (C) Copyright IBM Corp. 1999, All rights reserved.
29 */
30
31 package sun.font;
32
33 import java.awt.Font;
34 import java.awt.GraphicsEnvironment;
35 import java.awt.font.TextAttribute;
36 import java.text.AttributedCharacterIterator;
37 import java.util.ArrayList;
38 import java.util.Map;
39 import sun.text.CodePointIterator;
40
41 /**
42 * This class maps an individual character to a Font family which can
43 * display it. The character-to-Font mapping does not depend on the
44 * character's context, so a particular character will be mapped to the
45 * same font family each time.
46 * <p>
47 * Typically, clients will call getIndexFor(char) for each character
48 * in a style run. When getIndexFor() returns a different value from
49 * ones seen previously, the characters up to that point will be assigned
50 * a font obtained from getFont().
51 */
52 public final class FontResolver {
53
54 // An array of all fonts available to the runtime. The fonts
55 // will be searched in order.
56 private Font[] allFonts;
57 private Font[] supplementaryFonts;
58 private int[] supplementaryIndices;
59
|
19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20 *
21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22 * or visit www.oracle.com if you need additional information or have any
23 * questions.
24 *
25 */
26
27 /*
28 * (C) Copyright IBM Corp. 1999, All rights reserved.
29 */
30
31 package sun.font;
32
33 import java.awt.Font;
34 import java.awt.GraphicsEnvironment;
35 import java.awt.font.TextAttribute;
36 import java.text.AttributedCharacterIterator;
37 import java.util.ArrayList;
38 import java.util.Map;
39
40 /**
41 * This class maps an individual character to a Font family which can
42 * display it. The character-to-Font mapping does not depend on the
43 * character's context, so a particular character will be mapped to the
44 * same font family each time.
45 * <p>
46 * Typically, clients will call getIndexFor(char) for each character
47 * in a style run. When getIndexFor() returns a different value from
48 * ones seen previously, the characters up to that point will be assigned
49 * a font obtained from getFont().
50 */
51 public final class FontResolver {
52
53 // An array of all fonts available to the runtime. The fonts
54 // will be searched in order.
55 private Font[] allFonts;
56 private Font[] supplementaryFonts;
57 private int[] supplementaryIndices;
58
|