How to use .png image to create a font

kevinli

29-12-2011 03:33:57

I wonder how to define a font in MyGUI_Fonts.xml, not use .ttf file but .png? thx.

Altren

29-12-2011 21:40:04

There is example in Media\Common\Tools\FrameworkFonts.xml that use MicroFont.png as source.
<Resource type="ResourceManualFont" name="MicroFont.11">
<Property key="Source" value="MicroFont.png"/>
<Property key="DefaultHeight" value="11"/>
<Codes>
<!--0-9-->
<Code index="48" coord="220 2 6 11"/>
<Code index="49" coord="230 2 4 11"/>
<Code index="50" coord="240 2 6 11"/>
<!-- ... -->
<!--A-Z-->
<Code index="65" coord="10 14 6 11"/>
<Code index="66" coord="20 14 6 11"/>
<Code index="67" coord="30 14 6 11"/>
<!-- ... -->
</Codes>
</Resource>

kevinli

30-12-2011 03:05:25

Thank you very much!!! I did not see it before.

kevinli

30-12-2011 07:09:36

Just one more question. I create a TextBox use a font, could I rotate it? And how? Or use another widget not TextBox?