经过几次讨论(感谢araxhiel),我找到了解决问题的方法。
- 在
_includes/ext-css.html 文件中添加/fonts/ 而不仅仅是字体,即将代码设为
<head>
<meta charset="UTF-8" />
<title>Test</title>
<!-- Computer Modern Serif-->
<link rel="stylesheet" href="/fonts/Serif/cmun-serif.css"></link>
...
</head>
-
assets/css/beautifuljekyll.css 文件的第 13 行将其更改为
body {
font-family: 'Computer Modern Serif','Droid Sans', Helvetica, Arial, sans-serif;
另外,在同一个文件中,在第 13 行之前(正文开始之前)添加以下代码
//*********************** Fonts ********************//
@font-face {
font-family: 'Computer Modern Serif';
src: url('../../fonts/Serif/cmunrm.eot');
src: url('../../fonts/Serif/cmunrm.eot?#iefix') format('embedded-opentype'),
url('../../fonts/Serif/cmunrm.woff') format('woff'),
url('../../fonts/Serif/cmunrm.ttf') format('truetype'),
url('../../fonts/Serif/cmunrm.svg#cmunrm') format('svg');
font-weight: normal;
font-style: normal;
}
@font-face {
font-family: 'Computer Modern Serif';
src: url('../../fonts/Serif/cmunbx.eot');
src: url('../../fonts/Serif/cmunbx.eot?#iefix') format('embedded-opentype'),
url('../../fonts/Serif/cmunbx.woff') format('woff'),
url('../../fonts/Serif/cmunbx.ttf') format('truetype'),
url('../../fonts/Serif/cmunbx.svg#cmunbx') format('svg');
font-weight: bold;
font-style: normal;
}
@font-face {
font-family: 'Computer Modern Serif';
src: url('../../fonts/Serif/cmunti.eot');
src: url('../../fonts/Serif/cmunti.eot?#iefix') format('embedded-opentype'),
url('../../fonts/Serif/cmunti.woff') format('woff'),
url('../../fonts/Serif/cmunti.ttf') format('truetype'),
url('../../fonts/Serif/cmunti.svg#cmunti') format('svg');
font-weight: normal;
font-style: italic;
}
@font-face {
font-family: 'Computer Modern Serif';
src: url('../../fonts/Serif/cmunbi.eot');
src: url('../../fonts/Serif/cmunbi.eot?#iefix') format('embedded-opentype'),
url('../../fonts/Serif/cmunbi.woff') format('woff'),
url('../../fonts/Serif/cmunbi.ttf') format('truetype'),
url('../../fonts/Serif/cmunbi.svg#cmunbi') format('svg');
font-weight: bold;
font-style: italic;
}
- 除了以上两个代码添加之外,如果您按照问题中的步骤进行操作,只需将
fonts/Serif 文件夹从 link 添加到主存储库中,您就可以开始了!!