Css Nativescript自定义字体问题

Css Nativescript自定义字体问题,css,fonts,nativescript,Css,Fonts,Nativescript,我正试图让自定义字体在Nativescript中工作,并将它们保存在根目录下的src/fonts文件夹中。我已经研究了其他问题,但没有解决它,css在下面,它是一种显示字体,只用于操作栏标题,没有在其他任何地方使用 @font-face { font-family: 'Trade Winds'; font-style: normal; font-weight: 400; src: local('Trade Winds'), local('TradeWinds'),

我正试图让自定义字体在Nativescript中工作,并将它们保存在根目录下的src/fonts文件夹中。我已经研究了其他问题,但没有解决它,css在下面,它是一种显示字体,只用于操作栏标题,没有在其他任何地方使用

  @font-face {
  font-family: 'Trade Winds';
  font-style: normal;
  font-weight: 400;
  src: local('Trade Winds'), local('TradeWinds'),
       url('src/fonts/trade-winds-v8-latin-regular.ttf') format('ttf'), /* Safari, Android, IOS*/
}
.action-label {
font-family: 'Trade Winds', 'trade-winds';
font-size: 28px;
font-weight: bold;
color:blue;
}

have also tried variations of the path but not working. Only testing in Android at the moment. Thanks

您不必使用NativeScript定义字体。指定字体系列时,第一个名称应为postscript名称(
Trade Winds
),然后是文件名(
Trade Winds
,在本例中,字体文件名应类似于
Trade Winds.ttf
),但没有乐趣:。动作标签{font-family:'Trade-Winds','Trade-Winds',字体大小:28px;字体重量:粗体;颜色:蓝色;src:local('Trade-Winds')、local('TradeWinds')、url('src/fonts/Trade-Winds.ttf')格式('ttf')、/*Safari、Android、IOS*/}你们正在尝试使用AcrionBar上的图标吗?是的,但并没有显示,应用程序仍在emulator上加载,并正常工作,但控制台显示res://icon 错误,字体未显示,因此这似乎是问题所在。您还不能在AcrionBar上应用字体系列。使用ActionView并放置图像或标签以使用字体。