Author Topic: Problems creating font atlases  (Read 10002 times)

danilofaria

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 11
    • View Profile
Problems creating font atlases
« on: February 24, 2016, 10:15:01 PM »
I was not able to create a new font atlas on my Mac, because NGUI is missing a file called NGUI/Editor/FreeType64.dylib.

Then I tried doing it on a windows computer and it also failed to create a font atlas, got some error message when creating the font atlas.

I've wasted half a day trying to create a font atlas and just getting errors.

Any help would be appreciated.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Problems creating font atlases
« Reply #1 on: February 25, 2016, 10:01:14 PM »
"some error message" doesn't let me help you, you will need to elaborate. Font creation works as expected on Windows as far as I'm aware.

danilofaria

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 11
    • View Profile
Re: Problems creating font atlases
« Reply #2 on: February 28, 2016, 02:32:53 PM »
Hello,

I didn't have the error message with me because I did it in a windows computer that I had borrowed from someone. I borrowed it again and the message was:

Unable to use the chosen font (FT_New_Face).
UnityEngine.Debug:LogError(Object)
FreeType:GetFaces(Font) (at Assets/NGUI/Scripts/Editor/FreeType.cs:440)
UIFontMaker:OnGUI() (at Assets/NGUI/Scripts/Editor/UIFontMaker.cs:221)
UnityEditor.DockArea:OnGUI()

Let me know if there is a solution for that. Also let me know if there is a way to do it on the mac.

Thanks.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Problems creating font atlases
« Reply #3 on: March 01, 2016, 06:12:09 AM »
What font are you trying to use? It needs to be an actual TTF font residing inside your assets. It can't be a built-in Unity font.

danilofaria

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 11
    • View Profile
Re: Problems creating font atlases
« Reply #4 on: March 01, 2016, 10:43:08 PM »
I was using TTF fonts that I had imported into my project. Fonts from 1001freefonts.com, for example Open Sans (http://www.1001freefonts.com/open_sans.font).

I tried many of them, but none worked. I kept on getting that error message.

Thanks.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Problems creating font atlases
« Reply #5 on: March 02, 2016, 08:03:41 AM »
What version of Unity are you using? 64 or 32 bit? The compiled library is for 64-bit by default.

danilofaria

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 11
    • View Profile
Re: Problems creating font atlases
« Reply #6 on: March 02, 2016, 08:36:43 PM »
It was 64-bit.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Problems creating font atlases
« Reply #7 on: March 02, 2016, 09:25:42 PM »
Try replacing the 3 attached files in NGUI/Scripts/Editor.

danilofaria

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 11
    • View Profile
Re: Problems creating font atlases
« Reply #8 on: March 03, 2016, 09:38:09 PM »
Hello,

I tried again after replacing the files you attached, but got the following error:

Unable to use the chosen font (FT_New_Face).
UnityEngine.Debug:LogError(Object)
FreeType:GetFaces(Font) (at Assets/NGUI/Scripts/Editor/FreeType.cs:435)
UIFontMaker:OnGUI() (at Assets/NGUI/Scripts/Editor/UIFontMaker.cs:217)
UnityEditor.DockArea:OnGUI()

I tried it with different fonts, including the one I showed you in an earlier message (open sans).

Thanks

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Problems creating font atlases
« Reply #9 on: March 06, 2016, 12:55:18 PM »
I don't know what to say then, as it's working perfectly fine on my end over here. If you email your OR# to support [at] tasharen.com I can try sending you a packaged up Pro package with all the latest changes to see if that will help, but that's about all I can offer.

danilofaria

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 11
    • View Profile
Re: Problems creating font atlases
« Reply #10 on: March 07, 2016, 10:06:07 AM »
We could try that. What do you mean by OR# though?
Also, are there any other ways I could go about to create font atlases to use with NGUI?

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Problems creating font atlases
« Reply #11 on: March 12, 2016, 07:39:02 AM »
OR# = Order number, you get it when you buy from the Asset Store. You can still create a font using BMFont if you prefer -- I am sure there are old tutorials around still.