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 4.1KB

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