Author Topic: UILabel Bitmap font vs Dynamic font for performance  (Read 3190 times)

tnbao91original

  • Newbie
  • *
  • Thank You
  • -Given: 2
  • -Receive: 0
  • Posts: 41
    • View Profile
UILabel Bitmap font vs Dynamic font for performance
« on: August 20, 2014, 11:28:40 PM »
Can u explain which is good for mobile device performance ?

Nicki

  • Global Moderator
  • Hero Member
  • *****
  • Thank You
  • -Given: 33
  • -Receive: 141
  • Posts: 1,768
    • View Profile
Re: UILabel Bitmap font vs Dynamic font for performance
« Reply #1 on: August 21, 2014, 02:43:33 PM »
"Performance" is a big word, which has different vectors.

If you mean Performance as in Quick to Process, then Bitmap Fonts are faster, since it's only a texture lookup, while dynamic has to render the glyph to a bitmap under the surface at run time.
If you mean Memory Use, then Dynamic Fonts are better, since they use a 8 bit alpha for texture and has slightly better texture packing. (This also incurs some limitations in effects on the fonts etc).
If you mean "will cause me least headaches" then Bitmap Fonts are almost certainly better, since you'll never get into a situation where the font generator rebuilds the texture and labels lose their reference (the infamous "Garbled label" issue).

Largely, it's dependent on your needs. If you need to put fancy effects on it, use Bitmap and pre-generate the effect.

If you need it to be pixel perfect at multiple resolutions and support languages with unusual glyphs (greek, russian, most asian languages) then Dynamic Fonts are for you.

tnbao91original

  • Newbie
  • *
  • Thank You
  • -Given: 2
  • -Receive: 0
  • Posts: 41
    • View Profile
Re: UILabel Bitmap font vs Dynamic font for performance
« Reply #2 on: August 21, 2014, 09:20:15 PM »
Best answer, thank you so much  :)