Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

CIDFont.java 2.5KB

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