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. Dismiss Notice

How to import bitmap fonts?

Discussion in 'UGUI & TextMesh Pro' started by HyperionSniper, Aug 5, 2020.

  1. HyperionSniper

    HyperionSniper

    Joined:
    Jun 18, 2017
    Posts:
    30
    It seems a little ridiculous that Windows can easily generate this:
    upload_2020-8-4_21-8-10.png
    but when I use TextMeshPro I get this abomination:
    upload_2020-8-4_21-12-46.png

    What am I doing wrong? It seems like the sample point size is running on some magical pixel-fraction unit rather than actual pixels.
     
  2. Stephan_B

    Stephan_B

    Unity Technologies

    Joined:
    Feb 26, 2017
    Posts:
    6,588
    Are you trying to just create a bitmap font asset?

    Are you specifically targeting 12 point size?

    What font file are you using?
     
  3. HyperionSniper

    HyperionSniper

    Joined:
    Jun 18, 2017
    Posts:
    30
    Yes, I'm just trying to make a bitmap font asset, and I'm using a TTF font.

    I'm targeting 12 point size because at least in the Window font previewer, it seems to give me a pixel-to-pixel representation of my font.
     
  4. Stephan_B

    Stephan_B

    Unity Technologies

    Joined:
    Feb 26, 2017
    Posts:
    6,588
    The reason I am asking for the specific font file is because some font files are designed for specific point size unlike other font files using scalable glyphs.

    Font files designed for specific point size must be rendered at that specific point size otherwise they will not render correctly.

    What is the specific font file you are using?
     
  5. HyperionSniper

    HyperionSniper

    Joined:
    Jun 18, 2017
    Posts:
    30
    I ended up using Unity UI text at size 16 instead, but thanks for your help.
     
    Last edited: Aug 8, 2020