1/*
2 *  Licensed to the Apache Software Foundation (ASF) under one or more
3 *  contributor license agreements.  See the NOTICE file distributed with
4 *  this work for additional information regarding copyright ownership.
5 *  The ASF licenses this file to You under the Apache License, Version 2.0
6 *  (the "License"); you may not use this file except in compliance with
7 *  the License.  You may obtain a copy of the License at
8 *
9 *     http://www.apache.org/licenses/LICENSE-2.0
10 *
11 *  Unless required by applicable law or agreed to in writing, software
12 *  distributed under the License is distributed on an "AS IS" BASIS,
13 *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 *  See the License for the specific language governing permissions and
15 *  limitations under the License.
16 */
17/**
18 * @author Ilya S. Okomin
19 * @version $Revision$
20 */
21
22package java.awt.font;
23
24/**
25 * The OpenType interface provides constants and methods for getting instance
26 * data for fonts of type OpenType and TrueType. For more information, see the
27 * <a
28 * href="http://partners.adobe.com/public/developer/opentype/index_spec.html">
29 * OpenType specification</a>.
30 *
31 * @since Android 1.0
32 */
33public interface OpenType {
34
35    /**
36     * The Constant TAG_ACNT indicates corresponding table tag in the Open Type
37     * Specification.
38     */
39    public static final int TAG_ACNT = 1633906292;
40
41    /**
42     * The Constant TAG_AVAR indicates corresponding table tag in the Open Type
43     * Specification.
44     */
45    public static final int TAG_AVAR = 1635148146;
46
47    /**
48     * The Constant TAG_BASE indicates corresponding table tag in the Open Type
49     * Specification.
50     */
51    public static final int TAG_BASE = 1111577413;
52
53    /**
54     * The Constant TAG_BDAT indicates corresponding table tag in the Open Type
55     * Specification.
56     */
57    public static final int TAG_BDAT = 1650745716;
58
59    /**
60     * The Constant TAG_BLOC indicates corresponding table tag in the Open Type
61     * Specification.
62     */
63    public static final int TAG_BLOC = 1651273571;
64
65    /**
66     * The Constant TAG_BSLN indicates corresponding table tag in the Open Type
67     * Specification.
68     */
69    public static final int TAG_BSLN = 1651731566;
70
71    /**
72     * The Constant TAG_CFF indicates corresponding table tag in the Open Type
73     * Specification.
74     */
75    public static final int TAG_CFF = 1128678944;
76
77    /**
78     * The Constant TAG_CMAP indicates corresponding table tag in the Open Type
79     * Specification.
80     */
81    public static final int TAG_CMAP = 1668112752;
82
83    /**
84     * The Constant TAG_CVAR indicates corresponding table tag in the Open Type
85     * Specification.
86     */
87    public static final int TAG_CVAR = 1668702578;
88
89    /**
90     * The Constant TAG_CVT indicates corresponding table tag in the Open Type
91     * Specification.
92     */
93    public static final int TAG_CVT = 1668707360;
94
95    /**
96     * The Constant TAG_DSIG indicates corresponding table tag in the Open Type
97     * Specification.
98     */
99    public static final int TAG_DSIG = 1146308935;
100
101    /**
102     * The Constant TAG_EBDT indicates corresponding table tag in the Open Type
103     * Specification.
104     */
105    public static final int TAG_EBDT = 1161970772;
106
107    /**
108     * The Constant TAG_EBLC indicates corresponding table tag in the Open Type
109     * Specification.
110     */
111    public static final int TAG_EBLC = 1161972803;
112
113    /**
114     * The Constant TAG_EBSC indicates corresponding table tag in the Open Type
115     * Specification.
116     */
117    public static final int TAG_EBSC = 1161974595;
118
119    /**
120     * The Constant TAG_FDSC indicates corresponding table tag in the Open Type
121     * Specification.
122     */
123    public static final int TAG_FDSC = 1717859171;
124
125    /**
126     * The Constant TAG_FEAT indicates corresponding table tag in the Open Type
127     * Specification.
128     */
129    public static final int TAG_FEAT = 1717920116;
130
131    /**
132     * The Constant TAG_FMTX indicates corresponding table tag in the Open Type
133     * Specification.
134     */
135    public static final int TAG_FMTX = 1718449272;
136
137    /**
138     * The Constant TAG_FPGM indicates corresponding table tag in the Open Type
139     * Specification.
140     */
141    public static final int TAG_FPGM = 1718642541;
142
143    /**
144     * The Constant TAG_FVAR indicates corresponding table tag in the Open Type
145     * Specification.
146     */
147    public static final int TAG_FVAR = 1719034226;
148
149    /**
150     * The Constant TAG_GASP indicates corresponding table tag in the Open Type
151     * Specification.
152     */
153    public static final int TAG_GASP = 1734439792;
154
155    /**
156     * The Constant TAG_GDEF indicates corresponding table tag in the Open Type
157     * Specification.
158     */
159    public static final int TAG_GDEF = 1195656518;
160
161    /**
162     * The Constant TAG_GLYF indicates corresponding table tag in the Open Type
163     * Specification.
164     */
165    public static final int TAG_GLYF = 1735162214;
166
167    /**
168     * The Constant TAG_GPOS indicates corresponding table tag in the Open Type
169     * Specification.
170     */
171    public static final int TAG_GPOS = 1196445523;
172
173    /**
174     * The Constant TAG_GSUB indicates corresponding table tag in the Open Type
175     * Specification.
176     */
177    public static final int TAG_GSUB = 1196643650;
178
179    /**
180     * The Constant TAG_GVAR indicates corresponding table tag in the Open Type
181     * Specification.
182     */
183    public static final int TAG_GVAR = 1735811442;
184
185    /**
186     * The Constant TAG_HDMX indicates corresponding table tag in the Open Type
187     * Specification.
188     */
189    public static final int TAG_HDMX = 1751412088;
190
191    /**
192     * The Constant TAG_HEAD indicates corresponding table tag in the Open Type
193     * Specification.
194     */
195    public static final int TAG_HEAD = 1751474532;
196
197    /**
198     * The Constant TAG_HHEA indicates corresponding table tag in the Open Type
199     * Specification.
200     */
201    public static final int TAG_HHEA = 1751672161;
202
203    /**
204     * The Constant TAG_HMTX indicates corresponding table tag in the Open Type
205     * Specification.
206     */
207    public static final int TAG_HMTX = 1752003704;
208
209    /**
210     * The Constant TAG_JSTF indicates corresponding table tag in the Open Type
211     * Specification.
212     */
213    public static final int TAG_JSTF = 1246975046;
214
215    /**
216     * The Constant TAG_JUST indicates corresponding table tag in the Open Type
217     * Specification.
218     */
219    public static final int TAG_JUST = 1786082164;
220
221    /**
222     * The Constant TAG_KERN indicates corresponding table tag in the Open Type
223     * Specification.
224     */
225    public static final int TAG_KERN = 1801810542;
226
227    /**
228     * The Constant TAG_LCAR indicates corresponding table tag in the Open Type
229     * Specification.
230     */
231    public static final int TAG_LCAR = 1818452338;
232
233    /**
234     * The Constant TAG_LOCA indicates corresponding table tag in the Open Type
235     * Specification.
236     */
237    public static final int TAG_LOCA = 1819239265;
238
239    /**
240     * The Constant TAG_LTSH indicates corresponding table tag in the Open Type
241     * Specification.
242     */
243    public static final int TAG_LTSH = 1280594760;
244
245    /**
246     * The Constant TAG_MAXP indicates corresponding table tag in the Open Type
247     * Specification.
248     */
249    public static final int TAG_MAXP = 1835104368;
250
251    /**
252     * The Constant TAG_MMFX indicates corresponding table tag in the Open Type
253     * Specification.
254     */
255    public static final int TAG_MMFX = 1296909912;
256
257    /**
258     * The Constant TAG_MMSD indicates corresponding table tag in the Open Type
259     * Specification.
260     */
261    public static final int TAG_MMSD = 1296913220;
262
263    /**
264     * The Constant TAG_MORT indicates corresponding table tag in the Open Type
265     * Specification.
266     */
267    public static final int TAG_MORT = 1836020340;
268
269    /**
270     * The Constant TAG_NAME indicates corresponding table tag in the Open Type
271     * Specification.
272     */
273    public static final int TAG_NAME = 1851878757;
274
275    /**
276     * The Constant TAG_OPBD indicates corresponding table tag in the Open Type
277     * Specification.
278     */
279    public static final int TAG_OPBD = 1836020340;
280
281    /**
282     * The Constant TAG_OS2 indicates corresponding table tag in the Open Type
283     * Specification.
284     */
285    public static final int TAG_OS2 = 1330851634;
286
287    /**
288     * The Constant TAG_PCLT indicates corresponding table tag in the Open Type
289     * Specification.
290     */
291    public static final int TAG_PCLT = 1346587732;
292
293    /**
294     * The Constant TAG_POST indicates corresponding table tag in the Open Type
295     * Specification.
296     */
297    public static final int TAG_POST = 1886352244;
298
299    /**
300     * The Constant TAG_PREP indicates corresponding table tag in the Open Type
301     * Specification.
302     */
303    public static final int TAG_PREP = 1886545264;
304
305    /**
306     * The Constant TAG_PROP indicates corresponding table tag in the Open Type
307     * Specification.
308     */
309    public static final int TAG_PROP = 1886547824;
310
311    /**
312     * The Constant TAG_TRAK indicates corresponding table tag in the Open Type
313     * Specification.
314     */
315    public static final int TAG_TRAK = 1953653099;
316
317    /**
318     * The Constant TAG_TYP1 indicates corresponding table tag in the Open Type
319     * Specification.
320     */
321    public static final int TAG_TYP1 = 1954115633;
322
323    /**
324     * The Constant TAG_VDMX indicates corresponding table tag in the Open Type
325     * Specification.
326     */
327    public static final int TAG_VDMX = 1447316824;
328
329    /**
330     * The Constant TAG_VHEA indicates corresponding table tag in the Open Type
331     * Specification.
332     */
333    public static final int TAG_VHEA = 1986553185;
334
335    /**
336     * The Constant TAG_VMTX indicates corresponding table tag in the Open Type
337     * Specification.
338     */
339    public static final int TAG_VMTX = 1986884728;
340
341    /**
342     * Returns the OpenType font version.
343     *
344     * @return the the OpenType font version.
345     */
346    public int getVersion();
347
348    /**
349     * Gets the table for a specified tag. Sfnt tables include cmap, name and
350     * head items.
351     *
352     * @param sfntTag
353     *            the sfnt tag.
354     * @return a byte array contains the font data corresponding to the
355     *         specified tag.
356     */
357    public byte[] getFontTable(int sfntTag);
358
359    /**
360     * Gets the table for a specified tag. Sfnt tables include cmap, name and
361     * head items.
362     *
363     * @param sfntTag
364     *            the sfnt tag.
365     * @param offset
366     *            the offset of the returned table.
367     * @param count
368     *            the number of returned table.
369     * @return the table corresponding to sfntTag and containing the bytes
370     *         starting at offset byte and including count bytes.
371     */
372    public byte[] getFontTable(int sfntTag, int offset, int count);
373
374    /**
375     * Gets the table for a specified tag. Sfnt tables include cmap, name and
376     * head items.
377     *
378     * @param strSfntTag
379     *            the str sfnt tag as a String.
380     * @return a byte array contains the font data corresponding to the
381     *         specified tag.
382     */
383    public byte[] getFontTable(String strSfntTag);
384
385    /**
386     * Gets the table for a specified tag. Sfnt tables include cmap, name and
387     * head items.
388     *
389     * @param strSfntTag
390     *            the sfnt tag as a String.
391     * @param offset
392     *            the offset of the returned table.
393     * @param count
394     *            the number of returned table.
395     * @return the table corresponding to sfntTag and containing the bytes
396     *         starting at offset byte and including count bytes.
397     */
398    public byte[] getFontTable(String strSfntTag, int offset, int count);
399
400    /**
401     * Gets the table size for a specified tag.
402     *
403     * @param strSfntTag
404     *            the sfnt tag as a String.
405     * @return the table size for a specified tag.
406     */
407    public int getFontTableSize(String strSfntTag);
408
409    /**
410     * Gets the table size for a specified tag.
411     *
412     * @param sfntTag
413     *            the sfnt tag.
414     * @return the table size for a specified tag.
415     */
416    public int getFontTableSize(int sfntTag);
417
418}
419