Hello Guest

Author Topic: TextMesh: DemoCameraFont works, DemoFont & GradientFont don't  (Read 7293 times)

SteBee

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 2
    • View Profile
I'm getting started with 2D Toolkit on iOS (Pro, Unity 3.5.1f2), using the latest version from the Asset Store. I have sprites showing up as expected with no problems. I also have a text mesh appearing just fine using DemoCameraFont. However, when I switch from DemoCameraFont to any other font--mine (created using GlyphDesigner) or the provided DemoFont and GradientFont, the text mesh disappears. Literally the only change is switching the droplist from DemoCameraFont to anything else. Switching back to DemoCameraFont makes the text appear again.

Creating a new font that seems to be identical to DemoCameraFont, by creating a font and dropping /TK2DROOT/tk2d_demo/democameradata/source/democamerafont onto the Bm Font property and /TK2DROOT/tk2d_demo/democameradata/source/democamerafont_00 onto the Texture property, gives the same results, so this doesn't appear to be a problem with the texture or font data.

What am I doing wrong?

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: TextMesh: DemoCameraFont works, DemoFont & GradientFont don't
« Reply #1 on: April 23, 2012, 08:12:40 am »
Are you using a tk2dCamera?
If so, this could be because these sprites are created for normal cameras and not for a tk2dCamera. Does it appear once you click on "1:1"?

After switching the font type, could you please go to the Scene viewport, and press F to focus on the mesh. This should zoom in to where the mesh is, and if its the wrong scale, it should be obvious then.

SteBee

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 2
    • View Profile
Re: TextMesh: DemoCameraFont works, DemoFont & GradientFont don't
« Reply #2 on: April 23, 2012, 08:56:02 am »
Yes, the problem was I was using a tk2dCamera, and had set the sprite atlases properly but forgot to set the fonts. Fixed now; many thanks!

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: TextMesh: DemoCameraFont works, DemoFont & GradientFont don't
« Reply #3 on: April 23, 2012, 09:00:05 am »
Glad its fixed :)