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: PDFCharProcs.java 1296526 2012-03-03 00:18:45Z gadams $ */ 19 20 package org.apache.fop.pdf; 21 22 import java.util.HashMap; 23 import java.util.Map; 24 25 /** 26 * class representing a /CharProcs dictionary for Type3 fonts. 27 * 28 * <p><b>CAUTION: this is not yet fully implemented!!!!!!!</b> 29 * I miss an exemple of <i>how</i> to output this dictionary. 30 * </p> 31 * 32 * Type3 fonts are specified on page 206 and onwards of the PDF 1.3 spec. 33 */ 34 public class PDFCharProcs extends PDFObject { 35 36 /** 37 * the (character name, drawing stream) pairs for a Type3 font 38 */ 39 protected Map keys; 40 41 /** 42 * Create a new PDF char proc store. 43 */ PDFCharProcs()44 public PDFCharProcs() { 45 keys = new HashMap(); 46 } 47 48 /** 49 * add a character definition in the dictionary 50 * 51 * @param name the character name 52 * @param stream the stream that draws the character 53 */ addCharacter(String name, PDFStream stream)54 public void addCharacter(String name, PDFStream stream) { 55 keys.put(name, stream); 56 } 57 58 /** 59 * not done yet 60 * @return the pdf byte array 61 */ toPDF()62 public byte[] toPDF() { 63 // TODO: implement this org.apache.fop.pdf.PDFObject abstract method 64 return new byte[0]; 65 } 66 67 } 68