Powerbasic Museum 2020-B

IT-Consultant: Patrice Terrier => C++ WinLIFT / GDImage => Topic started by: Patrice Terrier on December 03, 2013, 12:20:48 PM

Title: Private Font 64-bit demo
Post by: Patrice Terrier on December 03, 2013, 12:20:48 PM
Private Font

Is a 64-bit GDImage project, to create easy sprites from a provided sets of True Type Font.

There is no need to install the font(s) first, thus preserving the Windows memory, and insuring that it would be always available what ever the computer being used.

Example using USA map:    x = RND(100, rc.right); y = RND(0, rc.bottom );
    sLabel = EXEpath(); sLabel.append(L"geobats.ttf");
    hBitmap = ZD_CreateBitmapFromText(L"1",                               // Text to render
                                      (WCHAR*)sLabel.c_str(),             // Font name
                                      -60,                                // Font size (abs), use negative to disable creation of rectangular background region.
                                      ZD_ColorARGB(225,RGB(65,128,32)),   // ARGB color
                                      2,                                  // Shadow/3D
                                      0);                                 // String format
    ZD_DrawBitmapToCtrl(hCtrl, x, y, hBitmap, 0xFFFFFFFF, ID_USA, ZS_VISIBLE);
    ZD_SetObjectImageLabel(ID_USA, L"United States of America");
    ZD_SetObjectScroll(ID_USA, TRUE);


Example using celeb faces:
    x = RND(100, rc.right); y = RND(0, rc.bottom);
    sLabel = EXEpath(); sLabel.append(L"Celeb_Faces.ttf");
    hBitmap = ZD_CreateBitmapFromText(L"h",                               // Text to render
                                      (WCHAR*)sLabel.c_str(),             // Font name
                                      -320,                               // Font size (abs), use negative to disable creation of rectangular background region.
                                      ZD_ColorARGB(255, RGB(255,192,32)), // ARGB color
                                      0,                                  // Shadow/3D
                                      0);                                 // String format
    ZD_DrawBitmapToCtrl(hCtrl, x, y, hBitmap, 0xFFFFFFFF, ID_HALLE, ZS_VISIBLE);
    ZD_SetObjectImageLabel(ID_HALLE, L"Halle Berry");
    ZD_SetObjectScroll(ID_HALLE, TRUE);


You can find plainty of nice free fonts there. (http://www.dafont.com/)

Title: I couldn't believe this !
Post by: Patrice Terrier on December 07, 2013, 10:04:00 AM
Downloaded 100 times, i couldn't believe this  ::)

Hacker, troll ?

...