PocketMatrix forums

A read-only archive of the PocketMatrix forums (2001–2014). Posting and accounts are closed.

Swift Italic 20 font problem :-(

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 :P 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 :cry: I get the error GDERR_INVALIDBITMAP when creating the font !!

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 !!!
Hi Sam,

It's probably the quotation marks " that causes the problem. Just send me the png image at johan.sanneblad@home.se and I will have a quick look at it.

>> I saw in the Plasma that CreateFont is called with (0) as parameter instead of GDCREATEFONT_TRACKING and GDCREATEFONT_SIMPLEBITMAP.

Basically you don't have to set any flags if you use the kerned font variant ("complex bitmap"?) and don't want to specify tracking.

/Johan