KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > batik > svggen > font > table > Panose


1 /*
2
3    Copyright 2001 The Apache Software Foundation
4
5    Licensed under the Apache License, Version 2.0 (the "License");
6    you may not use this file except in compliance with the License.
7    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 package org.apache.batik.svggen.font.table;
19
20 /**
21  * @version $Id: Panose.java,v 1.3 2004/08/18 07:15:22 vhardy Exp $
22  * @author <a HREF="mailto:david@steadystate.co.uk">David Schweinsberg</a>
23  */

24 public class Panose {
25
26   byte bFamilyType = 0;
27   byte bSerifStyle = 0;
28   byte bWeight = 0;
29   byte bProportion = 0;
30   byte bContrast = 0;
31   byte bStrokeVariation = 0;
32   byte bArmStyle = 0;
33   byte bLetterform = 0;
34   byte bMidline = 0;
35   byte bXHeight = 0;
36
37   /** Creates new Panose */
38   public Panose(byte[] panose) {
39     bFamilyType = panose[0];
40     bSerifStyle = panose[1];
41     bWeight = panose[2];
42     bProportion = panose[3];
43     bContrast = panose[4];
44     bStrokeVariation = panose[5];
45     bArmStyle = panose[6];
46     bLetterform = panose[7];
47     bMidline = panose[8];
48     bXHeight = panose[9];
49   }
50
51   public byte getFamilyType() {
52     return bFamilyType;
53   }
54   
55   public byte getSerifStyle() {
56     return bSerifStyle;
57   }
58   
59   public byte getWeight() {
60     return bWeight;
61   }
62
63   public byte getProportion() {
64     return bProportion;
65   }
66   
67   public byte getContrast() {
68     return bContrast;
69   }
70   
71   public byte getStrokeVariation() {
72     return bStrokeVariation;
73   }
74   
75   public byte getArmStyle() {
76     return bArmStyle;
77   }
78   
79   public byte getLetterForm() {
80     return bLetterform;
81   }
82   
83   public byte getMidline() {
84     return bMidline;
85   }
86   
87   public byte getXHeight() {
88     return bXHeight;
89   }
90   
91   public String JavaDoc toString() {
92     StringBuffer JavaDoc sb = new StringBuffer JavaDoc();
93     sb.append(String.valueOf(bFamilyType)).append(" ")
94       .append(String.valueOf(bSerifStyle)).append(" ")
95       .append(String.valueOf(bWeight)).append(" ")
96       .append(String.valueOf(bProportion)).append(" ")
97       .append(String.valueOf(bContrast)).append(" ")
98       .append(String.valueOf(bStrokeVariation)).append(" ")
99       .append(String.valueOf(bArmStyle)).append(" ")
100       .append(String.valueOf(bLetterform)).append(" ")
101       .append(String.valueOf(bMidline)).append(" ")
102       .append(String.valueOf(bXHeight));
103     return sb.toString();
104   }
105 }
106
Popular Tags