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

📄 documentfont.html

📁 IText PDF开发工具说明文档,使用很方便。
💻 HTML
📖 第 1 页 / 共 5 页
字号:
<DD>Gets all the entries of the names-table. If it is a True Type font each array element will have {Name ID, Platform ID, Platform Encoding ID, Language ID, font name}. The interpretation of this values can be found in the Open Type specification, chapter 2, in the 'name' table.<br> For the other fonts the array has a single element with {"4", "", "", "", font name}.<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../../com/lowagie/text/pdf/BaseFont.html#getAllNameEntries()">getAllNameEntries</A></CODE> in class <CODE><A HREF="../../../../com/lowagie/text/pdf/BaseFont.html" title="class in com.lowagie.text.pdf">BaseFont</A></CODE></DL></DD><DD><DL><DT><B>Returns:</B><DD>the full name of the font<DT><B>Since:</B></DT>  <DD>2.0.8</DD></DL></DD></DL><HR><A NAME="getKerning(int, int)"><!-- --></A><H3>getKerning</H3><PRE>public int <B>getKerning</B>(int&nbsp;char1,                      int&nbsp;char2)</PRE><DL><DD>Gets the kerning between two Unicode chars.<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../../com/lowagie/text/pdf/BaseFont.html#getKerning(int, int)">getKerning</A></CODE> in class <CODE><A HREF="../../../../com/lowagie/text/pdf/BaseFont.html" title="class in com.lowagie.text.pdf">BaseFont</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>char1</CODE> - the first char<DD><CODE>char2</CODE> - the second char<DT><B>Returns:</B><DD>the kerning to be applied</DL></DD></DL><HR><A NAME="getPostscriptFontName()"><!-- --></A><H3>getPostscriptFontName</H3><PRE>public <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> <B>getPostscriptFontName</B>()</PRE><DL><DD>Gets the postscript font name.<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../../com/lowagie/text/pdf/BaseFont.html#getPostscriptFontName()">getPostscriptFontName</A></CODE> in class <CODE><A HREF="../../../../com/lowagie/text/pdf/BaseFont.html" title="class in com.lowagie.text.pdf">BaseFont</A></CODE></DL></DD><DD><DL><DT><B>Returns:</B><DD>the postscript font name</DL></DD></DL><HR><A NAME="getRawWidth(int, java.lang.String)"><!-- --></A><H3>getRawWidth</H3><PRE>int <B>getRawWidth</B>(int&nbsp;c,                <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>&nbsp;name)</PRE><DL><DD>Gets the width from the font according to the Unicode char <CODE>c</CODE> or the <CODE>name</CODE>. If the <CODE>name</CODE> is null it's a symbolic font.<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../../com/lowagie/text/pdf/BaseFont.html#getRawWidth(int, java.lang.String)">getRawWidth</A></CODE> in class <CODE><A HREF="../../../../com/lowagie/text/pdf/BaseFont.html" title="class in com.lowagie.text.pdf">BaseFont</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>c</CODE> - the unicode char<DD><CODE>name</CODE> - the glyph name<DT><B>Returns:</B><DD>the width of the char</DL></DD></DL><HR><A NAME="hasKernPairs()"><!-- --></A><H3>hasKernPairs</H3><PRE>public boolean <B>hasKernPairs</B>()</PRE><DL><DD>Checks if the font has any kerning pairs.<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../../com/lowagie/text/pdf/BaseFont.html#hasKernPairs()">hasKernPairs</A></CODE> in class <CODE><A HREF="../../../../com/lowagie/text/pdf/BaseFont.html" title="class in com.lowagie.text.pdf">BaseFont</A></CODE></DL></DD><DD><DL><DT><B>Returns:</B><DD><CODE>true</CODE> if the font has any kerning pairs</DL></DD></DL><HR><A NAME="writeFont(com.lowagie.text.pdf.PdfWriter, com.lowagie.text.pdf.PdfIndirectReference, java.lang.Object[])"><!-- --></A><H3>writeFont</H3><PRE>void <B>writeFont</B>(<A HREF="../../../../com/lowagie/text/pdf/PdfWriter.html" title="class in com.lowagie.text.pdf">PdfWriter</A>&nbsp;writer,               <A HREF="../../../../com/lowagie/text/pdf/PdfIndirectReference.html" title="class in com.lowagie.text.pdf">PdfIndirectReference</A>&nbsp;ref,               <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A>[]&nbsp;params)         throws <A HREF="../../../../com/lowagie/text/DocumentException.html" title="class in com.lowagie.text">DocumentException</A>,                <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</A></PRE><DL><DD>Outputs to the writer the font dictionaries and streams.<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../../com/lowagie/text/pdf/BaseFont.html#writeFont(com.lowagie.text.pdf.PdfWriter, com.lowagie.text.pdf.PdfIndirectReference, java.lang.Object[])">writeFont</A></CODE> in class <CODE><A HREF="../../../../com/lowagie/text/pdf/BaseFont.html" title="class in com.lowagie.text.pdf">BaseFont</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>writer</CODE> - the writer for this document<DD><CODE>ref</CODE> - the font indirect reference<DD><CODE>params</CODE> - several parameters that depend on the font type<DT><B>Throws:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.4/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</A></CODE> - on error<DD><CODE><A HREF="../../../../com/lowagie/text/DocumentException.html" title="class in com.lowagie.text">DocumentException</A></CODE> - error in generating the object</DL></DD></DL><HR><A NAME="getWidth(int)"><!-- --></A><H3>getWidth</H3><PRE>public int <B>getWidth</B>(int&nbsp;char1)</PRE><DL><DD>Gets the width of a <CODE>char</CODE> in normalized 1000 units.<P><DD><DL><DT><B>Overrides:</B><DD><CODE><A HREF="../../../../com/lowagie/text/pdf/BaseFont.html#getWidth(int)">getWidth</A></CODE> in class <CODE><A HREF="../../../../com/lowagie/text/pdf/BaseFont.html" title="class in com.lowagie.text.pdf">BaseFont</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>char1</CODE> - the unicode <CODE>char</CODE> to get the width of<DT><B>Returns:</B><DD>the width in normalized 1000 units</DL></DD></DL><HR><A NAME="getWidth(java.lang.String)"><!-- --></A><H3>getWidth</H3><PRE>public int <B>getWidth</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>&nbsp;text)</PRE><DL><DD><B>Description copied from class: <CODE><A HREF="../../../../com/lowagie/text/pdf/BaseFont.html#getWidth(java.lang.String)">BaseFont</A></CODE></B></DD><DD>Gets the width of a <CODE>String</CODE> in normalized 1000 units.<P><DD><DL><DT><B>Overrides:</B><DD><CODE><A HREF="../../../../com/lowagie/text/pdf/BaseFont.html#getWidth(java.lang.String)">getWidth</A></CODE> in class <CODE><A HREF="../../../../com/lowagie/text/pdf/BaseFont.html" title="class in com.lowagie.text.pdf">BaseFont</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>text</CODE> - the <CODE>String</CODE> to get the witdth of<DT><B>Returns:</B><DD>the width in normalized 1000 units</DL></DD></DL><HR><A NAME="convertToBytes(java.lang.String)"><!-- --></A><H3>convertToBytes</H3><PRE>byte[] <B>convertToBytes</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>&nbsp;text)</PRE><DL><DD><B>Description copied from class: <CODE><A HREF="../../../../com/lowagie/text/pdf/BaseFont.html#convertToBytes(java.lang.String)">BaseFont</A></CODE></B></DD><DD>Converts a <CODE>String</CODE> to a </CODE>byte</CODE> array according to the font's encoding.<P><DD><DL><DT><B>Overrides:</B><DD><CODE><A HREF="../../../../com/lowagie/text/pdf/BaseFont.html#convertToBytes(java.lang.String)">convertToBytes</A></CODE> in class <CODE><A HREF="../../../../com/lowagie/text/pdf/BaseFont.html" title="class in com.lowagie.text.pdf">BaseFont</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>text</CODE> - the <CODE>String</CODE> to be converted<DT><B>Returns:</B><DD>an array of <CODE>byte</CODE> representing the conversion according to the font's encoding</DL></DD></DL><HR><A NAME="convertToBytes(int)"><!-- --></A><H3>convertToBytes</H3><PRE>byte[] <B>convertToBytes</B>(int&nbsp;char1)</PRE><DL><DD><B>Description copied from class: <CODE><A HREF="../../../../com/lowagie/text/pdf/BaseFont.html#convertToBytes(int)">BaseFont</A></CODE></B></DD><DD>Converts a <CODE>char</CODE> to a </CODE>byte</CODE> array according to the font's encoding.<P><DD><DL><DT><B>Overrides:</B><DD><CODE><A HREF="../../../../com/lowagie/text/pdf/BaseFont.html#convertToBytes(int)">convertToBytes</A></CODE> in class <CODE><A HREF="../../../../com/lowagie/text/pdf/BaseFont.html" title="class in com.lowagie.text.pdf">BaseFont</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>char1</CODE> - the <CODE>char</CODE> to be converted<DT><B>Returns:</B><DD>an array of <CODE>byte</CODE> representing the conversion according to the font's encoding</DL></DD></DL><HR><A NAME="getIndirectReference()"><!-- --></A><H3>getIndirectReference</H3><PRE><A HREF="../../../../com/lowagie/text/pdf/PdfIndirectReference.html" title="class in com.lowagie.text.pdf">PdfIndirectReference</A> <B>getIndirectReference</B>()</PRE><DL><DD><DL></DL></DD></DL><HR><A NAME="charExists(int)"><!-- --></A><H3>charExists</H3><PRE>public boolean <B>charExists</B>(int&nbsp;c)</PRE><DL><DD><B>Description copied from class: <CODE><A HREF="../../../../com/lowagie/text/pdf/BaseFont.html#charExists(int)">BaseFont</A></CODE></B></DD><DD>Checks if a character exists in this font.<P><DD><DL><DT><B>Overrides:</B><DD><CODE><A HREF="../../../../com/lowagie/text/pdf/BaseFont.html#charExists(int)">charExists</A></CODE> in class <CODE><A HREF="../../../../com/lowagie/text/pdf/BaseFont.html" title="class in com.lowagie.text.pdf">BaseFont</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>c</CODE> - the character to check<DT><B>Returns:</B><DD><CODE>true</CODE> if the character has a glyph, <CODE>false</CODE> otherwise</DL></DD></DL><HR><A NAME="setPostscriptFontName(java.lang.String)"><!-- --></A><H3>setPostscriptFontName</H3><PRE>public void <B>setPostscriptFontName</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>&nbsp;name)</PRE><DL><DD>Sets the font name that will appear in the pdf font dictionary. It does nothing in this case as the font is already in the document.<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../../com/lowagie/text/pdf/BaseFont.html#setPostscriptFontName(java.lang.String)">setPostscriptFontName</A></CODE> in class <CODE><A HREF="../../../../com/lowagie/text/pdf/BaseFont.html" title="class in com.lowagie.text.pdf">BaseFont</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>name</CODE> - the new font name</DL></DD></DL><HR><A NAME="setKerning(int, int, int)"><!-- --></A><H3>setKerning</H3><PRE>public boolean <B>setKerning</B>(int&nbsp;char1,                          int&nbsp;char2,                          int&nbsp;kern)</PRE><DL><DD><B>Description copied from class: <CODE><

⌨️ 快捷键说明

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