fontprovider.java
来自「纯java操作系统jnode,安装简单和操作简单的个人使用的Java操作系统」· Java 代码 · 共 56 行
JAVA
56 行
/*
* $Id: FontProvider.java,v 1.1 2003/11/25 11:51:41 epr Exp $
*/
package org.jnode.awt.font;
import java.awt.Font;
import java.awt.FontMetrics;
import java.util.Set;
/**
* @author Ewout Prangsma (epr@users.sourceforge.net)
*/
public interface FontProvider {
/**
* Does this provides provide the given font?
* @param font
* @return True if this provider provides the given font, false otherwise
*/
public boolean provides(Font font);
/**
* Returns a set containing a one-point size instance of all fonts
* available in this provider.
* Typical usage would be to allow a user to select a particular font.
* Then, the application can size the font and set various font
* attributes by calling the deriveFont method on the choosen instance.
* This method provides for the application the most precise control
* over which Font instance is used to render text.
* If a font in this provider has multiple programmable variations,
* only one instance of that Font is returned in the set,
* and other variations must be derived by the application.
* If a font in this provider has multiple programmable variations,
* such as Multiple-Master fonts, only one instance of that font
* is returned in the Font set.
* The other variations must be derived by the application.
*
* @return All fonts this provider can provide
*/
public Set getAllFonts();
/**
* Gets a text renderer for the given font.
* @param font
* @return The text renderen for the given font
*/
public TextRenderer getTextRenderer(Font font);
/**
* Gets the font metrics for the given font.
* @param font
* @return The font metrics for the given font
*/
public FontMetrics getFontMetrics(Font font);
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?