You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

PDFCharProcs.java 1.7KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. /*
  2. * Copyright 1999-2004 The Apache Software Foundation.
  3. *
  4. * Licensed under the Apache License, Version 2.0 (the "License");
  5. * you may not use this file except in compliance with the License.
  6. * You may obtain a copy of the License at
  7. *
  8. * http://www.apache.org/licenses/LICENSE-2.0
  9. *
  10. * Unless required by applicable law or agreed to in writing, software
  11. * distributed under the License is distributed on an "AS IS" BASIS,
  12. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. * See the License for the specific language governing permissions and
  14. * limitations under the License.
  15. */
  16. /* $Id$ */
  17. package org.apache.fop.pdf;
  18. import java.util.Map;
  19. import java.util.HashMap;
  20. /**
  21. * class representing a /CharProcs dictionary for Type3 fonts.
  22. *
  23. * <p><b>CAUTION: this is not yet fully implemented!!!!!!!</b>
  24. * I miss an exemple of <i>how</i> to output this dictionary.
  25. * </p>
  26. *
  27. * Type3 fonts are specified on page 206 and onwards of the PDF 1.3 spec.
  28. */
  29. public class PDFCharProcs extends PDFObject {
  30. /**
  31. * the (character name, drawing stream) pairs for a Type3 font
  32. */
  33. protected Map keys;
  34. /**
  35. * Create a new PDF char proc store.
  36. */
  37. public PDFCharProcs() {
  38. keys = new HashMap();
  39. }
  40. /**
  41. * add a character definition in the dictionary
  42. *
  43. * @param name the character name
  44. * @param stream the stream that draws the character
  45. */
  46. public void addCharacter(String name, PDFStream stream) {
  47. keys.put(name, stream);
  48. }
  49. /**
  50. * not done yet
  51. * @return the pdf byte array
  52. */
  53. public byte[] toPDF() {
  54. // TODO: implement this org.apache.fop.pdf.PDFObject abstract method
  55. return new byte[0];
  56. }
  57. }