gpt4 book ai didi

css - 将 STIX 字体应用于 MathML CSS

转载 作者:行者123 更新时间:2023-11-28 18:33:19 25 4
gpt4 key购买 nike

我尝试使用这种字体通过这个简单的 CSS 呈现一个简单的 MathmML 公式,但公式没有改变,

.formula {
text-align: center;
font-weight: 100;
font-style: normal;
padding: 10px;

font-family: 'STIXGeneral';
}

或与

    @font-face
{
font-family: STIX;
src: url('STIXIntegralsD-Regular.ttf');

}

.formula {
text-align: center;
font-weight: 100;
font-style: normal;
padding: 10px;

font-family: 'STIX';
}

但是没有,字体没有应用,错误在哪里?

最佳答案

要使第二个工作,ttf 文件需要与 html 文件位于同一目录中,并且您使用的浏览器需要能够加载 ttf 字体作为网络字体,请参阅 http://caniuse.com/ttf有关哪些浏览器支持 ttf 网络字体的表格。

只要您在本地安装了 stix 字体并在您的元素上使用 class="formula"(尽管 100 会很轻),第一个应该可以工作。

关于css - 将 STIX 字体应用于 MathML CSS,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13626771/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com