⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 standardfont.java

📁 Java生成PDF Java生成PDF Java生成PDF
💻 JAVA
字号:
// $Id: StandardFont.java,v 1.5 2003/11/04 17:16:01 mike Exp $package org.faceless.pdf;import java.util.*;/** * <p> * A concrete subclass of {@link PDFSimpleFont} representing the standard 14 fonts * guaranteed to exist in all PDF readers. * </p> * @version $Revision: 1.5 $ */public class StandardFont extends PDFFont{    /**     * Represents the "Courier-Bold" font     */    public static final int COURIERBOLD=0;    /**     * Represents the "Courier-BoldOblique" font     */    public static final int COURIERBOLDOBLIQUE=1;    /**     * Represents the "Courier-Oblique" font     */    public static final int COURIEROBLIQUE=2;    /**     * Represents the "Courier" font     */    public static final int COURIER=3;    /**     * Represents the "Helvetica-Bold" font     */    public static final int HELVETICABOLD=4;    /**     * Represents the "Helvetica-BoldOblique" font     */    public static final int HELVETICABOLDOBLIQUE=5;    /**     * Represents the "Helvetica-Oblique" font     */    public static final int HELVETICAOBLIQUE=6;    /**     * Represents the "Helvetica" font     */    public static final int HELVETICA=7;    /**     * Represents the "Symbol" font     */    public static final int SYMBOL=8;    /**     * Represents the "Times-Bold" font     */    public static final int TIMESBOLD=9;    /**     * Represents the "Times-BoldItalic" font     */    public static final int TIMESBOLDITALIC=10;    /**     * Represents the "Times-Italic" font     */    public static final int TIMESITALIC=11;    /**     * Represents the "Times-Roman" font     */    public static final int TIMES=12;    /**     * Represents the "ZapfDingbats" font. Note that the characters in the     * font are defined by the correct Unicode codepoints, rather than just     * numbers 1 to 255. See the file <code>docs/map-zapf.pdf</code> that     * came with the distribution to see what these codepoints are.     */    public static final int ZAPFDINGBATS=13;    private static final int[] map = { 9, 11, 10, 8, 5, 7, 6, 4, 12, 1, 3, 2, 0, 13 };    public StandardFont(int type)    {	super(new org.faceless.pdf2.StandardFont(map[type]));    }    /**     * Return an <i>italic</i> version of this font if it exists, or     * the current font if it doesn't.     * @since 1.1     */    public PDFFont versionItalic()    {	return (PDFFont)PeeredObject.getPeer(((org.faceless.pdf2.StandardFont)font).versionItalic());    }    /**     * Return a <b>bold</b> version of this font if it exists, or     * the current font if it doesn't.     * @since 1.1     */    public PDFFont versionBold()    {	return (PDFFont)PeeredObject.getPeer(((org.faceless.pdf2.StandardFont)font).versionBold());    }    /**     * Return a regular (non-bold, non-italic) version of this font     * if it exists, or the current font if it doesn't.     * @since 1.1     */    public PDFFont versionRegular()    {	return (PDFFont)PeeredObject.getPeer(((org.faceless.pdf2.StandardFont)font).versionRegular());    }}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -