I just decided to add some nice big fonts for my headlines. So I created a font based on Swift, with size 20 and in Bold. This works fine
Then I wanted to have italic, so I create a new font (all fonts of course created with FontMaker). Now the new italic font does NOT work
I get the error GDERR_INVALIDBITMAP when creating the font !!
Here is the code I use to create the font with.
If you want the PNG files for testing, then just let me know.
Btw, I saw in the Plasma that CreateFont is called with (0) as parameter instead of GDCREATEFONT_TRACKING and GDCREATEFONT_SIMPLEBITMAP. Is this a little nice undocument feature !!!
Here is the code I use to create the font with.
- Code:
m_pSwift20BoldFont = new CGapiBitmapFont;
hr = m_pSwift20BoldFont->CreateSurface(hInstance, IDR_FONT_SWIFT_BOLD_20,TEXT("PNG"));
m_pSwift20BoldFont->SetColorKey(RGB(255,0,255));
hr = m_pSwift20BoldFont->CreateFont(GDCREATEFONT_TRACKING, &fontFx);
m_pSwift20ItalicFont = new CGapiBitmapFont;
hr = m_pSwift20ItalicFont->CreateSurface(hInstance, IDR_FONT_SWIFT_ITALIC_20,TEXT("PNG"));
m_pSwift20ItalicFont->SetColorKey(RGB(255,0,255));
hr = m_pSwift20ItalicFont->CreateFont(GDCREATEFONT_TRACKING, &fontFx);
If you want the PNG files for testing, then just let me know.
Btw, I saw in the Plasma that CreateFont is called with (0) as parameter instead of GDCREATEFONT_TRACKING and GDCREATEFONT_SIMPLEBITMAP. Is this a little nice undocument feature !!!