Author Topic: Merge bitmap font or get different Noto fonts into one file  (Read 7974 times)

Schnueggel

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 4
    • View Profile
    • PyokoPykoko
Merge bitmap font or get different Noto fonts into one file
« on: November 02, 2014, 05:59:59 AM »
Hi there,

I am trying to get different noto fonts (https://www.google.com/get/noto/) for different languages in one bitmap font file. My game is multi language but it does not have much text.
With BMfont I have the problem that I only can choose one additional font from a file. Also when I pick  a system font, lets say Noto Japanese and pick Noto Arabic from a file it does not work. The glyph sets get not added.

Does anyone here have experience in how to merge bitmap fonts?  or can NGUI solve this for me somehow?


Greetings Christian

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Merge bitmap font or get different Noto fonts into one file
« Reply #1 on: November 03, 2014, 06:19:05 AM »
When you create a bitmap font via the Font Maker tool in NGUI you can specify a Custom set of characters. Just paste all the characters you need in there and NGUI will include them when making the font.

Schnueggel

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 4
    • View Profile
    • PyokoPykoko
Re: Merge bitmap font or get different Noto fonts into one file
« Reply #2 on: November 03, 2014, 05:44:20 PM »
Hi

thanks for the answer. Still I have the problem that I can only pick one font file. I can pick chinese font or arabic font, but not both. This will result in two ngui font prefabs but I can only pick one per label.

I can perhaps change the font dynamically on the labels depending on the language. Or choose a font that include all the chars I need. Perhaps I can merge the fonts.


ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Merge bitmap font or get different Noto fonts into one file
« Reply #3 on: November 04, 2014, 09:54:18 AM »
If the font you are using doesn't include all characters, then yes, you will need multiple fonts. You can replace fonts using the Reference Font feature in NGUI. Your main font will have no data, but it will reference the real font -- for example Asian one. All your labels will use this main (reference) font (not the real one). This way when you replace the referenced font's value to Arabic, all labels will automatically switch to it as well.

Schnueggel

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 4
    • View Profile
    • PyokoPykoko
Re: Merge bitmap font or get different Noto fonts into one file
« Reply #4 on: November 04, 2014, 06:04:50 PM »
Thanks a lot that did work.