This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

corrupted font

Hi,

I am trying to write a demo code on LM4F232H5QD evaluation board.

I am using CCS 5.5.0.00077 with TivaWare_C_Series-2.0.1.11577

I started with a hello example and extended it. The problem is that some fonts are corrupted, specifically

the digit "5" - see the picture attached.

I am unable to use other fonts than psFontCm12

GrContextFontSet(&sContext, g_psFontCm12);

as I have a build error unable to find it

Please advice how to fix

Jan

  • jan2809 said:

    Please advice how to fix

     Please Help me soon win a lottery, I am in deep need!!!! ;)

     Sorry more and more detail needed .. we are not at your desk not in your mind.

  • jan2809 said:

    am unable to use other fonts than psFontCm12

    GrContextFontSet(&sContext, g_psFontCm12);

    as I have a build error unable to find it

     Please at almost post error you get from compiler and which kind of "extension" you applied to demo code.

     Is stack ok? Is display working ok on untouched demo code?

  • Hi,

    Thanks everyone, who responded trying to help, that's much appreciated.
    It looks like there is a problem with grlib pixel map for font definition, which results with some fonts not being displayed correctly.
    To reproduce the problem one of a simple way is the following:

    1) import the project:
    C:\ti\TivaWare_C_Series-2.0.1.11577\examples\boards\ek-lm4f232\hello

    2) build it and run on the target (LM4F232H5QD Evaluation board).
    The result is as intended the "hello world" displayed on oled and sent to uart

    3)change the string in lines 160, 161 from "hello" into "0123456789"
        //GrStringDrawCentered(&sContext, "hello", -1,
                             //GrContextDpyWidthGet(&sContext) / 2, 10, 0); // was
     GrStringDrawCentered(&sContext, "0123456789", -1,
                             GrContextDpyWidthGet(&sContext) / 2, 10, 0);
    4) changing the font from g_psFontCm12 to g_psFontCm12b gives the error,
    despite that font being defined in C:\ti\TivaWare_C_Series-2.0.1.11577\grlib\grlib.h

  • Hi,

    More information. Interestingly, when running the example "qs-logger" on the same platform the fonts are OK, but the fonts used there are g_sFontFixed6x8. 

    So the question is how to use the g_sFontFixed6x8 as used in qs-logger in a simple application with GrStringDraw function? How to make the fonts accessible, what to include?

    Jan

  • Hi,

        Maybe, you are having problems with "5" because of that build error. There is a Graphics Library Users Guide that you can review. Also, see similar post below.

       Using new fonts on LM4F232 Eval Board

    -kel

  • Hi Kel,

    I have no build error when changing the string "hello" with "0123456789" within the "hello" example, it reveals the corrupted font for a digit "5". My guess it is a bug being a wrong bitmap.

    I will investigate the link you provided, thanks for that.

    It supposed to be an easy way with grlib, but it is not.

    My guess is that there is a bug in a grlib being a wrong bitmap for that font.

    Hopefully it will be fixed in a new release of Tivaware.

    Can can I report the bug to the creators/maintainers of grlib? Hope they do care about the quality of their product.

    Jan

  • jan2809 said:
    Can can I report the bug to the creators/maintainers of grlib? Hope they do care about the quality of their product.

    The creators of grlib frequent this forum. Maybe, they don't have time yet to reply.

    -kel

  • Jan,

    The error you see on the '5' character is an artifact of using a such a small font on a 96x64 OLED display.  The small display on the EK-LM4F232 (or DK-TM4C123G) is not compatible with all fonts in the TivaWare graphics library.  There many fonts available in the graphics library but some are only fully compatible with higher resolution displays.

    For your application, I recommend changing fonts to 'g_psFontFixed6x8'.

    GrContextFontSet(&sContext, g_psFontFixed6x8);

    I tried this on your same development board and the output is what you would expect.

    Let me know if this helps.

    -Joel

  • Hi Joel,

     Thanks for that explanation.

    The suggested font works fine, so it fixes my problem.

    Jan