I am writing a Japanese language quiz program and I don't want to require people to install the East Asian language pack for Windows XP. I am using GDI+ for drawing text. I tried downloading a free Unicode font and using that to draw text. I tested it on my computer (with East asian pack installed) and it displayed the Japanese characters correctly using the downloaded font, but on another computer without the language pack it didn't work.
I am looking for suggestions on how to make this work. The program is pretty simple and is written in C++ using only Win32 API, GDI+, and STL. If possible I would like to stick to just these libraries. I do have UNICODE #defined.
The code that I am basically using for drawing text is pasted below:
#include <gdiplus.h>
using namespace Gdiplus ;
Graphics * gi ;
PrivateFontCollection _fonts ;
_fonts.AddFontFile(fontFilename) ;
Font * currentFont = new Font(fontName, fontSize, FontStyleRegular, UnitPoint, &_fonts) ;
std::wstring text = L"Some text" ;
gi->DrawString(text.c_str(), (INT)text.size(), currentFont, rectangle, &format, &brush) ;