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.

LM4F111, stellarisware graphic library,how to make anti- alias font

Hi, I want to Use anti- alias font with proportionally spacing characters in my TFT display, could you please give some advice about how to deal with it, many thanks

  • Neat Avatar Henry!  Anti-Alias - as you know - looks so good due to heightened "shading" effects which tend to smooth/obscure "sharp edges" of font display.  The StellarisWare Graphic Library has been constrained to 8bpp color - thus any "anti-alias" efforts will force you into "near" mono-chrome due to your creation of many, "shades of gray."

    Suspect further that this "special treatment" of character's "rough/unseemly" edge is, "outside" the original intent & execution of the "S" Graphic Lib.  Base this upon the belief that, "special edge recognition - and then added processing" is beyond the current capability designed into the Graphic Lib's character generator...

    If lucky - one Dave Wilson will present the view from master control...

  • Henry,

      As things stand today, the Stellaris graphics library assumes bitmap-based 1 bit per pixel fonts so anti-aliasing is not possible when you use calls like GrStringDraw. If your application uses only fixed text strings (and doesn't need to display arbitrary text) you could do what I have done in the past and encode each string as a 4bpp image then display this. If you create the text string images in a decent image editor (for example Adobe Photoshop), the text will be anti-aliased and you will achieve the desired result on your embedded product display.

    To support 2bpp or 4bpp character formats (to allow anti-aliasing), a pretty substantial update to GrLib would be required so don't expect to see this any time soon - sorry.