formatting changes

This commit is contained in:
David Rose 2004-02-24 17:44:08 +00:00
parent eec52ae30d
commit 0e81017698

View File

@ -1708,7 +1708,7 @@ make_card_with_border() {
//////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////
// Function: TextNode::load_default_font // Function: TextNode::load_default_font
// Access: Private, Static // Access: Private, Static
// Description: This functin is called once (or never), the first // Description: This function is called once (or never), the first
// time someone attempts to render a TextNode using the // time someone attempts to render a TextNode using the
// default font. It should attempt to load the default // default font. It should attempt to load the default
// font, using the compiled-in version if it is // font, using the compiled-in version if it is
@ -1728,27 +1728,27 @@ load_default_font() {
} }
// Then, attempt to load the compiled-in font, if we have one. // Then, attempt to load the compiled-in font, if we have one.
#ifdef COMPILE_IN_DEFAULT_FONT #ifdef COMPILE_IN_DEFAULT_FONT
#ifdef HAVE_FREETYPE #ifdef HAVE_FREETYPE
// Loading the compiled-in FreeType font is relatively easy. // Loading the compiled-in FreeType font is relatively easy.
_default_font = new DynamicTextFont((const char *)default_font_data, _default_font = new DynamicTextFont((const char *)default_font_data,
default_font_size, 0); default_font_size, 0);
#else #else
// The compiled-in Bam font requires creating a BamFile object to // The compiled-in Bam font requires creating a BamFile object to
// decode it. // decode it.
string data((const char *)default_font_data, default_font_size); string data((const char *)default_font_data, default_font_size);
#ifdef HAVE_ZLIB #ifdef HAVE_ZLIB
// The font data is stored compressed; decompress it on-the-fly. // The font data is stored compressed; decompress it on-the-fly.
istringstream inz(data); istringstream inz(data);
IDecompressStream in(&inz, false); IDecompressStream in(&inz, false);
#else #else
// The font data is stored uncompressed, so just load it. // The font data is stored uncompressed, so just load it.
istringstream in(data); istringstream in(data);
#endif // HAVE_ZLIB #endif // HAVE_ZLIB
BamFile bam_file; BamFile bam_file;
if (bam_file.open_read(in, "default font stream")) { if (bam_file.open_read(in, "default font stream")) {
PT(PandaNode) node = bam_file.read_node(); PT(PandaNode) node = bam_file.read_node();
@ -1756,7 +1756,7 @@ load_default_font() {
_default_font = new StaticTextFont(node); _default_font = new StaticTextFont(node);
} }
} }
#endif // HAVE_FREETYPE #endif // HAVE_FREETYPE
#endif // COMPILE_IN_DEFAULT_FONT #endif // COMPILE_IN_DEFAULT_FONT
} }