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.

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  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.fonts;
  18. //Java
  19. import java.util.Map;
  20. /**
  21. * Abstract base class for CID fonts.
  22. */
  23. public abstract class CIDFont extends CustomFont {
  24. /**
  25. * usedGlyphs contains orginal, new glyph index
  26. */
  27. public Map usedGlyphs = new java.util.HashMap();
  28. /**
  29. * usedGlyphsIndex contains new glyph, original index
  30. */
  31. public Map usedGlyphsIndex = new java.util.HashMap();
  32. public int usedGlyphsCount = 0;
  33. //private PDFWArray warray = new PDFWArray();
  34. public int width[] = null;
  35. // ---- Required ----
  36. /**
  37. * Returns the name of the base font.
  38. * @return the name of the base font
  39. */
  40. public abstract String getCidBaseFont();
  41. /**
  42. * Returns the type of the CID font.
  43. * @return the type of the CID font
  44. */
  45. public abstract CIDFontType getCIDType();
  46. /**
  47. * Returns the name of the issuer of the font.
  48. * @return a String identifying an issuer of character collections -
  49. * for example, Adobe
  50. */
  51. public abstract String getRegistry();
  52. /**
  53. * Returns a font name for use within a registry.
  54. * @return a String that uniquely names a character collection issued by
  55. * a specific registry - for example, Japan1.
  56. */
  57. public abstract String getOrdering();
  58. /**
  59. * Returns the supplement number of the character collection.
  60. * @return the supplement number
  61. */
  62. public abstract int getSupplement();
  63. // ---- Optional ----
  64. /**
  65. * Returns the default width for this font.
  66. * @return the default width
  67. */
  68. public int getDefaultWidth() {
  69. return 0;
  70. }
  71. /**
  72. * @see org.apache.fop.fonts.Typeface#isMultiByte()
  73. */
  74. public boolean isMultiByte() {
  75. return true;
  76. }
  77. }