001: /*
002:
003: Licensed to the Apache Software Foundation (ASF) under one or more
004: contributor license agreements. See the NOTICE file distributed with
005: this work for additional information regarding copyright ownership.
006: The ASF licenses this file to You under the Apache License, Version 2.0
007: (the "License"); you may not use this file except in compliance with
008: the License. You may obtain a copy of the License at
009:
010: http://www.apache.org/licenses/LICENSE-2.0
011:
012: Unless required by applicable law or agreed to in writing, software
013: distributed under the License is distributed on an "AS IS" BASIS,
014: WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
015: See the License for the specific language governing permissions and
016: limitations under the License.
017:
018: */
019: package org.apache.batik.svggen.font.table;
020:
021: /**
022: * @version $Id: Panose.java 475477 2006-11-15 22:44:28Z cam $
023: * @author <a href="mailto:david@steadystate.co.uk">David Schweinsberg</a>
024: */
025: public class Panose {
026:
027: byte bFamilyType = 0;
028: byte bSerifStyle = 0;
029: byte bWeight = 0;
030: byte bProportion = 0;
031: byte bContrast = 0;
032: byte bStrokeVariation = 0;
033: byte bArmStyle = 0;
034: byte bLetterform = 0;
035: byte bMidline = 0;
036: byte bXHeight = 0;
037:
038: /** Creates new Panose */
039: public Panose(byte[] panose) {
040: bFamilyType = panose[0];
041: bSerifStyle = panose[1];
042: bWeight = panose[2];
043: bProportion = panose[3];
044: bContrast = panose[4];
045: bStrokeVariation = panose[5];
046: bArmStyle = panose[6];
047: bLetterform = panose[7];
048: bMidline = panose[8];
049: bXHeight = panose[9];
050: }
051:
052: public byte getFamilyType() {
053: return bFamilyType;
054: }
055:
056: public byte getSerifStyle() {
057: return bSerifStyle;
058: }
059:
060: public byte getWeight() {
061: return bWeight;
062: }
063:
064: public byte getProportion() {
065: return bProportion;
066: }
067:
068: public byte getContrast() {
069: return bContrast;
070: }
071:
072: public byte getStrokeVariation() {
073: return bStrokeVariation;
074: }
075:
076: public byte getArmStyle() {
077: return bArmStyle;
078: }
079:
080: public byte getLetterForm() {
081: return bLetterform;
082: }
083:
084: public byte getMidline() {
085: return bMidline;
086: }
087:
088: public byte getXHeight() {
089: return bXHeight;
090: }
091:
092: public String toString() {
093: StringBuffer sb = new StringBuffer();
094: sb.append(String.valueOf(bFamilyType)).append(" ").append(
095: String.valueOf(bSerifStyle)).append(" ").append(
096: String.valueOf(bWeight)).append(" ").append(
097: String.valueOf(bProportion)).append(" ").append(
098: String.valueOf(bContrast)).append(" ").append(
099: String.valueOf(bStrokeVariation)).append(" ").append(
100: String.valueOf(bArmStyle)).append(" ").append(
101: String.valueOf(bLetterform)).append(" ").append(
102: String.valueOf(bMidline)).append(" ").append(
103: String.valueOf(bXHeight));
104: return sb.toString();
105: }
106: }
|