我正在尝试给tiddlywiki添加一个新的字体,并尝试了几种方法。他们似乎都不工作,也许你可以帮助一下?
我尝试嵌入html css样式表中提供的google字体链接,但它没有读取字体。然后我遵循了这个方法:https://tiddlywiki.narkive.com/bS0CgWKQ/tw-tw5-how-to-embed-a-font-using-font-face-and-data-url,但我没有像在文章中那样添加FontAwesome,而是使用了我想添加的字体,顺便说一下,这是'Playfair Display',可以在这里找到:https://fonts.google.com/specimen/Playfair+Display?selection.family=Playfair+Display:400,400i,700,700i
h1.tc-site-title {
font-size:22px;
color:#626262;
text-transform:uppercase;
font-family: 'Playfair Display', Georgia, serif;
letter-spacing:1px;
}现在显示的字体是乔治亚。我一开始补充道:
<link href="https://fonts.googleapis.com/css?family=Playfair+Display:400,400i,700,700i&display=swap" rel="stylesheet">到样式表来嵌入它,然后不起作用,切换到narkive上的另一个方法,这是一个巨大的css样式表,以:
@font-face {
font-family: 'playfair_displayregular';
src: url(data:application/font-woff2;charset=utf-8;base64,d09GMgABAAAAAHlMABMAAAABUNgAAHjcAAE...没有显示错误消息,但字体根本不会更改为我想要的字体。我可以将其更改为任何常见字体,只是看起来Tiddlywiki无法正确读取字体。
发布于 2019-08-31 11:29:39
我已经尝试了下面的一些谷歌字体,它对我很有效,你可以自己尝试,只需将其复制/粘贴到新的tiddler中,然后你就可以从那里开始
<link href='https://fonts.googleapis.com/css?family=Playfair Display' rel='stylesheet'>
<link href='https://fonts.googleapis.com/css?family=Sofia' rel='stylesheet'>
<link href='https://fonts.googleapis.com/css?family=Alex Brush' rel='stylesheet'>
<link href='https://fonts.googleapis.com/css?family=Akronim' rel='stylesheet'>
<link href='https://fonts.googleapis.com/css?family=Annie Use Your Telescope' rel='stylesheet'>
<style>
.st2 {font-family: 'Playfair Display';font-size: 42px;}
.st3 {font-family: 'Sofia';font-size: 42px;}
.st4 {font-family: 'Alex Brush';font-size: 42px;}
.st5 {font-family: 'Akronim';font-size: 42px;}
.st6 {font-family: 'Annie Use Your Telescope';font-size: 42px;}
</style>
<h1 class="st2">'Playfair Display' 1234567890 ABC abc</h1>
<h1 class="st3">'Sofia' 1234567890 ABC abc</h1>
<h1 class="st4">'Alex Brush' 1234567890 ABC abc</h1>
<h1 class="st5">'Akronim' 1234567890 ABC abc</h1>
<h1 class="st6">Sofia 1234567890 ABC abc</h1>这是我的Tiddler输出

我希望这能有所帮助。
https://stackoverflow.com/questions/57726122
复制相似问题