3

Im using a .ttf font in an NGUI UILabel, and am having some weird issues with the line spacing of the font.

If I use the font in 'microsoft paint', I get no vertical line spacing issues whatsoever...

However, when I use the font in an NGUI UILabel the vertical line spacing seems to decrease, 'scrunching' the text together if you will.

Has anyone run into this issue? I have tried editing the font spacing values using 'FontForge' but no difference has been made.

Thanks in advance!

1 Answers1

0

I can't say I've run into that problem, so I'm curious what settings you used when importing the font.

NGUI's label will read default spacing information from the UIFont object that you created during import. Recommend you find that asset in your project panel, then adjust a setting.

Quoting the docs:

Spacing lets you adjust the distance between printed characters (X) and lines (Y).

The docs don't specify what unit spacing uses, but it seems to be in pixels.

rutter
  • 11,242
  • 1
  • 30
  • 46
  • its a .ttf dynamic font. There aren't many settings to adjust in the editor. – Adam Robillard Aug 14 '14 at 22:11
  • Ah, apologies for missing that detail. In that case, I'd recommend importing the font so that you *can* adjust those settings. My impression is that NGUI's support for dynamic fonts is limited. – rutter Aug 14 '14 at 23:00