aidanhowie Posted May 25, 2017 Report Share Posted May 25, 2017 (edited) Hi, I am having a few problems with trying to compile my project when using a font I have converted with the online converter. I am currently designing a Tetris game for one of my university projects with the uGFX library and thought it would be quite cool to implement my own font. I am currently using a stm32f4 discovery board and have been able to use all of the included fonts in the libraries. The error I received when compiling is: #error The font file is not compatible with this version of mcufont. When using my own font I followed the steps from https://wiki.ugfx.io/index.php/Font_rendering#Adding_fonts. The steps I took were: 1) Downloading the font that I wanted, Ubuntu Title, in *.ttf format. 2) Converted the font using the online converter. 3) Changed the name of the *.c file to userfonts.h and in gfxconfig.h added: #define GDISP_NEED_TEXT TRUE #define GDISP_NEED_UTF8 TRUE #define GDISP_INCLUDE_USER_FONTS TRUE 4) Loaded the font: font_t font1; // Load font for ugfx font1 = gdispOpenFont("Ubuntu_Title14"); Does anyone have an idea of how to fix this problem, or is anyone having similar issues with their converted fonts? Thanks, Aidan Edited May 25, 2017 by aidanhowie Link to comment Share on other sites More sharing options...
inmarket Posted May 25, 2017 Report Share Posted May 25, 2017 This problem is usually caused by your include path containing the src/gdisp/fonts or src/gdisp/mcufont directory. Remove those directories from your include path and the problem should dissappear. If you search the forums this topic is not uncommon. Reading those posts will give you a lot of background on why it is this way. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now