Author Topic: How to use custom dynamic font material?  (Read 3959 times)

Gundam

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 3
    • View Profile
How to use custom dynamic font material?
« on: January 10, 2014, 03:54:25 AM »
Hi, Aren

I would like to modify the dynamic font rendering via a custom shader, can you please help me understand, how to make this work? UILabel has a Material property available when dynamic font mode is chosen, however if I set a material with the Unlit/Dynamic Font shader, for example, it results in text being drawn with correct colors, but alpha is always 1 - the glyphs are drawn as filled rectangles...

I don't really understand, why is this happening, can you please tell me, what am I doing wrong?

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: How to use custom dynamic font material?
« Reply #1 on: January 10, 2014, 05:53:28 PM »
You need to select the font's texture. Without it, there's nothing to draw.

Gundam

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 3
    • View Profile
Re: How to use custom dynamic font material?
« Reply #2 on: January 13, 2014, 01:04:54 AM »
Quote
You need to select the font's texture. Without it, there's nothing to draw.

Aren, I'd love to :) But the font is dynamic and from what I can gather, there is no access to the generated texture... Am I missing something?

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: How to use custom dynamic font material?
« Reply #3 on: January 13, 2014, 06:14:40 PM »
On the TTF font, you can expand it to reveal the font's texture and its material.

Gundam

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 3
    • View Profile
Re: How to use custom dynamic font material?
« Reply #4 on: January 14, 2014, 12:59:44 AM »
Oh, so that's what I was missing... Thank you very much! :)