Open SwingCosmic opened 3 months ago
渲染的结果应该类似某知名视频网站的logo,但导出图片时所有的文字都消失了。
<div class="root"> <div style="position: static; display: flex; flex-direction: row;"> <div style="white-space: nowrap; font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Source Han Sans CN", "Hiragino Sans GB", "noto sans", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif; font-weight: 700; line-height: 1em; padding: 5px; position: relative; color: rgb(255, 255, 255); font-size: 60px;">Blue</div> <div style="position: static; border-radius: 7px; background-color: rgb(255, 153, 0);"> <div style="white-space: nowrap; font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Source Han Sans CN", "Hiragino Sans GB", "noto sans", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif; font-weight: 700; line-height: 1em; padding: 5px 10px; position: static; color: rgb(0, 0, 0); font-size: 60px;">Archive</div> </div> </div> </div>
e.g.
@font-face { font-family: "Source Han Sans CN"; src: url("/font/SourceHanSansCN-Medium.woff2"); font-weight: 500; } @font-face { font-family: "Source Han Sans CN Bold"; src: url("/font/SourceHanSansCN-Bold.woff2"); }
在这种情况下,font-weight700的字体会匹配为Source Han Sans CN Bold并造成渲染文字消失。
Source Han Sans CN Bold
由于不同用户的系统环境不同,且存在用户动态加载网页字体的情况,无法得知使用到的字体传给options,这种情况下时有时无会带来令人困惑的结果
渲染的结果应该类似某知名视频网站的logo,但导出图片时所有的文字都消失了。
e.g.
在这种情况下,font-weight700的字体会匹配为
Source Han Sans CN Bold
并造成渲染文字消失。由于不同用户的系统环境不同,且存在用户动态加载网页字体的情况,无法得知使用到的字体传给options,这种情况下时有时无会带来令人困惑的结果