I am sure I am missing something, but could use a pointer. I am testing this on the Conona Simulator #2011.591 (on Win 7), trying to use a custom font with italics or bold, but having no luck.
So here is the code:
[lua]tBox1 = display.newText(“Example A”, 0, 20, “Segoe UI”, 18)
tBox2 = display.newText(“Example B”, 0, 40, “Segoe UI Bold”, 18)
tBox3 = display.newText(“Example B”, 0, 60, “Segoe UI Italic”, 18)[/lua]
Simple enough. Line 1 prints what I want. Lines 2 and 3 don’t…
I get an error that the system could not load the bold or italic version of the font.
…lines 2 and 3 are set to use the “default” system font. Now then, I understand that I need to use the correct name to access my bold or italic version of the font. So I try to find that name… when I list my available fonts, I can see that I have a few variations of the Segoe font… “Segoe UI”, “Segoe UI Light”, “Segoe UI Symbol”, “Segoe Print”, etc…
However, I KNOW I have Segoe UI and it’s corresponding Bold and Italic fonts installed on my machine. And I know that the Corona Simulator is pulling it’s font list directly from the list of available fonts of my system. If it wasn’t, then it couldn’t get Segoe UI. I don’t include it in any other place in my little test app (not in config.lua, or build.settings and no copy of the segoeui.ttf in my main.lua folder) so it comes from my system, right?
In addition, I can look at the name of the font in Windows font previewer to get the names… but those are exactly the names I am currently using. So what gives?
How do I refer to the Italics or Bold variant of this font?
I’m about to sacrifice a goat to get the answer. Please help. Save a goat’s life. And my sanity. Thanks!
[import]uid: 10818 topic_id: 14979 reply_id: 314979[/import]
[import]uid: 3826 topic_id: 14979 reply_id: 55275[/import]