KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > fop > fonts > CIDFont


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 /* $Id: CIDFont.java 454725 2006-10-10 13:00:05Z bdelacretaz $ */
19
20 package org.apache.fop.fonts;
21
22 //Java
23
import java.util.Map JavaDoc;
24
25 /**
26  * Abstract base class for CID fonts.
27  */

28 public abstract class CIDFont extends CustomFont {
29
30     /**
31      * usedGlyphs contains orginal, new glyph index
32      */

33     public Map JavaDoc usedGlyphs = new java.util.HashMap JavaDoc();
34
35     /**
36      * usedGlyphsIndex contains new glyph, original index
37      */

38     public Map JavaDoc usedGlyphsIndex = new java.util.HashMap JavaDoc();
39     public int usedGlyphsCount = 0;
40
41     /**
42      * usedCharsIndex contains new glyph, original char
43      */

44     public Map JavaDoc usedCharsIndex = new java.util.HashMap JavaDoc();
45
46     //private PDFWArray warray = new PDFWArray();
47
public int width[] = null;
48
49     // ---- Required ----
50
/**
51      * Returns the name of the base font.
52      * @return the name of the base font
53      */

54     public abstract String JavaDoc getCidBaseFont();
55
56     /**
57      * Returns the type of the CID font.
58      * @return the type of the CID font
59      */

60     public abstract CIDFontType getCIDType();
61
62     /**
63      * Returns the name of the issuer of the font.
64      * @return a String identifying an issuer of character collections -
65      * for example, Adobe
66      */

67     public abstract String JavaDoc getRegistry();
68
69     /**
70      * Returns a font name for use within a registry.
71      * @return a String that uniquely names a character collection issued by
72      * a specific registry - for example, Japan1.
73      */

74     public abstract String JavaDoc getOrdering();
75
76     /**
77      * Returns the supplement number of the character collection.
78      * @return the supplement number
79      */

80     public abstract int getSupplement();
81
82
83     // ---- Optional ----
84
/**
85      * Returns the default width for this font.
86      * @return the default width
87      */

88     public int getDefaultWidth() {
89         return 0;
90     }
91
92     /**
93      * @see org.apache.fop.fonts.Typeface#isMultiByte()
94      */

95     public boolean isMultiByte() {
96         return true;
97     }
98
99     /**
100      * Returns char[] array .
101      */

102     public abstract char[] getCharsUsed();
103 }
Popular Tags