128 }
129 }
130 }
131
132 public static final int FONTFORMAT_NONE = -1;
133 public static final int FONTFORMAT_TRUETYPE = 0;
134 public static final int FONTFORMAT_TYPE1 = 1;
135 public static final int FONTFORMAT_TTC = 2;
136 public static final int FONTFORMAT_COMPOSITE = 3;
137 public static final int FONTFORMAT_NATIVE = 4;
138
139 /* Pool of 20 font file channels chosen because some UTF-8 locale
140 * composite fonts can use up to 16 platform fonts (including the
141 * Lucida fall back). This should prevent channel thrashing when
142 * dealing with one of these fonts.
143 * The pool array stores the fonts, rather than directly referencing
144 * the channels, as the font needs to do the open/close work.
145 */
146 // MACOSX begin -- need to access these in subclass
147 protected static final int CHANNELPOOLSIZE = 20;
148 protected FileFont fontFileCache[] = new FileFont[CHANNELPOOLSIZE];
149 // MACOSX end
150 private int lastPoolIndex = 0;
151
152 /* Need to implement a simple linked list scheme for fast
153 * traversal and lookup.
154 * Also want to "fast path" dialog so there's minimal overhead.
155 */
156 /* There are at exactly 20 composite fonts: 5 faces (but some are not
157 * usually different), in 4 styles. The array may be auto-expanded
158 * later if more are needed, eg for user-defined composites or locale
159 * variants.
160 */
161 private int maxCompFont = 0;
162 private CompositeFont [] compFonts = new CompositeFont[20];
163 private ConcurrentHashMap<String, CompositeFont>
164 compositeFonts = new ConcurrentHashMap<String, CompositeFont>();
165 private ConcurrentHashMap<String, PhysicalFont>
166 physicalFonts = new ConcurrentHashMap<String, PhysicalFont>();
167 private ConcurrentHashMap<String, PhysicalFont>
168 registeredFonts = new ConcurrentHashMap<String, PhysicalFont>();
|
128 }
129 }
130 }
131
132 public static final int FONTFORMAT_NONE = -1;
133 public static final int FONTFORMAT_TRUETYPE = 0;
134 public static final int FONTFORMAT_TYPE1 = 1;
135 public static final int FONTFORMAT_TTC = 2;
136 public static final int FONTFORMAT_COMPOSITE = 3;
137 public static final int FONTFORMAT_NATIVE = 4;
138
139 /* Pool of 20 font file channels chosen because some UTF-8 locale
140 * composite fonts can use up to 16 platform fonts (including the
141 * Lucida fall back). This should prevent channel thrashing when
142 * dealing with one of these fonts.
143 * The pool array stores the fonts, rather than directly referencing
144 * the channels, as the font needs to do the open/close work.
145 */
146 // MACOSX begin -- need to access these in subclass
147 protected static final int CHANNELPOOLSIZE = 20;
148 protected FileFont[] fontFileCache = new FileFont[CHANNELPOOLSIZE];
149 // MACOSX end
150 private int lastPoolIndex = 0;
151
152 /* Need to implement a simple linked list scheme for fast
153 * traversal and lookup.
154 * Also want to "fast path" dialog so there's minimal overhead.
155 */
156 /* There are at exactly 20 composite fonts: 5 faces (but some are not
157 * usually different), in 4 styles. The array may be auto-expanded
158 * later if more are needed, eg for user-defined composites or locale
159 * variants.
160 */
161 private int maxCompFont = 0;
162 private CompositeFont [] compFonts = new CompositeFont[20];
163 private ConcurrentHashMap<String, CompositeFont>
164 compositeFonts = new ConcurrentHashMap<String, CompositeFont>();
165 private ConcurrentHashMap<String, PhysicalFont>
166 physicalFonts = new ConcurrentHashMap<String, PhysicalFont>();
167 private ConcurrentHashMap<String, PhysicalFont>
168 registeredFonts = new ConcurrentHashMap<String, PhysicalFont>();
|