Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

Dynamic Font & Bitmap font, which use less memory?

Discussion in 'Editor & General Support' started by duotemplar, Feb 10, 2015.

  1. duotemplar

    duotemplar

    Joined:
    Dec 30, 2010
    Posts:
    26
    hi everyone

    So I read the docs about dynamic font used in unity.Like it say, If the font I used, which is in user's device, I can reduce memory for the font texture.But if the font data not install on the device, so I need include the font data,right?That's the question:

    When I use a font data which can not found on the user's device, unity will load the "xx.ttf" file into memory to gen the font texture(maybe like Resources.Load())?If the ttf file was so larger, it will take more memory than bitmap font's texture?

    In my project, we need support asain char, so the ttf file almost about 16MB, but if I use bitmap font, it only 2~4MB, at this condition, we should choose dynamic font or bitmap font?
     
  2. fffMalzbier

    fffMalzbier

    Joined:
    Jun 14, 2011
    Posts:
    3,276
    If the resolution of the bitmap font is working for you and is smaller then the ttf file, use it.
    If you need a wide range of different font sizes you me be better off with the ttf file and dynamic font rendering.
    You should allways include the font if your going for different platforms , you never now if the font is available and if its exactly the same on all platforms.
     
  3. duotemplar

    duotemplar

    Joined:
    Dec 30, 2010
    Posts:
    26
    OK!I understand, and thx very much!