A font is not showing up in the Simulator.
All the fonts are standard TTF from Google Fonts - so definitely good.
I have 3;
OpenSans-CondBold.ttf
OpenSans-CondLight.ttf
OpenSans-CondLightItalic.ttf
local displayText1 = display.newText( "Bold", 150, 80, "OpenSans-CondBold.ttf", 94 ) local displayText2 = display.newText( "Light", 150, 180, "OpenSans-CondLight.ttf", 94 ) local displayText3 = display.newText( "Italic", 150, 280, "OpenSans-CondLightItalic.ttf", 94)
Light & Light Italic show up in the simulator. Bold does not. - Screen Shot attached.
But - all 3 show up on my Android device - Screen Shot attached.
I ran some code to dump out fonts;
local systemFonts = native.getFontNames() -- Set the string to query for (part of the font name to locate) local searchString = "Open" -- Display each font in the Terminal/console for i, fontName in ipairs( systemFonts ) do local j, k = string.find( string.lower(fontName), string.lower(searchString) ) if ( j ~= nil ) then print( "Font Name = " .. tostring( fontName ) ) end end
The output lists;
Font Name = Open Sans Condensed Light Font Name = Open Sans Condensed
Not sure what that really means - are those the Family Names? because using FontForge I see the Regular and Italic have the *same* family name (Open Sans Condensed Light), the Bold has different Family Name (Open Source Condensed).
All 3 have different Name For Humans and Fontname.
But however you look at it, I think the Bold should appear in the simulator - no?
It’s quite confusing.