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.

CIDFont.java 2.2KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  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.fonts;
  19. //Java
  20. /**
  21. * Abstract base class for CID fonts.
  22. */
  23. public abstract class CIDFont extends CustomFont {
  24. /** Contains the character widths for all characters in the font */
  25. protected int[] width = null;
  26. // ---- Required ----
  27. /**
  28. * Returns the type of the CID font.
  29. * @return the type of the CID font
  30. */
  31. public abstract CIDFontType getCIDType();
  32. /**
  33. * Returns the name of the issuer of the font.
  34. * @return a String identifying an issuer of character collections -
  35. * for example, Adobe
  36. */
  37. public abstract String getRegistry();
  38. /**
  39. * Returns a font name for use within a registry.
  40. * @return a String that uniquely names a character collection issued by
  41. * a specific registry - for example, Japan1.
  42. */
  43. public abstract String getOrdering();
  44. /**
  45. * Returns the supplement number of the character collection.
  46. * @return the supplement number
  47. */
  48. public abstract int getSupplement();
  49. /**
  50. * Returns the subset information for this font.
  51. * @return the subset information
  52. */
  53. public abstract CIDSubset getCIDSubset();
  54. // ---- Optional ----
  55. /**
  56. * Returns the default width for this font.
  57. * @return the default width
  58. */
  59. public int getDefaultWidth() {
  60. return 0;
  61. }
  62. /** {@inheritDoc} */
  63. public boolean isMultiByte() {
  64. return true;
  65. }
  66. }