PageRenderTime 11ms CodeModel.GetById 2ms app.highlight 6ms RepoModel.GetById 1ms app.codeStats 0ms

/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 ***********************************************************************/
 18package org.mt4j.components.visibleComponents.font;
 19
 20import org.mt4j.util.MTColor;
 21
 22/**
 23 * The Interface IFont.
 24 * @author Christopher Ruff
 25 */
 26public interface IFont {
 27	
 28	/**
 29	 * Gets the font character by name.
 30	 * 
 31	 * @param characterName the character name
 32	 * 
 33	 * @return the font character by name
 34	 */
 35	public IFontCharacter getFontCharacterByName(String characterName);
 36	
 37	/**
 38	 * Gets the font character by unicode.
 39	 * 
 40	 * @param unicode the unicode
 41	 * 
 42	 * @return the font character by unicode
 43	 */
 44	public IFontCharacter getFontCharacterByUnicode(String unicode);
 45	
 46	/**
 47	 * Gets the characters.
 48	 * 
 49	 * @return the characters
 50	 */
 51	public IFontCharacter[] getCharacters();
 52	
 53	/**
 54	 * Gets the font family.
 55	 * 
 56	 * @return the font family
 57	 */
 58	public String getFontFamily();
 59	
 60	/**
 61	 * Gets the default horizontal adv x.
 62	 * 
 63	 * @return the default horizontal adv x
 64	 */
 65	public int getDefaultHorizontalAdvX();
 66	
 67	/**
 68	 * Gets the font max ascent.
 69	 * 
 70	 * @return the font max ascent
 71	 */
 72	public int getFontMaxAscent();
 73
 74	/**
 75	 * Gets the font max descent.
 76	 * <br>NOTE: this often is a negative value 
 77	 * 
 78	 * @return the font max descent
 79	 */
 80	public int getFontMaxDescent();
 81	
 82	/**
 83	 * Gets the units per em.
 84	 * 
 85	 * @return the units per em
 86	 */
 87	public int getUnitsPerEM();
 88	
 89	/**
 90	 * Gets the font file name.
 91	 * 
 92	 * @return the font file name
 93	 */
 94	public String getFontFileName();
 95	
 96	/**
 97	 * Gets the original font size.
 98	 * 
 99	 * @return the original font size
100	 */
101	public int getOriginalFontSize();
102
103	/**
104	 * Gets the font absolute height.
105	 * 
106	 * @return the font absolute height
107	 */
108	public int getFontAbsoluteHeight();
109	
110	
111	/**
112	 * Gets the fill color.
113	 * 
114	 * @return the fill color
115	 */
116	public MTColor getFillColor();
117	
118//	/**
119//	 * Gets the stroke color.
120//	 * 
121//	 * @return the stroke color
122//	 */
123//	public MTColor getStrokeColor();
124	
125	
126	public void setFillColor(MTColor color);
127	
128	
129	/**
130	 * Checks if is anti aliased.
131	 *
132	 * @return true, if is anti aliased
133	 */
134	public boolean isAntiAliased();
135	
136	/**
137	 * Destroys the font's characters and removes it from the FontManager's cache.
138	 */
139	public void destroy();
140}