/src/org/mt4j/components/visibleComponents/font/IFont.java

http://mt4j.googlecode.com/ · Java · 140 lines · 19 code · 21 blank · 100 comment · 0 complexity · a948671c7a1df9e8fd1091442dc4de8c MD5 · raw file

  1. /***********************************************************************
  2. * mt4j Copyright (c) 2008 - 2009, C.Ruff, Fraunhofer-Gesellschaft All rights reserved.
  3. *
  4. * This program is free software: you can redistribute it and/or modify
  5. * it under the terms of the GNU General Public License as published by
  6. * the Free Software Foundation, either version 3 of the License, or
  7. * (at your option) any later version.
  8. *
  9. * This program is distributed in the hope that it will be useful,
  10. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. * GNU General Public License for more details.
  13. *
  14. * You should have received a copy of the GNU General Public License
  15. * along with this program. If not, see <http://www.gnu.org/licenses/>.
  16. *
  17. ***********************************************************************/
  18. package org.mt4j.components.visibleComponents.font;
  19. import org.mt4j.util.MTColor;
  20. /**
  21. * The Interface IFont.
  22. * @author Christopher Ruff
  23. */
  24. public interface IFont {
  25. /**
  26. * Gets the font character by name.
  27. *
  28. * @param characterName the character name
  29. *
  30. * @return the font character by name
  31. */
  32. public IFontCharacter getFontCharacterByName(String characterName);
  33. /**
  34. * Gets the font character by unicode.
  35. *
  36. * @param unicode the unicode
  37. *
  38. * @return the font character by unicode
  39. */
  40. public IFontCharacter getFontCharacterByUnicode(String unicode);
  41. /**
  42. * Gets the characters.
  43. *
  44. * @return the characters
  45. */
  46. public IFontCharacter[] getCharacters();
  47. /**
  48. * Gets the font family.
  49. *
  50. * @return the font family
  51. */
  52. public String getFontFamily();
  53. /**
  54. * Gets the default horizontal adv x.
  55. *
  56. * @return the default horizontal adv x
  57. */
  58. public int getDefaultHorizontalAdvX();
  59. /**
  60. * Gets the font max ascent.
  61. *
  62. * @return the font max ascent
  63. */
  64. public int getFontMaxAscent();
  65. /**
  66. * Gets the font max descent.
  67. * <br>NOTE: this often is a negative value
  68. *
  69. * @return the font max descent
  70. */
  71. public int getFontMaxDescent();
  72. /**
  73. * Gets the units per em.
  74. *
  75. * @return the units per em
  76. */
  77. public int getUnitsPerEM();
  78. /**
  79. * Gets the font file name.
  80. *
  81. * @return the font file name
  82. */
  83. public String getFontFileName();
  84. /**
  85. * Gets the original font size.
  86. *
  87. * @return the original font size
  88. */
  89. public int getOriginalFontSize();
  90. /**
  91. * Gets the font absolute height.
  92. *
  93. * @return the font absolute height
  94. */
  95. public int getFontAbsoluteHeight();
  96. /**
  97. * Gets the fill color.
  98. *
  99. * @return the fill color
  100. */
  101. public MTColor getFillColor();
  102. // /**
  103. // * Gets the stroke color.
  104. // *
  105. // * @return the stroke color
  106. // */
  107. // public MTColor getStrokeColor();
  108. public void setFillColor(MTColor color);
  109. /**
  110. * Checks if is anti aliased.
  111. *
  112. * @return true, if is anti aliased
  113. */
  114. public boolean isAntiAliased();
  115. /**
  116. * Destroys the font's characters and removes it from the FontManager's cache.
  117. */
  118. public void destroy();
  119. }