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.

MutableFont.java 3.9KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154
  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 java.util.Map;
  20. import java.util.Set;
  21. /**
  22. * This interface is used to set the values of a font during configuration time.
  23. */
  24. public interface MutableFont {
  25. /**
  26. * Sets the "PostScript" font name (Example: "Helvetica-BoldOblique").
  27. * @param name font name
  28. */
  29. void setFontName(String name);
  30. /**
  31. * Sets the font's full name (usually the one that the operating system displays). Example:
  32. * "Helvetica Bold Oblique".
  33. * @param name font' full name
  34. */
  35. void setFullName(String name);
  36. /**
  37. * Sets the font's family names (Example: "Helvetica").
  38. * @param names the font's family names (a Set of Strings)
  39. */
  40. void setFamilyNames(Set<String> names);
  41. /**
  42. * Sets the path to the embeddable font file.
  43. * @param path URI to the file
  44. */
  45. void setEmbedFileName(String path);
  46. /**
  47. * Sets the resource name of the embeddable font file.
  48. * @param name resource name
  49. */
  50. void setEmbedResourceName(String name);
  51. /**
  52. * Sets the embedding mode.
  53. * @param embeddingMode the embedding mode
  54. */
  55. void setEmbeddingMode(EmbeddingMode embeddingMode);
  56. /**
  57. * Sets the capital height value.
  58. * @param capHeight capital height
  59. */
  60. void setCapHeight(int capHeight);
  61. /**
  62. * Sets the ascent value.
  63. * @param ascender ascent height
  64. */
  65. void setAscender(int ascender);
  66. /**
  67. * Sets the descent value.
  68. * @param descender descent value
  69. */
  70. void setDescender(int descender);
  71. /**
  72. * Sets the font's bounding box
  73. * @param bbox bounding box
  74. */
  75. void setFontBBox(int[] bbox);
  76. /**
  77. * Sets the font's flags
  78. * @param flags flags
  79. */
  80. void setFlags(int flags);
  81. /**
  82. * Sets the font's StemV value.
  83. * @param stemV StemV
  84. */
  85. void setStemV(int stemV);
  86. /**
  87. * Sets the font's italic angle.
  88. * @param italicAngle italic angle
  89. */
  90. void setItalicAngle(int italicAngle);
  91. /**
  92. * Sets the font's default width
  93. * @param width default width
  94. */
  95. void setMissingWidth(int width);
  96. /**
  97. * Sets the font type.
  98. * @param fontType font type
  99. */
  100. void setFontType(FontType fontType);
  101. /**
  102. * Sets the index of the first character in the character table.
  103. * @param index index of first character
  104. */
  105. void setFirstChar(int index);
  106. /**
  107. * Sets the index of the last character in the character table.
  108. * @param index index of the last character
  109. */
  110. void setLastChar(int index);
  111. /**
  112. * Enables/disabled kerning.
  113. * @param enabled True if kerning should be enabled if available
  114. */
  115. void setKerningEnabled(boolean enabled);
  116. /**
  117. * Enables/disabled advanced typographic features.
  118. * @param enabled true if advanced typographic features should be enabled if available
  119. */
  120. void setAdvancedEnabled(boolean enabled);
  121. /**
  122. * Adds an entry to the kerning table.
  123. * @param key Kerning key
  124. * @param value Kerning value
  125. */
  126. void putKerningEntry(Integer key, Map<Integer, Integer> value);
  127. }