diff options
author | Manuel Mall <manuel@apache.org> | 2006-04-27 15:08:17 +0000 |
---|---|---|
committer | Manuel Mall <manuel@apache.org> | 2006-04-27 15:08:17 +0000 |
commit | 0040a29ecce57798e6947fdb33750a4dba1afea0 (patch) | |
tree | 501628c14f955bac7a8006e81b3155b5e906f57d /src/sandbox/org/apache/fop/render/afp/AFPFontAttributes.java | |
parent | 31c92194560170ea22c7537736bbdf2ad5e5aaf6 (diff) | |
download | xmlgraphics-fop-0040a29ecce57798e6947fdb33750a4dba1afea0.tar.gz xmlgraphics-fop-0040a29ecce57798e6947fdb33750a4dba1afea0.zip |
AFP Renderer as per IP clearance (http://mail-archives.apache.org/mod_mbox/xmlgraphics-general/200604.mbox/%3c20060426085421.B456.DEV@jeremias-maerki.ch%3e) plus some further corrections and changes made by manuel@apache.org since
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@397562 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/sandbox/org/apache/fop/render/afp/AFPFontAttributes.java')
-rw-r--r-- | src/sandbox/org/apache/fop/render/afp/AFPFontAttributes.java | 110 |
1 files changed, 110 insertions, 0 deletions
diff --git a/src/sandbox/org/apache/fop/render/afp/AFPFontAttributes.java b/src/sandbox/org/apache/fop/render/afp/AFPFontAttributes.java new file mode 100644 index 000000000..2bb446c3a --- /dev/null +++ b/src/sandbox/org/apache/fop/render/afp/AFPFontAttributes.java @@ -0,0 +1,110 @@ +/* + * Copyright 2006 The Apache Software Foundation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* $Id$ */ + +package org.apache.fop.render.afp; + +import org.apache.fop.render.afp.fonts.AFPFont; +import org.apache.fop.render.afp.tools.BinaryUtils; + +/** + * This class encapsulates the font atributes that need to be included + * in the AFP data stream. This class does not assist in converting the + * font attributes to AFP code pages and character set values. + * + */ +public class AFPFontAttributes { + + /** + * The font reference byte + */ + private byte _fontReference; + + /** + * The font key + */ + private String _fontKey; + + /** + * The font + */ + private AFPFont _font; + + /** + * The point size + */ + private int _pointSize; + + /** + * Constructor for the AFPFontAttributes + * @param fontKey the font key + * @param font the font + * @param pointSize the point size + */ + public AFPFontAttributes( + + String fontKey, + AFPFont font, + int pointSize) { + + _fontKey = fontKey; + _font = font; + _pointSize = pointSize; + + } + /** + * @return the font + */ + public AFPFont getFont() { + return _font; + } + + /** + * @return the FontKey attribute + */ + public String getFontKey() { + + return _fontKey + _pointSize; + + } + + /** + * @return the point size attribute + */ + public int getPointSize() { + return _pointSize; + } + + /** + * @return the FontReference attribute + */ + public byte getFontReference() { + return _fontReference; + } + + /** + * Sets the FontReference attribute + * @param fontReference the FontReference to set + */ + public void setFontReference(int fontReference) { + + String id = String.valueOf(fontReference); + _fontReference = BinaryUtils.convert(id)[0]; + + } + +} |