Why is it that some TTF fonts won’t load in the simulator?
For example, I have build.settings with:
-- Supported values for orientation: -- portrait, portraitUpsideDown, landscapeLeft, landscapeRight settings = { orientation = { default = "portrait", supported = { "portrait", } }, iphone = { plist = { UIAppFonts = { "Bebas Neue.ttf", "Continuum Bold.ttf", "True Crimes.ttf", "Dead Kansas.ttf", "HelveticaNeue-Light.ttf", "Sprite Graffiti.ttf" }, UIStatusBarHidden = false, UIPrerenderedIcon = true, -- set to false for "shine" overlay CFBundleIconFile = "Icon.png", CFBundleIconFiles = { "Icon.png" , "Icon@2x.png" , "Icon-114.png" , }, UIApplicationExitsOnSuspend = true, -- uncomment to quit app on suspend --[[-- iOS app URL schemes: CFBundleURLTypes = { { CFBundleURLSchemes = { "fbXXXXXXXXXXXXXX", -- example scheme for facebook "coronasdkapp", -- example second scheme } } } --]] } }, android = { versionCode = "1", versionName = "1.0", largeHeap = true, --usesExpansionFile = true, usesPermissions = { "android.permission.INTERNET", "com.android.vending.CHECK\_LICENSE", "com.android.vending.BILLING", --"android.permission.WRITE\_EXTERNAL\_STORAGE", } }, plugins = { --["plugin.openssl"] = { publisherId = "com.coronalabs", }, -- key is the name passed to Lua's 'require()' --["plugin.zip"] = { publisherId = "com.coronalabs", }, -- key is the name passed to Lua's 'require()' --["CoronaProvider.ads.AdMob"] = { publisherId = "com.coronalabs", }, }, }
and in my main.lua I have:
--require("loq\_profiler").createProfiler() --require "lib.strict" s = require("storyboard") s.g = { sprites = {} } widget = require("widget") ------------------------------------------------------------ -- Game UI - Backgrounds for devices ------------------------------------------------------------ display.setDefault( "anchorX", 0 ) display.setDefault( "anchorY", 0 ) ---- End Game UI for devices init --------------------------- --s.gotoScene( "scenes.test" ) local function checkFonts() local fonts = native.getFontNames() -- Display each font in the terminal console for i, fontname in ipairs(fonts) do print( "fontname = " .. tostring( fontname ), i ) end end checkFonts()
I have the font installed in Windows 7 and I have the ttf file in the main.lua directory.
For some reason I can’t upload the font, so here’s a link to the zip of it:
http://www.filedropper.com/spritegraffiti
Why don’t certain fonts load?