📄 fontfactory.html
字号:
<PRE>public static <A HREF="../../../com/lowagie/text/Font.html" title="class in com.lowagie.text">Font</A> <B>getFont</B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> fontname, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> encoding)</PRE><DL><DD>Constructs a <CODE>Font</CODE>-object.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>fontname</CODE> - the name of the font<DD><CODE>encoding</CODE> - the encoding of the font<DT><B>Returns:</B><DD>the Font constructed based on the parameters</DL></DD></DL><HR><A NAME="getFont(java.lang.String, float, int, java.awt.Color)"><!-- --></A><H3>getFont</H3><PRE>public static <A HREF="../../../com/lowagie/text/Font.html" title="class in com.lowagie.text">Font</A> <B>getFont</B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> fontname, float size, int style, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/awt/Color.html?is-external=true" title="class or interface in java.awt">Color</A> color)</PRE><DL><DD>Constructs a <CODE>Font</CODE>-object.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>fontname</CODE> - the name of the font<DD><CODE>size</CODE> - the size of this font<DD><CODE>style</CODE> - the style of this font<DD><CODE>color</CODE> - the <CODE>Color</CODE> of this font.<DT><B>Returns:</B><DD>the Font constructed based on the parameters</DL></DD></DL><HR><A NAME="getFont(java.lang.String, float, java.awt.Color)"><!-- --></A><H3>getFont</H3><PRE>public static <A HREF="../../../com/lowagie/text/Font.html" title="class in com.lowagie.text">Font</A> <B>getFont</B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> fontname, float size, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/awt/Color.html?is-external=true" title="class or interface in java.awt">Color</A> color)</PRE><DL><DD>Constructs a <CODE>Font</CODE>-object.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>fontname</CODE> - the name of the font<DD><CODE>size</CODE> - the size of this font<DD><CODE>color</CODE> - the <CODE>Color</CODE> of this font.<DT><B>Returns:</B><DD>the Font constructed based on the parameters<DT><B>Since:</B></DT> <DD>2.1.0</DD></DL></DD></DL><HR><A NAME="getFont(java.lang.String, float, int)"><!-- --></A><H3>getFont</H3><PRE>public static <A HREF="../../../com/lowagie/text/Font.html" title="class in com.lowagie.text">Font</A> <B>getFont</B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> fontname, float size, int style)</PRE><DL><DD>Constructs a <CODE>Font</CODE>-object.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>fontname</CODE> - the name of the font<DD><CODE>size</CODE> - the size of this font<DD><CODE>style</CODE> - the style of this font<DT><B>Returns:</B><DD>the Font constructed based on the parameters</DL></DD></DL><HR><A NAME="getFont(java.lang.String, float)"><!-- --></A><H3>getFont</H3><PRE>public static <A HREF="../../../com/lowagie/text/Font.html" title="class in com.lowagie.text">Font</A> <B>getFont</B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> fontname, float size)</PRE><DL><DD>Constructs a <CODE>Font</CODE>-object.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>fontname</CODE> - the name of the font<DD><CODE>size</CODE> - the size of this font<DT><B>Returns:</B><DD>the Font constructed based on the parameters</DL></DD></DL><HR><A NAME="getFont(java.lang.String)"><!-- --></A><H3>getFont</H3><PRE>public static <A HREF="../../../com/lowagie/text/Font.html" title="class in com.lowagie.text">Font</A> <B>getFont</B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> fontname)</PRE><DL><DD>Constructs a <CODE>Font</CODE>-object.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>fontname</CODE> - the name of the font<DT><B>Returns:</B><DD>the Font constructed based on the parameters</DL></DD></DL><HR><A NAME="registerFamily(java.lang.String, java.lang.String, java.lang.String)"><!-- --></A><H3>registerFamily</H3><PRE>public void <B>registerFamily</B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> familyName, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> fullName, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> path)</PRE><DL><DD>Register a font by giving explicitly the font family and name.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>familyName</CODE> - the font family<DD><CODE>fullName</CODE> - the font name<DD><CODE>path</CODE> - the font path</DL></DD></DL><HR><A NAME="register(java.lang.String)"><!-- --></A><H3>register</H3><PRE>public static void <B>register</B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> path)</PRE><DL><DD>Register a ttf- or a ttc-file.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>path</CODE> - the path to a ttf- or ttc-file</DL></DD></DL><HR><A NAME="register(java.lang.String, java.lang.String)"><!-- --></A><H3>register</H3><PRE>public static void <B>register</B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> path, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> alias)</PRE><DL><DD>Register a font file and use an alias for the font contained in it.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>path</CODE> - the path to a font file<DD><CODE>alias</CODE> - the alias you want to use for the font</DL></DD></DL><HR><A NAME="registerDirectory(java.lang.String)"><!-- --></A><H3>registerDirectory</H3><PRE>public static int <B>registerDirectory</B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> dir)</PRE><DL><DD>Register all the fonts in a directory.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>dir</CODE> - the directory<DT><B>Returns:</B><DD>the number of fonts registered</DL></DD></DL><HR><A NAME="registerDirectory(java.lang.String, boolean)"><!-- --></A><H3>registerDirectory</H3><PRE>public static int <B>registerDirectory</B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> dir, boolean scanSubdirectories)</PRE><DL><DD>Register all the fonts in a directory and possibly its subdirectories.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>dir</CODE> - the directory<DD><CODE>scanSubdirectories</CODE> - recursively scan subdirectories if <code>true</true><DT><B>Returns:</B><DD>the number of fonts registered<DT><B>Since:</B></DT> <DD>2.1.2</DD></DL></DD></DL><HR><A NAME="registerDirectories()"><!-- --></A><H3>registerDirectories</H3><PRE>public static int <B>registerDirectories</B>()</PRE><DL><DD>Register fonts in some probable directories. It usually works in Windows, Linux and Solaris.<P><DD><DL><DT><B>Returns:</B><DD>the number of fonts registered</DL></DD></DL><HR><A NAME="getRegisteredFonts()"><!-- --></A><H3>getRegisteredFonts</H3><PRE>public static <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/util/Set.html?is-external=true" title="class or interface in java.util">Set</A> <B>getRegisteredFonts</B>()</PRE><DL><DD>Gets a set of registered fontnames.<P><DD><DL><DT><B>Returns:</B><DD>a set of registered fonts</DL></DD></DL><HR><A NAME="getRegisteredFamilies()"><!-- --></A><H3>getRegisteredFamilies</H3><PRE>public static <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/util/Set.html?is-external=true" title="class or interface in java.util">Set</A> <B>getRegisteredFamilies</B>()</PRE><DL><DD>Gets a set of registered fontnames.<P><DD><DL><DT><B>Returns:</B><DD>a set of registered font families</DL></DD></DL><HR><A NAME="contains(java.lang.String)"><!-- --></A><H3>contains</H3><PRE>public static boolean <B>contains</B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> fontname)</PRE><DL><DD>Gets a set of registered fontnames.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>fontname</CODE> - of a font that may or may not be registered<DT><B>Returns:</B><DD>true if a given font is registered</DL></DD></DL><HR><A NAME="isRegistered(java.lang.String)"><!-- --></A><H3>isRegistered</H3><PRE>public static boolean <B>isRegistered</B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> fontname)</PRE><DL><DD>Checks if a certain font is registered.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>fontname</CODE> - the name of the font that has to be checked.<DT><B>Returns:</B><DD>true if the font is found</DL></DD></DL><HR><A NAME="getFontImp()"><!-- --></A><H3>getFontImp</H3><PRE>public static <A HREF="../../../com/lowagie/text/FontFactoryImp.html" title="class in com.lowagie.text">FontFactoryImp</A> <B>getFontImp</B>()</PRE><DL
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -