【发布时间】:2020-04-09 17:36:45
【问题描述】:
首先,我在 web 部件中创建了我的 style.css
@font-face {
font-family: "Noto Sans Southeast Asian";
font-weight: normal;
src: local("Noto Sans Southeast Asian"), url("NotoSansSoutheastAsian-Regular.ttf") format("truetype");
}
@font-face {
font-family: "Noto Sans Southeast Asian Bold";
font-weight: bold;
src: local("Noto Sans Southeast Asian Bold"), url("NotoSansSoutheastAsian-Bold.ttf") format("truetype");
}
我已经完成了本机 iOS 部分的说明 custom font not working programmatically in swift
没用
我得到的建议是我必须将我的 HTML 页面编码为 base64,如果我想在之后将它带到本机部分以添加 wkWebview 的本地字体
我不知道如何实现 wkWebview 以在我的项目从 Html 文件加载的每个页面中使用我的自定义字体
我刚开始使用 wkWebview。 我的项目使用 swift 4.2
【问题讨论】:
标签: html ios swift fonts wkwebview