【问题标题】:Appcelerator custom font helveticaAppcelerator 自定义字体 helvetica
【发布时间】:2013-05-10 16:26:49
【问题描述】:

我正在尝试在 appcelerator 合金框架中使用自定义字体。 我有以下文件:

header.tss

".headerButtonLabel": {
    color: '#5d5d5d',
    shadowOffset: {x: 1, y: 1},
    shadowColor: '#ffffff',
    font: {fontSize: 18, fontFamily: 'Helvetica Neue LT Std 77 Bold Condensed'},
    textAlign: 'left'
}

header.xml

<Button class="headerButton">
    <Label class="headerButtonLabel" text="Text button here"></Label>
</Button>

tiapp.xml

<ios>
<plist>
    <dict>
    <key>UIAppFonts</key>
        <array>
            <string>fonts/HelveticaNeueLTStd-Bd.otf</string>
            <string>fonts/HelveticaNeueLTStd-BdCn.otf</string>
            <string>fonts/HelveticaNeueLTStd-Roman.otf</string>
        </array>
    </dict>
</plist>        
</ios>

字体存储在 app/assets/fonts 中

我已经附上了这些字体here

当我打开HelveticaNeueLTStd-BdCn.otf 时,它会出现以下名称Helvetica Neue LT Std 77 Bold Condensed。

我错过了什么吗?

【问题讨论】:

    标签: appcelerator appcelerator-mobile titanium-alloy


    【解决方案1】:

    毕竟要弄清楚。

    example image of where you will find the right name

    似乎字体手册中的 PostScript 名称是您为 IOS 开发时的正确名称。

    【讨论】:

    • 如果您在 Titanium 文档所述的同一个系列中只有一种字体,则可以使用“系列”。但是,PostScript 名称将始终有效,并且可以区分同一系列中不同样式的字体
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2011-12-28
    • 2013-09-09
    • 2017-04-05
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多