📄 truetypefontunicode.html
字号:
<A NAME="vertical"><!-- --></A><H3>vertical</H3><PRE>boolean <B>vertical</B></PRE><DL><DD><CODE>true</CODE> if the encoding is vertical.<P><DL></DL></DL><HR><A NAME="rotbits"><!-- --></A><H3>rotbits</H3><PRE>private static final byte[] <B>rotbits</B></PRE><DL><DL></DL></DL><!-- ========= CONSTRUCTOR DETAIL ======== --><A NAME="constructor_detail"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"><B>Constructor Detail</B></FONT></TH></TR></TABLE><A NAME="TrueTypeFontUnicode(java.lang.String, java.lang.String, boolean, byte[])"><!-- --></A><H3>TrueTypeFontUnicode</H3><PRE><B>TrueTypeFontUnicode</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> ttFile, <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> enc, boolean emb, byte[] ttfAfm) 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>Creates a new TrueType font addressed by Unicode characters. The font will always be embedded.<P><DL><DT><B>Parameters:</B><DD><CODE>ttFile</CODE> - the location of the font on file. The file must end in '.ttf'. The modifiers after the name are ignored.<DD><CODE>enc</CODE> - the encoding to be applied to this font<DD><CODE>emb</CODE> - true if the font is to be embedded in the PDF<DD><CODE>ttfAfm</CODE> - the font as a <CODE>byte</CODE> array<DT><B>Throws:</B><DD><CODE><A HREF="../../../../com/lowagie/text/DocumentException.html" title="class in com.lowagie.text">DocumentException</A></CODE> - the font is invalid<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> - the font file could not be read</DL></DL><!-- ============ METHOD DETAIL ========== --><A NAME="method_detail"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"><B>Method Detail</B></FONT></TH></TR></TABLE><A NAME="getWidth(int)"><!-- --></A><H3>getWidth</H3><PRE>public int <B>getWidth</B>(int 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> text)</PRE><DL><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 width of<DT><B>Returns:</B><DD>the width in normalized 1000 units</DL></DD></DL><HR><A NAME="getToUnicode(java.lang.Object[])"><!-- --></A><H3>getToUnicode</H3><PRE>private <A HREF="../../../../com/lowagie/text/pdf/PdfStream.html" title="class in com.lowagie.text.pdf">PdfStream</A> <B>getToUnicode</B>(<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>[] metrics)</PRE><DL><DD>Creates a ToUnicode CMap to allow copy and paste from Acrobat.<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>metrics</CODE> - metrics[0] contains the glyph index and metrics[2] contains the Unicode code<DT><B>Returns:</B><DD>the stream representing this CMap or <CODE>null</CODE><DT><B>Throws:</B><DD><CODE><A HREF="../../../../com/lowagie/text/DocumentException.html" title="class in com.lowagie.text">DocumentException</A></CODE> - on error</DL></DD></DL><HR><A NAME="toHex4(int)"><!-- --></A><H3>toHex4</H3><PRE>private static <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>toHex4</B>(int n)</PRE><DL><DD><DL></DL></DD><DD><DL></DL></DD></DL><HR><A NAME="toHex(int)"><!-- --></A><H3>toHex</H3><PRE>static <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>toHex</B>(int n)</PRE><DL><DD>Gets an hex string in the format "<HHHH>".<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>n</CODE> - the number<DT><B>Returns:</B><DD>the hex string</DL></DD></DL><HR><A NAME="getCIDFontType2(com.lowagie.text.pdf.PdfIndirectReference, java.lang.String, java.lang.Object[])"><!-- --></A><H3>getCIDFontType2</H3><PRE>private <A HREF="../../../../com/lowagie/text/pdf/PdfDictionary.html" title="class in com.lowagie.text.pdf">PdfDictionary</A> <B>getCIDFontType2</B>(<A HREF="../../../../com/lowagie/text/pdf/PdfIndirectReference.html" title="class in com.lowagie.text.pdf">PdfIndirectReference</A> fontDescriptor, <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> subsetPrefix, <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>[] metrics)</PRE><DL><DD>Generates the CIDFontTyte2 dictionary.<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>fontDescriptor</CODE> - the indirect reference to the font descriptor<DD><CODE>subsetPrefix</CODE> - the subset prefix<DD><CODE>metrics</CODE> - the horizontal width metrics<DT><B>Returns:</B><DD>a stream</DL></DD></DL><HR><A NAME="getFontBaseType(com.lowagie.text.pdf.PdfIndirectReference, java.lang.String, com.lowagie.text.pdf.PdfIndirectReference)"><!-- --></A><H3>getFontBaseType</H3><PRE>private <A HREF="../../../../com/lowagie/text/pdf/PdfDictionary.html" title="class in com.lowagie.text.pdf">PdfDictionary</A> <B>getFontBaseType</B>(<A HREF="../../../../com/lowagie/text/pdf/PdfIndirectReference.html" title="class in com.lowagie.text.pdf">PdfIndirectReference</A> descendant, <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> subsetPrefix, <A HREF="../../../../com/lowagie/text/pdf/PdfIndirectReference.html" title="class in com.lowagie.text.pdf">PdfIndirectReference</A> toUnicode)</PRE><DL><DD>Generates the font dictionary.<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>descendant</CODE> - the descendant dictionary<DD><CODE>subsetPrefix</CODE> - the subset prefix<DD><CODE>toUnicode</CODE> - the ToUnicode stream<DT><B>Returns:</B><DD>the stream</DL></DD></DL><HR><A NAME="compare(java.lang.Object, java.lang.Object)"><!-- --></A><H3>compare</H3><PRE>public int <B>compare</B>(<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> o1, <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> o2)</PRE><DL><DD>The method used to sort the metrics array.<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.4/docs/api/java/util/Comparator.html?is-external=true#compare(T, T)" title="class or interface in java.util">compare</A></CODE> in interface <CODE><A HREF="http://java.sun.com/j2se/1.4/docs/api/java/util/Comparator.html?is-external=true" title="class or interface in java.util">Comparator</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>o1</CODE> - the first element<DD><CODE>o2</CODE> - the second element<DT><B>Returns:</B><DD>the comparison</DL></DD>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -