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.

PDFCIDSystemInfo.java 1.9KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  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. // based on work by Takayuki Takeuchi
  19. /**
  20. * class representing system information for "character identifier" fonts.
  21. *
  22. * this small object is used in the CID fonts and in the CMaps.
  23. */
  24. public class PDFCIDSystemInfo extends PDFObject {
  25. private String registry;
  26. private String ordering;
  27. private int supplement;
  28. /**
  29. * Create a CID system info.
  30. *
  31. * @param registry the registry value
  32. * @param ordering the ordering value
  33. * @param supplement the supplement value
  34. */
  35. public PDFCIDSystemInfo(String registry, String ordering,
  36. int supplement) {
  37. this.registry = registry;
  38. this.ordering = ordering;
  39. this.supplement = supplement;
  40. }
  41. /**
  42. * Create a string for the CIDSystemInfo dictionary.
  43. * The entries are placed as an inline dictionary.
  44. *
  45. * @return the string for the CIDSystemInfo entry with the inline dictionary
  46. */
  47. public String toPDFString() {
  48. StringBuffer p = new StringBuffer(64);
  49. p.setLength(0);
  50. p.append("/CIDSystemInfo << /Registry (");
  51. p.append(registry);
  52. p.append(") /Ordering (");
  53. p.append(ordering);
  54. p.append(") /Supplement ");
  55. p.append(supplement);
  56. p.append(" >>");
  57. return p.toString();
  58. }
  59. }