164 // protected boolean hintsTabledChecked = false;
165 // protected boolean containsHintsTable = false;
166
167 /* These fields are set from os/2 table info. */
168 private boolean supportsJA;
169 private boolean supportsCJK;
170
171 /* These are for faster access to the name of the font as
172 * typically exposed via API to applications.
173 */
174 private Locale nameLocale;
175 private String localeFamilyName;
176 private String localeFullName;
177
178 /**
179 * - does basic verification of the file
180 * - reads the header table for this font (within a collection)
181 * - reads the names (full, family).
182 * - determines the style of the font.
183 * - initializes the CMAP
184 * @throws FontFormatException - if the font can't be opened
185 * or fails verification, or there's no usable cmap
186 */
187 public TrueTypeFont(String platname, Object nativeNames, int fIndex,
188 boolean javaRasterizer)
189 throws FontFormatException {
190 super(platname, nativeNames);
191 useJavaRasterizer = javaRasterizer;
192 fontRank = Font2D.TTF_RANK;
193 try {
194 verify();
195 init(fIndex);
196 } catch (Throwable t) {
197 close();
198 if (t instanceof FontFormatException) {
199 throw (FontFormatException)t;
200 } else {
201 throw new FontFormatException("Unexpected runtime exception.");
202 }
203 }
204 Disposer.addObjectRecord(this, disposerRecord);
|
164 // protected boolean hintsTabledChecked = false;
165 // protected boolean containsHintsTable = false;
166
167 /* These fields are set from os/2 table info. */
168 private boolean supportsJA;
169 private boolean supportsCJK;
170
171 /* These are for faster access to the name of the font as
172 * typically exposed via API to applications.
173 */
174 private Locale nameLocale;
175 private String localeFamilyName;
176 private String localeFullName;
177
178 /**
179 * - does basic verification of the file
180 * - reads the header table for this font (within a collection)
181 * - reads the names (full, family).
182 * - determines the style of the font.
183 * - initializes the CMAP
184 * @throws FontFormatException if the font can't be opened
185 * or fails verification, or there's no usable cmap
186 */
187 public TrueTypeFont(String platname, Object nativeNames, int fIndex,
188 boolean javaRasterizer)
189 throws FontFormatException {
190 super(platname, nativeNames);
191 useJavaRasterizer = javaRasterizer;
192 fontRank = Font2D.TTF_RANK;
193 try {
194 verify();
195 init(fIndex);
196 } catch (Throwable t) {
197 close();
198 if (t instanceof FontFormatException) {
199 throw (FontFormatException)t;
200 } else {
201 throw new FontFormatException("Unexpected runtime exception.");
202 }
203 }
204 Disposer.addObjectRecord(this, disposerRecord);
|