When I set a textFeild’s embardFonts=true the height is 0.
I jsut noticed the font isnt loading at all.
I am embeding this way :
When I set a textFeild’s embardFonts=true the height is 0.
I jsut noticed the font isnt loading at all.
I am embeding this way :
I got it to work by putting the font in a folder “fonts” in assets.
then adding this to the project.xml
<assets path="assets/fonts" rename="fonts" />
then getting the font name like this
Assets.getFont("fonts/fontfile.TTF").fontName
interested why I couldnt get your solution to work @singmajesty .
Thanks
When you <assets path="assets/fonts" />
, the fonts should be included in your project. If you do a -verbose
build, the tools should output the detected font name. As a result, you can use Assets.getFont
, but also you can just use the name of the font, such as “Arial Bold”