在Corona SDK中更改字体

我刚刚开始使用Corona SDK学习Lua。我尝试显示一个简单的文本,将其居中,并将字体更改为"AmericanTypewriter-Bold"。

_screen = {
    height = display.contentHeight,
    width = display.contentWidth
}
_screen._center = {
    x = display.contentCenterX,
    y = display.contentCenterY
}

local font = "AmericanTypewriter-Bold"
local titleText = display.newText("Hello",0,0, font, 50)
titleText.x = _screen._center.x
titleText.y = _screen._center.y

不幸的是,字体没有改变。这种字体应该只能在iOS设备上访问,所以我正在使用iPhone 6 Plus进行查看-但字体仍然没有改变。

点赞