1
0
mirror of https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git synced 2025-07-17 10:52:46 +00:00

Port plFontConverter to Qt5

This commit is contained in:
2014-04-13 17:58:53 -07:00
parent b48963b904
commit d4465a2168
23 changed files with 1630 additions and 1181 deletions

View File

@ -1253,7 +1253,7 @@ bool plFont::LoadFromP2FFile( const plFileName &path )
// Load this font from the data found in the given Windows FNT file,
// using the format specified in the Windows 3 Developers Notes.
bool plFont::LoadFromFNT( const char *path )
bool plFont::LoadFromFNT( const plFileName &path )
{
hsUNIXStream stream; // Ahh, irony
if( !stream.Open( path, "rb" ) )
@ -2023,9 +2023,9 @@ bool plFont::LoadFromBDFStream( hsStream *stream, plBDFConvertCallback *callb
return false;
}
bool plFont::LoadFromBDF( const char *path, plBDFConvertCallback *callback )
bool plFont::LoadFromBDF( const plFileName &path, plBDFConvertCallback *callback )
{
FILE *fp = fopen( path, "rt" );
FILE *fp = fopen( path.AsString().c_str(), "rt" );
if( fp == nil )
return false;
try

View File

@ -293,10 +293,10 @@ class plFont : public hsKeyedObject
void CalcStringExtents( const plString &string, uint16_t &width, uint16_t &height, uint16_t &ascent, uint32_t &firstClippedChar, uint16_t &lastX, uint16_t &lastY );
void CalcStringExtents( const wchar_t *string, uint16_t &width, uint16_t &height, uint16_t &ascent, uint32_t &firstClippedChar, uint16_t &lastX, uint16_t &lastY );
bool LoadFromFNT( const char *path );
bool LoadFromFNT( const plFileName &path );
bool LoadFromFNTStream( hsStream *stream );
bool LoadFromBDF( const char *path, plBDFConvertCallback *callback );
bool LoadFromBDF( const plFileName &path, plBDFConvertCallback *callback );
bool LoadFromBDFStream( hsStream *stream, plBDFConvertCallback *callback );
bool LoadFromP2FFile( const plFileName &path );