選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

PDFCharProcs.java 1.9KB

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