After an entire weekend trying to make my font work, I give up
I've tried to make my own font, use the font included in C:\projects\Edge\media (font_outline.png), and nothing seemed to work!
I'm including the following in the zip file :
1. font_outline.png = File included in C:\projects\Edge\media (Not working)
2. @Arial Unicode MS_12_.bmp : My image with the chars (For some reason, the font tool included is not working with BMPs)
3. @Arial Unicode MS_12_.png : The same as 2. but saved in .png format. This file could be converted by font tool
4. @Arial Unicode MS_12__target.bmp : Image generated by font tool
5. Connect.png : Screenshot of the connect demo project using the Arial Unicode MS_12__target.bmp file (renamed to "Arial_Unicode_MS_12__target.bmp").
Here is the changed code :
- Code: Select all
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15ERESULT ClassMain::OnDisplayInit(EINSTANCE instance, ClassEDisplay *display)
{
//Load a fixed font file
if (display->CreateSurface(&font, "Arial_Unicode_MS_12__target.bmp") != E_OK)
{
SetErrorMsg("Error loading font");
return(E_ERROR);
}
else
font.SetColorKey(ECOLOR_FUCHSIA);
curbuffer = &display->buffer;
DrawGUI(curbuffer);
return(E_OK);
}15 lines; 4 keywds; 0 nums; 41 ops; 2 strs; 1 coms Syntactic Coloring v0.4 - Dan East
Can you help me understanding what I am doing wrong?
Many thanks.
Joao
