1510 lines
58 KiB
HTML
1510 lines
58 KiB
HTML
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
|
<!--NewPage-->
|
|
<HTML>
|
|
<HEAD>
|
|
<!-- Generated by javadoc (build 1.6.0_34) on Mon Jun 03 22:20:31 BST 2013 -->
|
|
<TITLE>
|
|
UnicodeFont (Slick - The 2D Library)
|
|
</TITLE>
|
|
|
|
<META NAME="date" CONTENT="2013-06-03">
|
|
|
|
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style">
|
|
|
|
<SCRIPT type="text/javascript">
|
|
function windowTitle()
|
|
{
|
|
if (location.href.indexOf('is-external=true') == -1) {
|
|
parent.document.title="UnicodeFont (Slick - The 2D Library)";
|
|
}
|
|
}
|
|
</SCRIPT>
|
|
<NOSCRIPT>
|
|
</NOSCRIPT>
|
|
|
|
</HEAD>
|
|
|
|
<BODY BGCOLOR="white" onload="windowTitle();">
|
|
<HR>
|
|
|
|
|
|
<!-- ========= START OF TOP NAVBAR ======= -->
|
|
<A NAME="navbar_top"><!-- --></A>
|
|
<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
|
|
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
|
|
<TR>
|
|
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
|
|
<A NAME="navbar_top_firstrow"><!-- --></A>
|
|
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
|
|
<TR ALIGN="center" VALIGN="top">
|
|
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD>
|
|
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
|
|
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
|
|
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/UnicodeFont.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD>
|
|
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
|
|
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
|
|
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
|
|
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
|
|
</TR>
|
|
</TABLE>
|
|
</TD>
|
|
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
|
|
</EM>
|
|
</TD>
|
|
</TR>
|
|
|
|
<TR>
|
|
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
|
<A HREF="../../../org/newdawn/slick/TrueTypeFont.html" title="class in org.newdawn.slick"><B>PREV CLASS</B></A>
|
|
<A HREF="../../../org/newdawn/slick/UnicodeFont.DisplayList.html" title="class in org.newdawn.slick"><B>NEXT CLASS</B></A></FONT></TD>
|
|
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
|
<A HREF="../../../index.html?org/newdawn/slick/UnicodeFont.html" target="_top"><B>FRAMES</B></A>
|
|
<A HREF="UnicodeFont.html" target="_top"><B>NO FRAMES</B></A>
|
|
<SCRIPT type="text/javascript">
|
|
<!--
|
|
if(window==top) {
|
|
document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>');
|
|
}
|
|
//-->
|
|
</SCRIPT>
|
|
<NOSCRIPT>
|
|
<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>
|
|
</NOSCRIPT>
|
|
|
|
|
|
</FONT></TD>
|
|
</TR>
|
|
<TR>
|
|
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
|
|
SUMMARY: <A HREF="#nested_class_summary">NESTED</A> | FIELD | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD>
|
|
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
|
|
DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD>
|
|
</TR>
|
|
</TABLE>
|
|
<A NAME="skip-navbar_top"></A>
|
|
<!-- ========= END OF TOP NAVBAR ========= -->
|
|
|
|
<HR>
|
|
<!-- ======== START OF CLASS DATA ======== -->
|
|
<H2>
|
|
<FONT SIZE="-1">
|
|
org.newdawn.slick</FONT>
|
|
<BR>
|
|
Class UnicodeFont</H2>
|
|
<PRE>
|
|
java.lang.Object
|
|
<IMG SRC="../../../resources/inherit.gif" ALT="extended by "><B>org.newdawn.slick.UnicodeFont</B>
|
|
</PRE>
|
|
<DL>
|
|
<DT><B>All Implemented Interfaces:</B> <DD><A HREF="../../../org/newdawn/slick/Font.html" title="interface in org.newdawn.slick">Font</A></DD>
|
|
</DL>
|
|
<HR>
|
|
<DL>
|
|
<DT><PRE>public class <B>UnicodeFont</B><DT>extends java.lang.Object<DT>implements <A HREF="../../../org/newdawn/slick/Font.html" title="interface in org.newdawn.slick">Font</A></DL>
|
|
</PRE>
|
|
|
|
<P>
|
|
A Slick bitmap font that can display unicode glyphs from a TrueTypeFont.
|
|
|
|
For efficiency, glyphs are packed on to textures. Glyphs can be loaded to the textures on the fly, when they are first needed
|
|
for display. However, it is best to load the glyphs that are known to be needed at startup.
|
|
<P>
|
|
|
|
<P>
|
|
<DL>
|
|
<DT><B>Author:</B></DT>
|
|
<DD>Nathan Sweet <misc@n4te.com></DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<P>
|
|
<!-- ======== NESTED CLASS SUMMARY ======== -->
|
|
|
|
<A NAME="nested_class_summary"><!-- --></A>
|
|
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
|
|
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
|
|
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
|
|
<B>Nested Class Summary</B></FONT></TH>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE>static class</CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../../org/newdawn/slick/UnicodeFont.DisplayList.html" title="class in org.newdawn.slick">UnicodeFont.DisplayList</A></B></CODE>
|
|
|
|
<BR>
|
|
A simple descriptor for display lists cached within this font</TD>
|
|
</TR>
|
|
</TABLE>
|
|
|
|
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
|
|
|
|
<A NAME="constructor_summary"><!-- --></A>
|
|
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
|
|
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
|
|
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
|
|
<B>Constructor Summary</B></FONT></TH>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD><CODE><B><A HREF="../../../org/newdawn/slick/UnicodeFont.html#UnicodeFont(java.awt.Font)">UnicodeFont</A></B>(java.awt.Font font)</CODE>
|
|
|
|
<BR>
|
|
Creates a new UnicodeFont.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD><CODE><B><A HREF="../../../org/newdawn/slick/UnicodeFont.html#UnicodeFont(java.awt.Font, org.newdawn.slick.font.HieroSettings)">UnicodeFont</A></B>(java.awt.Font font,
|
|
<A HREF="../../../org/newdawn/slick/font/HieroSettings.html" title="class in org.newdawn.slick.font">HieroSettings</A> settings)</CODE>
|
|
|
|
<BR>
|
|
Creates a new UnicodeFont.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD><CODE><B><A HREF="../../../org/newdawn/slick/UnicodeFont.html#UnicodeFont(java.awt.Font, int, boolean, boolean)">UnicodeFont</A></B>(java.awt.Font font,
|
|
int size,
|
|
boolean bold,
|
|
boolean italic)</CODE>
|
|
|
|
<BR>
|
|
Creates a new UnicodeFont.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD><CODE><B><A HREF="../../../org/newdawn/slick/UnicodeFont.html#UnicodeFont(java.awt.Font, java.lang.String)">UnicodeFont</A></B>(java.awt.Font font,
|
|
java.lang.String hieroFileRef)</CODE>
|
|
|
|
<BR>
|
|
Creates a new UnicodeFont.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD><CODE><B><A HREF="../../../org/newdawn/slick/UnicodeFont.html#UnicodeFont(java.lang.String, org.newdawn.slick.font.HieroSettings)">UnicodeFont</A></B>(java.lang.String ttfFileRef,
|
|
<A HREF="../../../org/newdawn/slick/font/HieroSettings.html" title="class in org.newdawn.slick.font">HieroSettings</A> settings)</CODE>
|
|
|
|
<BR>
|
|
Create a new unicode font based on a TTF file and a set of heiro configuration</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD><CODE><B><A HREF="../../../org/newdawn/slick/UnicodeFont.html#UnicodeFont(java.lang.String, int, boolean, boolean)">UnicodeFont</A></B>(java.lang.String ttfFileRef,
|
|
int size,
|
|
boolean bold,
|
|
boolean italic)</CODE>
|
|
|
|
<BR>
|
|
Create a new unicode font based on a TTF file alone</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD><CODE><B><A HREF="../../../org/newdawn/slick/UnicodeFont.html#UnicodeFont(java.lang.String, java.lang.String)">UnicodeFont</A></B>(java.lang.String ttfFileRef,
|
|
java.lang.String hieroFileRef)</CODE>
|
|
|
|
<BR>
|
|
Create a new unicode font based on a TTF file</TD>
|
|
</TR>
|
|
</TABLE>
|
|
|
|
<!-- ========== METHOD SUMMARY =========== -->
|
|
|
|
<A NAME="method_summary"><!-- --></A>
|
|
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
|
|
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
|
|
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
|
|
<B>Method Summary</B></FONT></TH>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> void</CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../../org/newdawn/slick/UnicodeFont.html#addAsciiGlyphs()">addAsciiGlyphs</A></B>()</CODE>
|
|
|
|
<BR>
|
|
Queues the glyphs in the ASCII character set (codepoints 32 through 255) to be loaded.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> void</CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../../org/newdawn/slick/UnicodeFont.html#addGlyphs(int, int)">addGlyphs</A></B>(int startCodePoint,
|
|
int endCodePoint)</CODE>
|
|
|
|
<BR>
|
|
Queues the glyphs in the specified codepoint range (inclusive) to be loaded.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> void</CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../../org/newdawn/slick/UnicodeFont.html#addGlyphs(java.lang.String)">addGlyphs</A></B>(java.lang.String text)</CODE>
|
|
|
|
<BR>
|
|
Queues the glyphs in the specified text to be loaded.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> void</CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../../org/newdawn/slick/UnicodeFont.html#addNeheGlyphs()">addNeheGlyphs</A></B>()</CODE>
|
|
|
|
<BR>
|
|
Queues the glyphs in the NEHE character set (codepoints 32 through 128) to be loaded.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> void</CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../../org/newdawn/slick/UnicodeFont.html#clearGlyphs()">clearGlyphs</A></B>()</CODE>
|
|
|
|
<BR>
|
|
Clears all loaded and queued glyphs.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> void</CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../../org/newdawn/slick/UnicodeFont.html#destroy()">destroy</A></B>()</CODE>
|
|
|
|
<BR>
|
|
Releases all resources used by this UnicodeFont.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> <A HREF="../../../org/newdawn/slick/UnicodeFont.DisplayList.html" title="class in org.newdawn.slick">UnicodeFont.DisplayList</A></CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../../org/newdawn/slick/UnicodeFont.html#drawDisplayList(float, float, java.lang.String, org.newdawn.slick.Color, int, int)">drawDisplayList</A></B>(float x,
|
|
float y,
|
|
java.lang.String text,
|
|
<A HREF="../../../org/newdawn/slick/Color.html" title="class in org.newdawn.slick">Color</A> color,
|
|
int startIndex,
|
|
int endIndex)</CODE>
|
|
|
|
<BR>
|
|
Identical to <A HREF="../../../org/newdawn/slick/UnicodeFont.html#drawString(float, float, java.lang.String, org.newdawn.slick.Color, int, int)"><CODE>drawString(float, float, String, Color, int, int)</CODE></A> but returns a
|
|
DisplayList which provides access to the width and height of the text drawn.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> void</CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../../org/newdawn/slick/UnicodeFont.html#drawString(float, float, java.lang.String)">drawString</A></B>(float x,
|
|
float y,
|
|
java.lang.String text)</CODE>
|
|
|
|
<BR>
|
|
Draw a string to the screen</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> void</CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../../org/newdawn/slick/UnicodeFont.html#drawString(float, float, java.lang.String, org.newdawn.slick.Color)">drawString</A></B>(float x,
|
|
float y,
|
|
java.lang.String text,
|
|
<A HREF="../../../org/newdawn/slick/Color.html" title="class in org.newdawn.slick">Color</A> col)</CODE>
|
|
|
|
<BR>
|
|
Draw a string to the screen</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> void</CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../../org/newdawn/slick/UnicodeFont.html#drawString(float, float, java.lang.String, org.newdawn.slick.Color, int, int)">drawString</A></B>(float x,
|
|
float y,
|
|
java.lang.String text,
|
|
<A HREF="../../../org/newdawn/slick/Color.html" title="class in org.newdawn.slick">Color</A> color,
|
|
int startIndex,
|
|
int endIndex)</CODE>
|
|
|
|
<BR>
|
|
Draw part of a string to the screen.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> int</CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../../org/newdawn/slick/UnicodeFont.html#getAscent()">getAscent</A></B>()</CODE>
|
|
|
|
<BR>
|
|
Gets the distance from the baseline to the y drawing location.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> int</CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../../org/newdawn/slick/UnicodeFont.html#getDescent()">getDescent</A></B>()</CODE>
|
|
|
|
<BR>
|
|
Gets the distance from the baseline to the bottom of most alphanumeric characters
|
|
with descenders.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> java.util.List</CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../../org/newdawn/slick/UnicodeFont.html#getEffects()">getEffects</A></B>()</CODE>
|
|
|
|
<BR>
|
|
Returns a list of <A HREF="../../../org/newdawn/slick/font/effects/Effect.html" title="interface in org.newdawn.slick.font.effects"><CODE>Effect</CODE></A>s that will be applied
|
|
to the glyphs.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> java.awt.Font</CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../../org/newdawn/slick/UnicodeFont.html#getFont()">getFont</A></B>()</CODE>
|
|
|
|
<BR>
|
|
Returns the TrueTypeFont for this UnicodeFont.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> java.lang.String</CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../../org/newdawn/slick/UnicodeFont.html#getFontFile()">getFontFile</A></B>()</CODE>
|
|
|
|
<BR>
|
|
Returns the path to the TTF file for this UnicodeFont, or null.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> int</CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../../org/newdawn/slick/UnicodeFont.html#getGlyphPageHeight()">getGlyphPageHeight</A></B>()</CODE>
|
|
|
|
<BR>
|
|
Returns the height of the backing textures.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> java.util.List</CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../../org/newdawn/slick/UnicodeFont.html#getGlyphPages()">getGlyphPages</A></B>()</CODE>
|
|
|
|
<BR>
|
|
Returns the GlyphPages for this UnicodeFont.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> int</CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../../org/newdawn/slick/UnicodeFont.html#getGlyphPageWidth()">getGlyphPageWidth</A></B>()</CODE>
|
|
|
|
<BR>
|
|
Returns the width of the backing textures.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> int</CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../../org/newdawn/slick/UnicodeFont.html#getHeight(java.lang.String)">getHeight</A></B>(java.lang.String text)</CODE>
|
|
|
|
<BR>
|
|
Get the height of the given string</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> int</CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../../org/newdawn/slick/UnicodeFont.html#getLeading()">getLeading</A></B>()</CODE>
|
|
|
|
<BR>
|
|
Gets the extra distance between the descent of one line of text to the ascent of the next.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> int</CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../../org/newdawn/slick/UnicodeFont.html#getLineHeight()">getLineHeight</A></B>()</CODE>
|
|
|
|
<BR>
|
|
Returns the distance from one line of text to the next.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> int</CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../../org/newdawn/slick/UnicodeFont.html#getPaddingAdvanceX()">getPaddingAdvanceX</A></B>()</CODE>
|
|
|
|
<BR>
|
|
Gets the additional amount to offset glyphs on the x axis.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> int</CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../../org/newdawn/slick/UnicodeFont.html#getPaddingAdvanceY()">getPaddingAdvanceY</A></B>()</CODE>
|
|
|
|
<BR>
|
|
Gets the additional amount to offset a line of text on the y axis.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> int</CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../../org/newdawn/slick/UnicodeFont.html#getPaddingBottom()">getPaddingBottom</A></B>()</CODE>
|
|
|
|
<BR>
|
|
Returns the padding below a glyph on the GlyphPage to allow for effects to be drawn.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> int</CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../../org/newdawn/slick/UnicodeFont.html#getPaddingLeft()">getPaddingLeft</A></B>()</CODE>
|
|
|
|
<BR>
|
|
Returns the padding to the left of a glyph on the GlyphPage to allow for effects to be drawn.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> int</CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../../org/newdawn/slick/UnicodeFont.html#getPaddingRight()">getPaddingRight</A></B>()</CODE>
|
|
|
|
<BR>
|
|
Returns the padding to the right of a glyph on the GlyphPage to allow for effects to be drawn.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> int</CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../../org/newdawn/slick/UnicodeFont.html#getPaddingTop()">getPaddingTop</A></B>()</CODE>
|
|
|
|
<BR>
|
|
Returns the padding above a glyph on the GlyphPage to allow for effects to be drawn.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> int</CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../../org/newdawn/slick/UnicodeFont.html#getSpaceWidth()">getSpaceWidth</A></B>()</CODE>
|
|
|
|
<BR>
|
|
Returns the width of the space character.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> int</CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../../org/newdawn/slick/UnicodeFont.html#getWidth(java.lang.String)">getWidth</A></B>(java.lang.String text)</CODE>
|
|
|
|
<BR>
|
|
Get the width of the given string</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> int</CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../../org/newdawn/slick/UnicodeFont.html#getYOffset(java.lang.String)">getYOffset</A></B>(java.lang.String text)</CODE>
|
|
|
|
<BR>
|
|
Returns the distance from the y drawing location to the top most pixel of the
|
|
specified text.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> boolean</CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../../org/newdawn/slick/UnicodeFont.html#isCaching()">isCaching</A></B>()</CODE>
|
|
|
|
<BR>
|
|
Returns true if this UnicodeFont caches the glyph drawing instructions to
|
|
improve performance.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> boolean</CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../../org/newdawn/slick/UnicodeFont.html#loadGlyphs()">loadGlyphs</A></B>()</CODE>
|
|
|
|
<BR>
|
|
Loads all queued glyphs to the backing textures.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> boolean</CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../../org/newdawn/slick/UnicodeFont.html#loadGlyphs(int)">loadGlyphs</A></B>(int maxGlyphsToLoad)</CODE>
|
|
|
|
<BR>
|
|
Loads up to the specified number of queued glyphs to the backing textures.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> void</CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../../org/newdawn/slick/UnicodeFont.html#setDisplayListCaching(boolean)">setDisplayListCaching</A></B>(boolean displayListCaching)</CODE>
|
|
|
|
<BR>
|
|
Sets if this UnicodeFont caches the glyph drawing instructions to improve performance.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> void</CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../../org/newdawn/slick/UnicodeFont.html#setGlyphPageHeight(int)">setGlyphPageHeight</A></B>(int glyphPageHeight)</CODE>
|
|
|
|
<BR>
|
|
Sets the height of the backing textures.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> void</CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../../org/newdawn/slick/UnicodeFont.html#setGlyphPageWidth(int)">setGlyphPageWidth</A></B>(int glyphPageWidth)</CODE>
|
|
|
|
<BR>
|
|
Sets the width of the backing textures.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> void</CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../../org/newdawn/slick/UnicodeFont.html#setPaddingAdvanceX(int)">setPaddingAdvanceX</A></B>(int paddingAdvanceX)</CODE>
|
|
|
|
<BR>
|
|
Sets the additional amount to offset glyphs on the x axis.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> void</CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../../org/newdawn/slick/UnicodeFont.html#setPaddingAdvanceY(int)">setPaddingAdvanceY</A></B>(int paddingAdvanceY)</CODE>
|
|
|
|
<BR>
|
|
Sets the additional amount to offset a line of text on the y axis.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> void</CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../../org/newdawn/slick/UnicodeFont.html#setPaddingBottom(int)">setPaddingBottom</A></B>(int paddingBottom)</CODE>
|
|
|
|
<BR>
|
|
Sets the padding below a glyph on the GlyphPage to allow for effects to be drawn.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> void</CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../../org/newdawn/slick/UnicodeFont.html#setPaddingLeft(int)">setPaddingLeft</A></B>(int paddingLeft)</CODE>
|
|
|
|
<BR>
|
|
Sets the padding to the left of a glyph on the GlyphPage to allow for effects to be drawn.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> void</CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../../org/newdawn/slick/UnicodeFont.html#setPaddingRight(int)">setPaddingRight</A></B>(int paddingRight)</CODE>
|
|
|
|
<BR>
|
|
Sets the padding to the right of a glyph on the GlyphPage to allow for effects to be drawn.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> void</CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../../org/newdawn/slick/UnicodeFont.html#setPaddingTop(int)">setPaddingTop</A></B>(int paddingTop)</CODE>
|
|
|
|
<BR>
|
|
Sets the padding above a glyph on the GlyphPage to allow for effects to be drawn.</TD>
|
|
</TR>
|
|
</TABLE>
|
|
<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
|
|
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
|
|
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
|
|
<TH ALIGN="left"><B>Methods inherited from class java.lang.Object</B></TH>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD><CODE>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</CODE></TD>
|
|
</TR>
|
|
</TABLE>
|
|
|
|
<P>
|
|
|
|
<!-- ========= 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="UnicodeFont(java.lang.String, java.lang.String)"><!-- --></A><H3>
|
|
UnicodeFont</H3>
|
|
<PRE>
|
|
public <B>UnicodeFont</B>(java.lang.String ttfFileRef,
|
|
java.lang.String hieroFileRef)
|
|
throws <A HREF="../../../org/newdawn/slick/SlickException.html" title="class in org.newdawn.slick">SlickException</A></PRE>
|
|
<DL>
|
|
<DD>Create a new unicode font based on a TTF file
|
|
<P>
|
|
<DL>
|
|
<DT><B>Parameters:</B><DD><CODE>ttfFileRef</CODE> - The file system or classpath location of the TrueTypeFont file.<DD><CODE>hieroFileRef</CODE> - The file system or classpath location of the Hiero settings file.
|
|
<DT><B>Throws:</B>
|
|
<DD><CODE><A HREF="../../../org/newdawn/slick/SlickException.html" title="class in org.newdawn.slick">SlickException</A></CODE> - if the UnicodeFont could not be initialized.</DL>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="UnicodeFont(java.lang.String, org.newdawn.slick.font.HieroSettings)"><!-- --></A><H3>
|
|
UnicodeFont</H3>
|
|
<PRE>
|
|
public <B>UnicodeFont</B>(java.lang.String ttfFileRef,
|
|
<A HREF="../../../org/newdawn/slick/font/HieroSettings.html" title="class in org.newdawn.slick.font">HieroSettings</A> settings)
|
|
throws <A HREF="../../../org/newdawn/slick/SlickException.html" title="class in org.newdawn.slick">SlickException</A></PRE>
|
|
<DL>
|
|
<DD>Create a new unicode font based on a TTF file and a set of heiro configuration
|
|
<P>
|
|
<DL>
|
|
<DT><B>Parameters:</B><DD><CODE>ttfFileRef</CODE> - The file system or classpath location of the TrueTypeFont file.<DD><CODE>settings</CODE> - The settings configured via the Hiero tool
|
|
<DT><B>Throws:</B>
|
|
<DD><CODE><A HREF="../../../org/newdawn/slick/SlickException.html" title="class in org.newdawn.slick">SlickException</A></CODE> - if the UnicodeFont could not be initialized.</DL>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="UnicodeFont(java.lang.String, int, boolean, boolean)"><!-- --></A><H3>
|
|
UnicodeFont</H3>
|
|
<PRE>
|
|
public <B>UnicodeFont</B>(java.lang.String ttfFileRef,
|
|
int size,
|
|
boolean bold,
|
|
boolean italic)
|
|
throws <A HREF="../../../org/newdawn/slick/SlickException.html" title="class in org.newdawn.slick">SlickException</A></PRE>
|
|
<DL>
|
|
<DD>Create a new unicode font based on a TTF file alone
|
|
<P>
|
|
<DL>
|
|
<DT><B>Parameters:</B><DD><CODE>ttfFileRef</CODE> - The file system or classpath location of the TrueTypeFont file.<DD><CODE>size</CODE> - The point size of the font to generated<DD><CODE>bold</CODE> - True if the font should be rendered in bold typeface<DD><CODE>italic</CODE> - True if the font should be rendered in bold typeface
|
|
<DT><B>Throws:</B>
|
|
<DD><CODE><A HREF="../../../org/newdawn/slick/SlickException.html" title="class in org.newdawn.slick">SlickException</A></CODE> - if the UnicodeFont could not be initialized.</DL>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="UnicodeFont(java.awt.Font, java.lang.String)"><!-- --></A><H3>
|
|
UnicodeFont</H3>
|
|
<PRE>
|
|
public <B>UnicodeFont</B>(java.awt.Font font,
|
|
java.lang.String hieroFileRef)
|
|
throws <A HREF="../../../org/newdawn/slick/SlickException.html" title="class in org.newdawn.slick">SlickException</A></PRE>
|
|
<DL>
|
|
<DD>Creates a new UnicodeFont.
|
|
<P>
|
|
<DL>
|
|
<DT><B>Parameters:</B><DD><CODE>font</CODE> - The AWT font to render<DD><CODE>hieroFileRef</CODE> - The file system or classpath location of the Hiero settings file.
|
|
<DT><B>Throws:</B>
|
|
<DD><CODE><A HREF="../../../org/newdawn/slick/SlickException.html" title="class in org.newdawn.slick">SlickException</A></CODE> - if the UnicodeFont could not be initialized.</DL>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="UnicodeFont(java.awt.Font, org.newdawn.slick.font.HieroSettings)"><!-- --></A><H3>
|
|
UnicodeFont</H3>
|
|
<PRE>
|
|
public <B>UnicodeFont</B>(java.awt.Font font,
|
|
<A HREF="../../../org/newdawn/slick/font/HieroSettings.html" title="class in org.newdawn.slick.font">HieroSettings</A> settings)</PRE>
|
|
<DL>
|
|
<DD>Creates a new UnicodeFont.
|
|
<P>
|
|
<DL>
|
|
<DT><B>Parameters:</B><DD><CODE>font</CODE> - The AWT font to render<DD><CODE>settings</CODE> - The settings configured via the Hiero tool</DL>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="UnicodeFont(java.awt.Font)"><!-- --></A><H3>
|
|
UnicodeFont</H3>
|
|
<PRE>
|
|
public <B>UnicodeFont</B>(java.awt.Font font)</PRE>
|
|
<DL>
|
|
<DD>Creates a new UnicodeFont.
|
|
<P>
|
|
<DL>
|
|
<DT><B>Parameters:</B><DD><CODE>font</CODE> - The AWT font to render</DL>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="UnicodeFont(java.awt.Font, int, boolean, boolean)"><!-- --></A><H3>
|
|
UnicodeFont</H3>
|
|
<PRE>
|
|
public <B>UnicodeFont</B>(java.awt.Font font,
|
|
int size,
|
|
boolean bold,
|
|
boolean italic)</PRE>
|
|
<DL>
|
|
<DD>Creates a new UnicodeFont.
|
|
<P>
|
|
<DL>
|
|
<DT><B>Parameters:</B><DD><CODE>font</CODE> - The AWT font to render<DD><CODE>size</CODE> - The point size of the font to generated<DD><CODE>bold</CODE> - True if the font should be rendered in bold typeface<DD><CODE>italic</CODE> - True if the font should be rendered in bold typeface</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="addGlyphs(int, int)"><!-- --></A><H3>
|
|
addGlyphs</H3>
|
|
<PRE>
|
|
public void <B>addGlyphs</B>(int startCodePoint,
|
|
int endCodePoint)</PRE>
|
|
<DL>
|
|
<DD>Queues the glyphs in the specified codepoint range (inclusive) to be loaded. Note that the glyphs are not actually loaded
|
|
until <A HREF="../../../org/newdawn/slick/UnicodeFont.html#loadGlyphs()"><CODE>loadGlyphs()</CODE></A> is called.
|
|
|
|
Some characters like combining marks and non-spacing marks can only be rendered with the context of other glyphs. In this
|
|
case, use <A HREF="../../../org/newdawn/slick/UnicodeFont.html#addGlyphs(java.lang.String)"><CODE>addGlyphs(String)</CODE></A>.
|
|
<P>
|
|
<DD><DL>
|
|
</DL>
|
|
</DD>
|
|
<DD><DL>
|
|
<DT><B>Parameters:</B><DD><CODE>startCodePoint</CODE> - The code point of the first glyph to add<DD><CODE>endCodePoint</CODE> - The code point of the last glyph to add</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="addGlyphs(java.lang.String)"><!-- --></A><H3>
|
|
addGlyphs</H3>
|
|
<PRE>
|
|
public void <B>addGlyphs</B>(java.lang.String text)</PRE>
|
|
<DL>
|
|
<DD>Queues the glyphs in the specified text to be loaded. Note that the glyphs are not actually loaded until
|
|
<A HREF="../../../org/newdawn/slick/UnicodeFont.html#loadGlyphs()"><CODE>loadGlyphs()</CODE></A> is called.
|
|
<P>
|
|
<DD><DL>
|
|
</DL>
|
|
</DD>
|
|
<DD><DL>
|
|
<DT><B>Parameters:</B><DD><CODE>text</CODE> - The text containing the glyphs to be added</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="addAsciiGlyphs()"><!-- --></A><H3>
|
|
addAsciiGlyphs</H3>
|
|
<PRE>
|
|
public void <B>addAsciiGlyphs</B>()</PRE>
|
|
<DL>
|
|
<DD>Queues the glyphs in the ASCII character set (codepoints 32 through 255) to be loaded. Note that the glyphs are not actually
|
|
loaded until <A HREF="../../../org/newdawn/slick/UnicodeFont.html#loadGlyphs()"><CODE>loadGlyphs()</CODE></A> is called.
|
|
<P>
|
|
<DD><DL>
|
|
</DL>
|
|
</DD>
|
|
<DD><DL>
|
|
</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="addNeheGlyphs()"><!-- --></A><H3>
|
|
addNeheGlyphs</H3>
|
|
<PRE>
|
|
public void <B>addNeheGlyphs</B>()</PRE>
|
|
<DL>
|
|
<DD>Queues the glyphs in the NEHE character set (codepoints 32 through 128) to be loaded. Note that the glyphs are not actually
|
|
loaded until <A HREF="../../../org/newdawn/slick/UnicodeFont.html#loadGlyphs()"><CODE>loadGlyphs()</CODE></A> is called.
|
|
<P>
|
|
<DD><DL>
|
|
</DL>
|
|
</DD>
|
|
<DD><DL>
|
|
</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="loadGlyphs()"><!-- --></A><H3>
|
|
loadGlyphs</H3>
|
|
<PRE>
|
|
public boolean <B>loadGlyphs</B>()
|
|
throws <A HREF="../../../org/newdawn/slick/SlickException.html" title="class in org.newdawn.slick">SlickException</A></PRE>
|
|
<DL>
|
|
<DD>Loads all queued glyphs to the backing textures. Glyphs that are typically displayed together should be added and loaded at
|
|
the same time so that they are stored on the same backing texture. This reduces the number of backing texture binds required
|
|
to draw glyphs.
|
|
<P>
|
|
<DD><DL>
|
|
</DL>
|
|
</DD>
|
|
<DD><DL>
|
|
|
|
<DT><B>Returns:</B><DD>True if the glyphs were loaded entirely
|
|
<DT><B>Throws:</B>
|
|
<DD><CODE><A HREF="../../../org/newdawn/slick/SlickException.html" title="class in org.newdawn.slick">SlickException</A></CODE> - if the glyphs could not be loaded.</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="loadGlyphs(int)"><!-- --></A><H3>
|
|
loadGlyphs</H3>
|
|
<PRE>
|
|
public boolean <B>loadGlyphs</B>(int maxGlyphsToLoad)
|
|
throws <A HREF="../../../org/newdawn/slick/SlickException.html" title="class in org.newdawn.slick">SlickException</A></PRE>
|
|
<DL>
|
|
<DD>Loads up to the specified number of queued glyphs to the backing textures. This is typically called from the game loop to
|
|
load glyphs on the fly that were requested for display but have not yet been loaded.
|
|
<P>
|
|
<DD><DL>
|
|
</DL>
|
|
</DD>
|
|
<DD><DL>
|
|
<DT><B>Parameters:</B><DD><CODE>maxGlyphsToLoad</CODE> - The maximum number of glyphs to be loaded this time
|
|
<DT><B>Returns:</B><DD>True if the glyphs were loaded entirely
|
|
<DT><B>Throws:</B>
|
|
<DD><CODE><A HREF="../../../org/newdawn/slick/SlickException.html" title="class in org.newdawn.slick">SlickException</A></CODE> - if the glyphs could not be loaded.</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="clearGlyphs()"><!-- --></A><H3>
|
|
clearGlyphs</H3>
|
|
<PRE>
|
|
public void <B>clearGlyphs</B>()</PRE>
|
|
<DL>
|
|
<DD>Clears all loaded and queued glyphs.
|
|
<P>
|
|
<DD><DL>
|
|
</DL>
|
|
</DD>
|
|
<DD><DL>
|
|
</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="destroy()"><!-- --></A><H3>
|
|
destroy</H3>
|
|
<PRE>
|
|
public void <B>destroy</B>()</PRE>
|
|
<DL>
|
|
<DD>Releases all resources used by this UnicodeFont. This method should be called when this UnicodeFont instance is no longer
|
|
needed.
|
|
<P>
|
|
<DD><DL>
|
|
</DL>
|
|
</DD>
|
|
<DD><DL>
|
|
</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="drawDisplayList(float, float, java.lang.String, org.newdawn.slick.Color, int, int)"><!-- --></A><H3>
|
|
drawDisplayList</H3>
|
|
<PRE>
|
|
public <A HREF="../../../org/newdawn/slick/UnicodeFont.DisplayList.html" title="class in org.newdawn.slick">UnicodeFont.DisplayList</A> <B>drawDisplayList</B>(float x,
|
|
float y,
|
|
java.lang.String text,
|
|
<A HREF="../../../org/newdawn/slick/Color.html" title="class in org.newdawn.slick">Color</A> color,
|
|
int startIndex,
|
|
int endIndex)</PRE>
|
|
<DL>
|
|
<DD>Identical to <A HREF="../../../org/newdawn/slick/UnicodeFont.html#drawString(float, float, java.lang.String, org.newdawn.slick.Color, int, int)"><CODE>drawString(float, float, String, Color, int, int)</CODE></A> but returns a
|
|
DisplayList which provides access to the width and height of the text drawn.
|
|
<P>
|
|
<DD><DL>
|
|
</DL>
|
|
</DD>
|
|
<DD><DL>
|
|
<DT><B>Parameters:</B><DD><CODE>text</CODE> - The text to render<DD><CODE>x</CODE> - The horizontal location to render at<DD><CODE>y</CODE> - The vertical location to render at<DD><CODE>color</CODE> - The colour to apply as a filter on the text<DD><CODE>startIndex</CODE> - The start index into the string to start rendering at<DD><CODE>endIndex</CODE> - The end index into the string to render to
|
|
<DT><B>Returns:</B><DD>The reference to the display list that was drawn and potentiall ygenerated</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="drawString(float, float, java.lang.String, org.newdawn.slick.Color, int, int)"><!-- --></A><H3>
|
|
drawString</H3>
|
|
<PRE>
|
|
public void <B>drawString</B>(float x,
|
|
float y,
|
|
java.lang.String text,
|
|
<A HREF="../../../org/newdawn/slick/Color.html" title="class in org.newdawn.slick">Color</A> color,
|
|
int startIndex,
|
|
int endIndex)</PRE>
|
|
<DL>
|
|
<DD><B>Description copied from interface: <CODE><A HREF="../../../org/newdawn/slick/Font.html#drawString(float, float, java.lang.String, org.newdawn.slick.Color, int, int)">Font</A></CODE></B></DD>
|
|
<DD>Draw part of a string to the screen. Note that this will
|
|
still position the text as though it's part of the bigger string.
|
|
<P>
|
|
<DD><DL>
|
|
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../org/newdawn/slick/Font.html#drawString(float, float, java.lang.String, org.newdawn.slick.Color, int, int)">drawString</A></CODE> in interface <CODE><A HREF="../../../org/newdawn/slick/Font.html" title="interface in org.newdawn.slick">Font</A></CODE></DL>
|
|
</DD>
|
|
<DD><DL>
|
|
<DT><B>Parameters:</B><DD><CODE>x</CODE> - The x location at which to draw the string<DD><CODE>y</CODE> - The y location at which to draw the string<DD><CODE>text</CODE> - The text to be displayed<DD><CODE>color</CODE> - The colour to draw with<DD><CODE>startIndex</CODE> - The index of the first character to draw<DD><CODE>endIndex</CODE> - The index of the last character from the string to draw</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="drawString(float, float, java.lang.String)"><!-- --></A><H3>
|
|
drawString</H3>
|
|
<PRE>
|
|
public void <B>drawString</B>(float x,
|
|
float y,
|
|
java.lang.String text)</PRE>
|
|
<DL>
|
|
<DD><B>Description copied from interface: <CODE><A HREF="../../../org/newdawn/slick/Font.html#drawString(float, float, java.lang.String)">Font</A></CODE></B></DD>
|
|
<DD>Draw a string to the screen
|
|
<P>
|
|
<DD><DL>
|
|
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../org/newdawn/slick/Font.html#drawString(float, float, java.lang.String)">drawString</A></CODE> in interface <CODE><A HREF="../../../org/newdawn/slick/Font.html" title="interface in org.newdawn.slick">Font</A></CODE></DL>
|
|
</DD>
|
|
<DD><DL>
|
|
<DT><B>Parameters:</B><DD><CODE>x</CODE> - The x location at which to draw the string<DD><CODE>y</CODE> - The y location at which to draw the string<DD><CODE>text</CODE> - The text to be displayed</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="drawString(float, float, java.lang.String, org.newdawn.slick.Color)"><!-- --></A><H3>
|
|
drawString</H3>
|
|
<PRE>
|
|
public void <B>drawString</B>(float x,
|
|
float y,
|
|
java.lang.String text,
|
|
<A HREF="../../../org/newdawn/slick/Color.html" title="class in org.newdawn.slick">Color</A> col)</PRE>
|
|
<DL>
|
|
<DD><B>Description copied from interface: <CODE><A HREF="../../../org/newdawn/slick/Font.html#drawString(float, float, java.lang.String, org.newdawn.slick.Color)">Font</A></CODE></B></DD>
|
|
<DD>Draw a string to the screen
|
|
<P>
|
|
<DD><DL>
|
|
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../org/newdawn/slick/Font.html#drawString(float, float, java.lang.String, org.newdawn.slick.Color)">drawString</A></CODE> in interface <CODE><A HREF="../../../org/newdawn/slick/Font.html" title="interface in org.newdawn.slick">Font</A></CODE></DL>
|
|
</DD>
|
|
<DD><DL>
|
|
<DT><B>Parameters:</B><DD><CODE>x</CODE> - The x location at which to draw the string<DD><CODE>y</CODE> - The y location at which to draw the string<DD><CODE>text</CODE> - The text to be displayed<DD><CODE>col</CODE> - The colour to draw with</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="getSpaceWidth()"><!-- --></A><H3>
|
|
getSpaceWidth</H3>
|
|
<PRE>
|
|
public int <B>getSpaceWidth</B>()</PRE>
|
|
<DL>
|
|
<DD>Returns the width of the space character.
|
|
<P>
|
|
<DD><DL>
|
|
</DL>
|
|
</DD>
|
|
<DD><DL>
|
|
</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="getWidth(java.lang.String)"><!-- --></A><H3>
|
|
getWidth</H3>
|
|
<PRE>
|
|
public int <B>getWidth</B>(java.lang.String text)</PRE>
|
|
<DL>
|
|
<DD><B>Description copied from interface: <CODE><A HREF="../../../org/newdawn/slick/Font.html#getWidth(java.lang.String)">Font</A></CODE></B></DD>
|
|
<DD>Get the width of the given string
|
|
<P>
|
|
<DD><DL>
|
|
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../org/newdawn/slick/Font.html#getWidth(java.lang.String)">getWidth</A></CODE> in interface <CODE><A HREF="../../../org/newdawn/slick/Font.html" title="interface in org.newdawn.slick">Font</A></CODE></DL>
|
|
</DD>
|
|
<DD><DL>
|
|
<DT><B>Parameters:</B><DD><CODE>text</CODE> - The string to obtain the rendered with of
|
|
<DT><B>Returns:</B><DD>The width of the given string<DT><B>See Also:</B><DD><A HREF="../../../org/newdawn/slick/Font.html#getWidth(java.lang.String)"><CODE>Font.getWidth(java.lang.String)</CODE></A></DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="getHeight(java.lang.String)"><!-- --></A><H3>
|
|
getHeight</H3>
|
|
<PRE>
|
|
public int <B>getHeight</B>(java.lang.String text)</PRE>
|
|
<DL>
|
|
<DD><B>Description copied from interface: <CODE><A HREF="../../../org/newdawn/slick/Font.html#getHeight(java.lang.String)">Font</A></CODE></B></DD>
|
|
<DD>Get the height of the given string
|
|
<P>
|
|
<DD><DL>
|
|
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../org/newdawn/slick/Font.html#getHeight(java.lang.String)">getHeight</A></CODE> in interface <CODE><A HREF="../../../org/newdawn/slick/Font.html" title="interface in org.newdawn.slick">Font</A></CODE></DL>
|
|
</DD>
|
|
<DD><DL>
|
|
<DT><B>Parameters:</B><DD><CODE>text</CODE> - The string to obtain the rendered with of
|
|
<DT><B>Returns:</B><DD>The width of the given string<DT><B>See Also:</B><DD><A HREF="../../../org/newdawn/slick/Font.html#getHeight(java.lang.String)"><CODE>Font.getHeight(java.lang.String)</CODE></A></DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="getYOffset(java.lang.String)"><!-- --></A><H3>
|
|
getYOffset</H3>
|
|
<PRE>
|
|
public int <B>getYOffset</B>(java.lang.String text)</PRE>
|
|
<DL>
|
|
<DD>Returns the distance from the y drawing location to the top most pixel of the
|
|
specified text.
|
|
<P>
|
|
<DD><DL>
|
|
</DL>
|
|
</DD>
|
|
<DD><DL>
|
|
<DT><B>Parameters:</B><DD><CODE>text</CODE> - The text to analyse
|
|
<DT><B>Returns:</B><DD>The distance fro the y drawing location ot the top most pixel of the specified text</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="getFont()"><!-- --></A><H3>
|
|
getFont</H3>
|
|
<PRE>
|
|
public java.awt.Font <B>getFont</B>()</PRE>
|
|
<DL>
|
|
<DD>Returns the TrueTypeFont for this UnicodeFont.
|
|
<P>
|
|
<DD><DL>
|
|
</DL>
|
|
</DD>
|
|
<DD><DL>
|
|
|
|
<DT><B>Returns:</B><DD>The AWT Font being rendered</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="getPaddingTop()"><!-- --></A><H3>
|
|
getPaddingTop</H3>
|
|
<PRE>
|
|
public int <B>getPaddingTop</B>()</PRE>
|
|
<DL>
|
|
<DD>Returns the padding above a glyph on the GlyphPage to allow for effects to be drawn.
|
|
<P>
|
|
<DD><DL>
|
|
</DL>
|
|
</DD>
|
|
<DD><DL>
|
|
|
|
<DT><B>Returns:</B><DD>The padding at the top of the glyphs when drawn</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="setPaddingTop(int)"><!-- --></A><H3>
|
|
setPaddingTop</H3>
|
|
<PRE>
|
|
public void <B>setPaddingTop</B>(int paddingTop)</PRE>
|
|
<DL>
|
|
<DD>Sets the padding above a glyph on the GlyphPage to allow for effects to be drawn.
|
|
<P>
|
|
<DD><DL>
|
|
</DL>
|
|
</DD>
|
|
<DD><DL>
|
|
<DT><B>Parameters:</B><DD><CODE>paddingTop</CODE> - The padding at the top of the glyphs when drawn</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="getPaddingLeft()"><!-- --></A><H3>
|
|
getPaddingLeft</H3>
|
|
<PRE>
|
|
public int <B>getPaddingLeft</B>()</PRE>
|
|
<DL>
|
|
<DD>Returns the padding to the left of a glyph on the GlyphPage to allow for effects to be drawn.
|
|
<P>
|
|
<DD><DL>
|
|
</DL>
|
|
</DD>
|
|
<DD><DL>
|
|
|
|
<DT><B>Returns:</B><DD>The padding at the left of the glyphs when drawn</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="setPaddingLeft(int)"><!-- --></A><H3>
|
|
setPaddingLeft</H3>
|
|
<PRE>
|
|
public void <B>setPaddingLeft</B>(int paddingLeft)</PRE>
|
|
<DL>
|
|
<DD>Sets the padding to the left of a glyph on the GlyphPage to allow for effects to be drawn.
|
|
<P>
|
|
<DD><DL>
|
|
</DL>
|
|
</DD>
|
|
<DD><DL>
|
|
<DT><B>Parameters:</B><DD><CODE>paddingLeft</CODE> - The padding at the left of the glyphs when drawn</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="getPaddingBottom()"><!-- --></A><H3>
|
|
getPaddingBottom</H3>
|
|
<PRE>
|
|
public int <B>getPaddingBottom</B>()</PRE>
|
|
<DL>
|
|
<DD>Returns the padding below a glyph on the GlyphPage to allow for effects to be drawn.
|
|
<P>
|
|
<DD><DL>
|
|
</DL>
|
|
</DD>
|
|
<DD><DL>
|
|
|
|
<DT><B>Returns:</B><DD>The padding at the bottom of the glyphs when drawn</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="setPaddingBottom(int)"><!-- --></A><H3>
|
|
setPaddingBottom</H3>
|
|
<PRE>
|
|
public void <B>setPaddingBottom</B>(int paddingBottom)</PRE>
|
|
<DL>
|
|
<DD>Sets the padding below a glyph on the GlyphPage to allow for effects to be drawn.
|
|
<P>
|
|
<DD><DL>
|
|
</DL>
|
|
</DD>
|
|
<DD><DL>
|
|
<DT><B>Parameters:</B><DD><CODE>paddingBottom</CODE> - The padding at the bottom of the glyphs when drawn</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="getPaddingRight()"><!-- --></A><H3>
|
|
getPaddingRight</H3>
|
|
<PRE>
|
|
public int <B>getPaddingRight</B>()</PRE>
|
|
<DL>
|
|
<DD>Returns the padding to the right of a glyph on the GlyphPage to allow for effects to be drawn.
|
|
<P>
|
|
<DD><DL>
|
|
</DL>
|
|
</DD>
|
|
<DD><DL>
|
|
|
|
<DT><B>Returns:</B><DD>The padding at the right of the glyphs when drawn</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="setPaddingRight(int)"><!-- --></A><H3>
|
|
setPaddingRight</H3>
|
|
<PRE>
|
|
public void <B>setPaddingRight</B>(int paddingRight)</PRE>
|
|
<DL>
|
|
<DD>Sets the padding to the right of a glyph on the GlyphPage to allow for effects to be drawn.
|
|
<P>
|
|
<DD><DL>
|
|
</DL>
|
|
</DD>
|
|
<DD><DL>
|
|
<DT><B>Parameters:</B><DD><CODE>paddingRight</CODE> - The padding at the right of the glyphs when drawn</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="getPaddingAdvanceX()"><!-- --></A><H3>
|
|
getPaddingAdvanceX</H3>
|
|
<PRE>
|
|
public int <B>getPaddingAdvanceX</B>()</PRE>
|
|
<DL>
|
|
<DD>Gets the additional amount to offset glyphs on the x axis.
|
|
<P>
|
|
<DD><DL>
|
|
</DL>
|
|
</DD>
|
|
<DD><DL>
|
|
|
|
<DT><B>Returns:</B><DD>The padding applied for each horizontal advance (i.e. when a glyph is rendered)</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="setPaddingAdvanceX(int)"><!-- --></A><H3>
|
|
setPaddingAdvanceX</H3>
|
|
<PRE>
|
|
public void <B>setPaddingAdvanceX</B>(int paddingAdvanceX)</PRE>
|
|
<DL>
|
|
<DD>Sets the additional amount to offset glyphs on the x axis. This is typically set to a negative number when left or right
|
|
padding is used so that glyphs are not spaced too far apart.
|
|
<P>
|
|
<DD><DL>
|
|
</DL>
|
|
</DD>
|
|
<DD><DL>
|
|
<DT><B>Parameters:</B><DD><CODE>paddingAdvanceX</CODE> - The padding applied for each horizontal advance (i.e. when a glyph is rendered)</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="getPaddingAdvanceY()"><!-- --></A><H3>
|
|
getPaddingAdvanceY</H3>
|
|
<PRE>
|
|
public int <B>getPaddingAdvanceY</B>()</PRE>
|
|
<DL>
|
|
<DD>Gets the additional amount to offset a line of text on the y axis.
|
|
<P>
|
|
<DD><DL>
|
|
</DL>
|
|
</DD>
|
|
<DD><DL>
|
|
|
|
<DT><B>Returns:</B><DD>The padding applied for each vertical advance (i.e. when a glyph is rendered)</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="setPaddingAdvanceY(int)"><!-- --></A><H3>
|
|
setPaddingAdvanceY</H3>
|
|
<PRE>
|
|
public void <B>setPaddingAdvanceY</B>(int paddingAdvanceY)</PRE>
|
|
<DL>
|
|
<DD>Sets the additional amount to offset a line of text on the y axis. This is typically set to a negative number when top or
|
|
bottom padding is used so that lines of text are not spaced too far apart.
|
|
<P>
|
|
<DD><DL>
|
|
</DL>
|
|
</DD>
|
|
<DD><DL>
|
|
<DT><B>Parameters:</B><DD><CODE>paddingAdvanceY</CODE> - The padding applied for each vertical advance (i.e. when a glyph is rendered)</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="getLineHeight()"><!-- --></A><H3>
|
|
getLineHeight</H3>
|
|
<PRE>
|
|
public int <B>getLineHeight</B>()</PRE>
|
|
<DL>
|
|
<DD>Returns the distance from one line of text to the next. This is the sum of the descent, ascent, leading, padding top,
|
|
padding bottom, and padding advance y. To change the line height, use <A HREF="../../../org/newdawn/slick/UnicodeFont.html#setPaddingAdvanceY(int)"><CODE>setPaddingAdvanceY(int)</CODE></A>.
|
|
<P>
|
|
<DD><DL>
|
|
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../org/newdawn/slick/Font.html#getLineHeight()">getLineHeight</A></CODE> in interface <CODE><A HREF="../../../org/newdawn/slick/Font.html" title="interface in org.newdawn.slick">Font</A></CODE></DL>
|
|
</DD>
|
|
<DD><DL>
|
|
|
|
<DT><B>Returns:</B><DD>The maxium height of any line drawn by this font</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="getAscent()"><!-- --></A><H3>
|
|
getAscent</H3>
|
|
<PRE>
|
|
public int <B>getAscent</B>()</PRE>
|
|
<DL>
|
|
<DD>Gets the distance from the baseline to the y drawing location.
|
|
<P>
|
|
<DD><DL>
|
|
</DL>
|
|
</DD>
|
|
<DD><DL>
|
|
|
|
<DT><B>Returns:</B><DD>The ascent of this font</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="getDescent()"><!-- --></A><H3>
|
|
getDescent</H3>
|
|
<PRE>
|
|
public int <B>getDescent</B>()</PRE>
|
|
<DL>
|
|
<DD>Gets the distance from the baseline to the bottom of most alphanumeric characters
|
|
with descenders.
|
|
<P>
|
|
<DD><DL>
|
|
</DL>
|
|
</DD>
|
|
<DD><DL>
|
|
|
|
<DT><B>Returns:</B><DD>The distance from the baseline to the bottom of the font</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="getLeading()"><!-- --></A><H3>
|
|
getLeading</H3>
|
|
<PRE>
|
|
public int <B>getLeading</B>()</PRE>
|
|
<DL>
|
|
<DD>Gets the extra distance between the descent of one line of text to the ascent of the next.
|
|
<P>
|
|
<DD><DL>
|
|
</DL>
|
|
</DD>
|
|
<DD><DL>
|
|
|
|
<DT><B>Returns:</B><DD>The leading edge of the font</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="getGlyphPageWidth()"><!-- --></A><H3>
|
|
getGlyphPageWidth</H3>
|
|
<PRE>
|
|
public int <B>getGlyphPageWidth</B>()</PRE>
|
|
<DL>
|
|
<DD>Returns the width of the backing textures.
|
|
<P>
|
|
<DD><DL>
|
|
</DL>
|
|
</DD>
|
|
<DD><DL>
|
|
|
|
<DT><B>Returns:</B><DD>The width of the glyph pages in this font</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="setGlyphPageWidth(int)"><!-- --></A><H3>
|
|
setGlyphPageWidth</H3>
|
|
<PRE>
|
|
public void <B>setGlyphPageWidth</B>(int glyphPageWidth)</PRE>
|
|
<DL>
|
|
<DD>Sets the width of the backing textures. Default is 512.
|
|
<P>
|
|
<DD><DL>
|
|
</DL>
|
|
</DD>
|
|
<DD><DL>
|
|
<DT><B>Parameters:</B><DD><CODE>glyphPageWidth</CODE> - The width of the glyph pages in this font</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="getGlyphPageHeight()"><!-- --></A><H3>
|
|
getGlyphPageHeight</H3>
|
|
<PRE>
|
|
public int <B>getGlyphPageHeight</B>()</PRE>
|
|
<DL>
|
|
<DD>Returns the height of the backing textures.
|
|
<P>
|
|
<DD><DL>
|
|
</DL>
|
|
</DD>
|
|
<DD><DL>
|
|
|
|
<DT><B>Returns:</B><DD>The height of the glyph pages in this font</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="setGlyphPageHeight(int)"><!-- --></A><H3>
|
|
setGlyphPageHeight</H3>
|
|
<PRE>
|
|
public void <B>setGlyphPageHeight</B>(int glyphPageHeight)</PRE>
|
|
<DL>
|
|
<DD>Sets the height of the backing textures. Default is 512.
|
|
<P>
|
|
<DD><DL>
|
|
</DL>
|
|
</DD>
|
|
<DD><DL>
|
|
<DT><B>Parameters:</B><DD><CODE>glyphPageHeight</CODE> - The width of the glyph pages in this font</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="getGlyphPages()"><!-- --></A><H3>
|
|
getGlyphPages</H3>
|
|
<PRE>
|
|
public java.util.List <B>getGlyphPages</B>()</PRE>
|
|
<DL>
|
|
<DD>Returns the GlyphPages for this UnicodeFont.
|
|
<P>
|
|
<DD><DL>
|
|
</DL>
|
|
</DD>
|
|
<DD><DL>
|
|
|
|
<DT><B>Returns:</B><DD>The glyph pages that have been loaded into this font</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="getEffects()"><!-- --></A><H3>
|
|
getEffects</H3>
|
|
<PRE>
|
|
public java.util.List <B>getEffects</B>()</PRE>
|
|
<DL>
|
|
<DD>Returns a list of <A HREF="../../../org/newdawn/slick/font/effects/Effect.html" title="interface in org.newdawn.slick.font.effects"><CODE>Effect</CODE></A>s that will be applied
|
|
to the glyphs.
|
|
<P>
|
|
<DD><DL>
|
|
</DL>
|
|
</DD>
|
|
<DD><DL>
|
|
|
|
<DT><B>Returns:</B><DD>The list of effects to be applied to the font</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="isCaching()"><!-- --></A><H3>
|
|
isCaching</H3>
|
|
<PRE>
|
|
public boolean <B>isCaching</B>()</PRE>
|
|
<DL>
|
|
<DD>Returns true if this UnicodeFont caches the glyph drawing instructions to
|
|
improve performance.
|
|
<P>
|
|
<DD><DL>
|
|
</DL>
|
|
</DD>
|
|
<DD><DL>
|
|
|
|
<DT><B>Returns:</B><DD>True if caching is turned on</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="setDisplayListCaching(boolean)"><!-- --></A><H3>
|
|
setDisplayListCaching</H3>
|
|
<PRE>
|
|
public void <B>setDisplayListCaching</B>(boolean displayListCaching)</PRE>
|
|
<DL>
|
|
<DD>Sets if this UnicodeFont caches the glyph drawing instructions to improve performance.
|
|
Default is true. Text rendering is very slow without display list caching.
|
|
<P>
|
|
<DD><DL>
|
|
</DL>
|
|
</DD>
|
|
<DD><DL>
|
|
<DT><B>Parameters:</B><DD><CODE>displayListCaching</CODE> - True if caching should be turned on</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="getFontFile()"><!-- --></A><H3>
|
|
getFontFile</H3>
|
|
<PRE>
|
|
public java.lang.String <B>getFontFile</B>()</PRE>
|
|
<DL>
|
|
<DD>Returns the path to the TTF file for this UnicodeFont, or null. If this UnicodeFont was created without specifying the TTF
|
|
file, it will try to determine the path using Sun classes. If this fails, null is returned.
|
|
<P>
|
|
<DD><DL>
|
|
</DL>
|
|
</DD>
|
|
<DD><DL>
|
|
|
|
<DT><B>Returns:</B><DD>The reference to the font file that the kerning was loaded from</DL>
|
|
</DD>
|
|
</DL>
|
|
<!-- ========= END OF CLASS DATA ========= -->
|
|
<HR>
|
|
|
|
|
|
<!-- ======= START OF BOTTOM NAVBAR ====== -->
|
|
<A NAME="navbar_bottom"><!-- --></A>
|
|
<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
|
|
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
|
|
<TR>
|
|
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
|
|
<A NAME="navbar_bottom_firstrow"><!-- --></A>
|
|
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
|
|
<TR ALIGN="center" VALIGN="top">
|
|
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD>
|
|
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
|
|
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
|
|
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/UnicodeFont.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD>
|
|
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
|
|
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
|
|
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
|
|
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
|
|
</TR>
|
|
</TABLE>
|
|
</TD>
|
|
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
|
|
</EM>
|
|
</TD>
|
|
</TR>
|
|
|
|
<TR>
|
|
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
|
<A HREF="../../../org/newdawn/slick/TrueTypeFont.html" title="class in org.newdawn.slick"><B>PREV CLASS</B></A>
|
|
<A HREF="../../../org/newdawn/slick/UnicodeFont.DisplayList.html" title="class in org.newdawn.slick"><B>NEXT CLASS</B></A></FONT></TD>
|
|
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
|
<A HREF="../../../index.html?org/newdawn/slick/UnicodeFont.html" target="_top"><B>FRAMES</B></A>
|
|
<A HREF="UnicodeFont.html" target="_top"><B>NO FRAMES</B></A>
|
|
<SCRIPT type="text/javascript">
|
|
<!--
|
|
if(window==top) {
|
|
document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>');
|
|
}
|
|
//-->
|
|
</SCRIPT>
|
|
<NOSCRIPT>
|
|
<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>
|
|
</NOSCRIPT>
|
|
|
|
|
|
</FONT></TD>
|
|
</TR>
|
|
<TR>
|
|
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
|
|
SUMMARY: <A HREF="#nested_class_summary">NESTED</A> | FIELD | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD>
|
|
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
|
|
DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD>
|
|
</TR>
|
|
</TABLE>
|
|
<A NAME="skip-navbar_bottom"></A>
|
|
<!-- ======== END OF BOTTOM NAVBAR ======= -->
|
|
|
|
<HR>
|
|
<i>Copyright © 2006 New Dawn Software. All Rights Reserved.</i>
|
|
</BODY>
|
|
</HTML>
|