0

OpenFL random Font Names issue

Posted by Dana on June 5, 2015 in HAXE, openfl |

Fonts are one of my list favourite things in any platform… They always come with issues…

In OpenFL one of the main issues I have found is to know what to use as the font name since it doesn’t match the name of the file and you can’t always guess what it is… Always feels like a random issue to me.

So here is a tip to find out what the name should be:

var your_font:Font = Assets.getFont(“assets/fonts/font_file_name.ttf”);
trace(your_font.fontName);

Run the code and the trace should give you the information you are looking for.

🙂

Tags: ,

Leave a Reply

Your email address will not be published. Required fields are marked *

Copyright © 2012-2017 Code in GoGoLand All rights reserved.
This site is using the Desk Mess Mirrored theme, v2.5, from BuyNowShop.com.