NativeScript 不显示自定义字体
NativeScript not showing custom fonts
我的应用程序中没有显示自定义字体。
我进行了一些谷歌搜索,很确定我正确命名了所有内容,字体文件位于正确的文件夹中。不太清楚发生了什么。
这就是我在 app.css 中使用它的方式:
.pontanosans-regular {
font-family: "PontanoSans", "PontanoSans-Regular";
font-weight: 400;
}
然后我在另一个 folder/files 中使用这个 class 像这样:
class="pontanosans-regular"
文件夹如下所示:
根据{NS}
Note: In iOS your font file should be named exactly as the font name.
If you have any doubt about the original font name, use the Font Book
app to get the original font name.
和 mac 中的 Pontano Sans 名字在 2 个单词之间有一个 space。所以你的姓氏应该是这样的。
font-family: "Pontano Sans", "PontanoSans-Regular";
我最终 运行 解决了这个问题,我发现的问题是我的 .ttf 文件有问题。我试着下载了一个普通的网络字体,它工作得很好,所以有些字体只是有问题。
为了解决我的问题,我在其他网站上找到了原始字体。
我的应用程序中没有显示自定义字体。
我进行了一些谷歌搜索,很确定我正确命名了所有内容,字体文件位于正确的文件夹中。不太清楚发生了什么。
这就是我在 app.css 中使用它的方式:
.pontanosans-regular {
font-family: "PontanoSans", "PontanoSans-Regular";
font-weight: 400;
}
然后我在另一个 folder/files 中使用这个 class 像这样:
class="pontanosans-regular"
文件夹如下所示:
根据{NS}
Note: In iOS your font file should be named exactly as the font name. If you have any doubt about the original font name, use the Font Book app to get the original font name.
和 mac 中的 Pontano Sans 名字在 2 个单词之间有一个 space。所以你的姓氏应该是这样的。
font-family: "Pontano Sans", "PontanoSans-Regular";
我最终 运行 解决了这个问题,我发现的问题是我的 .ttf 文件有问题。我试着下载了一个普通的网络字体,它工作得很好,所以有些字体只是有问题。
为了解决我的问题,我在其他网站上找到了原始字体。