?? truetypefont.html
字號:
<PRE>
<A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/String.html">String</A>[][] <B>getNames</B>(int id) throws <A HREF="../../../../com/lowagie/text/DocumentException.html">DocumentException</A>, <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/io/IOException.html">IOException</A></PRE>
<DL>
<DD>Extracts the names of the font in all the languages available.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>id</CODE> - the name id to retrieve<DT><B>Throws:</B><DD><CODE><A HREF="../../../../com/lowagie/text/DocumentException.html">DocumentException</A></CODE> - on error<DD><CODE><A HREF="http://java.sun.com/j2se/1.3/docs/api/java/io/IOException.html">IOException</A></CODE> - on error</DL>
</DD>
</DL>
<HR>
<A NAME="checkCff()"><!-- --></A><H3>
checkCff</H3>
<PRE>
void <B>checkCff</B>() throws <A HREF="../../../../com/lowagie/text/DocumentException.html">DocumentException</A>, <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/io/IOException.html">IOException</A></PRE>
<DL>
<DD><DL>
<DD><CODE><A HREF="../../../../com/lowagie/text/DocumentException.html">DocumentException</A></CODE><DD><CODE><A HREF="http://java.sun.com/j2se/1.3/docs/api/java/io/IOException.html">IOException</A></CODE></DL>
</DD>
</DL>
<HR>
<A NAME="process(byte[])"><!-- --></A><H3>
process</H3>
<PRE>
void <B>process</B>(byte[] ttfAfm) throws <A HREF="../../../../com/lowagie/text/DocumentException.html">DocumentException</A>, <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/io/IOException.html">IOException</A></PRE>
<DL>
<DD>Reads the font data.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>ttfAfm</CODE> - the font as a <CODE>byte</CODE> array, possibly <CODE>null</CODE><DT><B>Throws:</B><DD><CODE><A HREF="../../../../com/lowagie/text/DocumentException.html">DocumentException</A></CODE> - the font is invalid<DD><CODE><A HREF="http://java.sun.com/j2se/1.3/docs/api/java/io/IOException.html">IOException</A></CODE> - the font file could not be read</DL>
</DD>
</DL>
<HR>
<A NAME="readStandardString(int)"><!-- --></A><H3>
readStandardString</H3>
<PRE>
protected <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/String.html">String</A> <B>readStandardString</B>(int length) throws <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/io/IOException.html">IOException</A></PRE>
<DL>
<DD>Reads a <CODE>String</CODE> from the font file as bytes using the Cp1252 encoding.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>length</CODE> - the length of bytes to read<DT><B>Returns:</B><DD>the <CODE>String</CODE> read<DT><B>Throws:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.3/docs/api/java/io/IOException.html">IOException</A></CODE> - the font file could not be read</DL>
</DD>
</DL>
<HR>
<A NAME="readUnicodeString(int)"><!-- --></A><H3>
readUnicodeString</H3>
<PRE>
protected <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/String.html">String</A> <B>readUnicodeString</B>(int length) throws <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/io/IOException.html">IOException</A></PRE>
<DL>
<DD>Reads a Unicode <CODE>String</CODE> from the font file. Each character is represented by two bytes.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>length</CODE> - the length of bytes to read. The <CODE>String</CODE> will have <CODE>length</CODE>/2 characters<DT><B>Returns:</B><DD>the <CODE>String</CODE> read<DT><B>Throws:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.3/docs/api/java/io/IOException.html">IOException</A></CODE> - the font file could not be read</DL>
</DD>
</DL>
<HR>
<A NAME="readGlyphWidths()"><!-- --></A><H3>
readGlyphWidths</H3>
<PRE>
protected void <B>readGlyphWidths</B>() throws <A HREF="../../../../com/lowagie/text/DocumentException.html">DocumentException</A>, <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/io/IOException.html">IOException</A></PRE>
<DL>
<DD>Reads the glyphs widths. The widths are extracted from the table 'hmtx'. The glyphs are normalized to 1000 units.
<P>
<DD><DL>
<DT><B>Throws:</B><DD><CODE><A HREF="../../../../com/lowagie/text/DocumentException.html">DocumentException</A></CODE> - the font is invalid<DD><CODE><A HREF="http://java.sun.com/j2se/1.3/docs/api/java/io/IOException.html">IOException</A></CODE> - the font file could not be read</DL>
</DD>
</DL>
<HR>
<A NAME="getGlyphWidth(int)"><!-- --></A><H3>
getGlyphWidth</H3>
<PRE>
public int <B>getGlyphWidth</B>(int glyph)</PRE>
<DL>
<DD>Gets a glyph width.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>glyph</CODE> - the glyph to get the width of<DT><B>Returns:</B><DD>the width of the glyph in normalized 1000 units</DL>
</DD>
</DL>
<HR>
<A NAME="readCMaps()"><!-- --></A><H3>
readCMaps</H3>
<PRE>
void <B>readCMaps</B>() throws <A HREF="../../../../com/lowagie/text/DocumentException.html">DocumentException</A>, <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/io/IOException.html">IOException</A></PRE>
<DL>
<DD>Reads the several maps from the table 'cmap'. The maps of interest are 1.0 for symbolic fonts and 3.1 for all others. A symbolic font is defined as having the map 3.0.
<P>
<DD><DL>
<DT><B>Throws:</B><DD><CODE><A HREF="../../../../com/lowagie/text/DocumentException.html">DocumentException</A></CODE> - the font is invalid<DD><CODE><A HREF="http://java.sun.com/j2se/1.3/docs/api/java/io/IOException.html">IOException</A></CODE> - the font file could not be read</DL>
</DD>
</DL>
<HR>
<A NAME="readFormat0()"><!-- --></A><H3>
readFormat0</H3>
<PRE>
<A HREF="http://java.sun.com/j2se/1.3/docs/api/java/util/HashMap.html">HashMap</A> <B>readFormat0</B>() throws <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/io/IOException.html">IOException</A></PRE>
<DL>
<DD>The information in the maps of the table 'cmap' is coded in several formats. Format 0 is the Apple standard character to glyph index mapping table.
<P>
<DD><DL>
<DT><B>Returns:</B><DD>a <CODE>HashMap</CODE> representing this map<DT><B>Throws:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.3/docs/api/java/io/IOException.html">IOException</A></CODE> - the font file could not be read</DL>
</DD>
</DL>
<HR>
<A NAME="readFormat4()"><!-- --></A><H3>
readFormat4</H3>
<PRE>
<A HREF="http://java.sun.com/j2se/1.3/docs/api/java/util/HashMap.html">HashMap</A> <B>readFormat4</B>() throws <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/io/IOException.html">IOException</A></PRE>
<DL>
<DD>The information in the maps of the table 'cmap' is coded in several formats. Format 4 is the Microsoft standard character to glyph index mapping table.
<P>
<DD><DL>
<DT><B>Returns:</B><DD>a <CODE>HashMap</CODE> representing this map<DT><B>Throws:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.3/docs/api/java/io/IOException.html">IOException</A></CODE> - the font file could not be read</DL>
</DD>
</DL>
<HR>
<A NAME="readFormat6()"><!-- --></A><H3>
readFormat6</H3>
<PRE>
<A HREF="http://java.sun.com/j2se/1.3/docs/api/java/util/HashMap.html">HashMap</A> <B>readFormat6</B>() throws <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/io/IOException.html">IOException</A></PRE>
<DL>
<DD>The information in the maps of the table 'cmap' is coded in several formats. Format 6 is a trimmed table mapping. It is similar to format 0 but can have less than 256 entries.
<P>
<DD><DL>
<DT><B>Returns:</B><DD>a <CODE>HashMap</CODE> representing this map<DT><B>Throws:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.3/docs/api/java/io/IOException.html">IOException</A></CODE> - the font file could not be read</DL>
</DD>
</DL>
<HR>
<A NAME="readKerning()"><!-- --></A><H3>
readKerning</H3>
<PRE>
void <B>readKerning</B>() throws <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/io/IOException.html">IOException</A></PRE>
<DL>
<DD>Reads the kerning information from the 'kern' table.
<P>
<DD><DL>
<DT><B>Throws:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.3/docs/api/java/io/IOException.html">IOException</A></CODE> - the font file could not be read</DL>
</DD>
</DL>
<HR>
<A NAME="getKerning(char, char)"><!-- --></A><H3>
getKerning</H3>
<PRE>
public int <B>getKerning</B>(char char1, char 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(char, char)">getKerning</A></CODE> in class <CODE><A HREF="../../../../com/lowagie/text/pdf/BaseFont.html">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="getRawWidth(int, java.lang.String)"><!-- --></A><H3>
getRawWidth</H3>
<PRE>
protected int <B>getRawWidth</B>(int c, <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/String.html">String</A> name)</PRE>
<DL>
<DD>Gets the width from the font according to the unicode char <CODE>c</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">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="getFontDescriptor(com.lowagie.text.pdf.PdfIndirectReference, java.lang.String)"><!-- --></A><H3>
getFontDescriptor</H3>
<PRE>
protected <A HREF="../../../../com/lowagie/text/pdf/PdfDictionary.html">PdfDictionary</A> <B>getFontDescriptor</B>(<A HREF="../../../../com/lowagie/text/pdf/PdfIndirectReference.html">PdfIndirectReference</A> fontStream, <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/String.html">String</A> subsetPrefix) throws <A HREF="../../../../com/lowagie/text/DocumentException.html">DocumentException</A></PRE>
<DL>
<DD>Generates the font descriptor for this font.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>subsetPrefix</CODE> - the subset prefix<DD><CODE>fontStream</CODE> - the indirect reference to a PdfStream containing the font or <CODE>null</CODE><DT><B>Returns:</B><DD>the PdfDictionary containing the font descriptor or <CODE>null</CODE><DT><B>Throws:</B><DD><CODE><A HREF="../../../../com/lowagie/text/DocumentException.html">DocumentException</A></CODE> - if there is an error</DL>
</DD>
</DL>
<HR>
<A NAME="getFontBaseType(com.lowagie.text.pdf.PdfIndirectReference, java.lang.String, int, int, byte[])"><!-- --></A><H3>
getFontBaseType</H3>
<PRE>
protected <A HREF="../../../../com/lowagie/text/pdf/PdfD
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -