Thread: in graphics mode : font not loaded in c++

  1. #1
    Registered User
    Join Date
    Aug 2013

    in graphics mode : font not loaded in c++

    hi to all, I've centos7.5 in VM. i installed SDL_bgi in my system for graphics programming. I coded following in IDE.
    #include <graphics.h>
    #include <iostream>
    int main(int argc, char ** argv)
        int gd = DETECT, gm;
        initgraph(&gd, &gm, NULL);
        circle(50, 50, 30);
        return 0;
    output in C::B is fine displays a circle.

    but when i ran in command prompt shows this error :-
    [rahul@centos7client Release]$ ./cbs 
    The font has not been loaded!
    how to solve this. pleae help.

  2. #2
    misoturbutc Hodor's Avatar
    Join Date
    Nov 2013
    That's a bit weird. The version of SDL_bgi that I found seems to have a font hardcoded in... although that is an SDL error. You might need to install the library sdl2-ttf (the centos package name appears to be SDL_ttf-devel which should install the library as well. I guess so anyway, I don't use Centos so I'm just guessing )

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Problem with default font in graphical mode
    By voldemarz in forum C Programming
    Replies: 16
    Last Post: 10-24-2008, 01:30 PM
  2. Graphics Mode
    By ReLiEnThAwK in forum C++ Programming
    Replies: 6
    Last Post: 07-26-2005, 06:10 PM
  3. Graphics Mode!
    By Perica in forum Game Programming
    Replies: 32
    Last Post: 12-06-2002, 11:07 PM
  4. Setting Graphics Mode
    By Unregistered in forum Game Programming
    Replies: 13
    Last Post: 03-27-2002, 10:01 PM

Tags for this Thread