未识别的font-font'开放式bold'
我正在尝试将自定义字体添加到我的Bare React本地项目中,并且我一直在iOS Similator上获得未识别的字体家庭“开放式”
。我在资产文件夹中添加了字体折叠,并使用文件open-sans.ttf和open-sans-bold.ttf
我也有react> react-native.config.js
在下面的内容下,
module.exports = {
project: {
ios: {},
android: {},
},
assets: ['./assets/fonts/'],
};
我运行npx react-native链接,然后检查了info.plist文件,并且我的字体< key gt; uiappfonts</key>
我尝试了不同的解决方案,但它们都不适用于我。
I am trying to add custom fonts to my bare react native project and I keep getting Unrecognized font-family 'open-sans-bold '
on the ios similator. I added the fonts fold in my assets folder with files open-sans.ttf and open-sans-bold.ttf
I also have react-native.config.js
with the content below
module.exports = {
project: {
ios: {},
android: {},
},
assets: ['./assets/fonts/'],
};
I run npx react-native link and I checked the info.plist file and I have the fonts in <key>UIAppFonts</key>
I tried different solutions but none of them worked for me.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论