fix fonts
This commit is contained in:
parent
2af7879ca0
commit
c2ef82be3d
1 changed files with 27 additions and 0 deletions
|
@ -51,6 +51,33 @@ async def msgchain2image(msgchain: Union[List, MessageChain], use_local=True):
|
|||
html_template = """<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<link rel="preconnect" href="https://fonts.googleapis.com">
|
||||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
||||
<link href="https://fonts.googleapis.com/css2?family=Noto+Sans+HK&family=Noto+Sans+JP&family=Noto+Sans+KR&family=Noto+Sans+SC&family=Noto+Sans+TC&display=swap" rel="stylesheet">
|
||||
<style>html body {
|
||||
margin-top: 0px !important;
|
||||
font-family: 'Noto Sans SC', sans-serif;
|
||||
}
|
||||
|
||||
:lang(ko) {
|
||||
font-family: 'Noto Sans KR', 'Noto Sans JP', 'Noto Sans HK', 'Noto Sans TC', 'Noto Sans SC', sans-serif;
|
||||
}
|
||||
|
||||
:lang(ja) {
|
||||
font-family: 'Noto Sans JP', 'Noto Sans HK', 'Noto Sans TC', 'Noto Sans SC', 'Noto Sans KR', sans-serif;
|
||||
}
|
||||
|
||||
:lang(zh-TW) {
|
||||
font-family: 'Noto Sans HK', 'Noto Sans TC', 'Noto Sans JP', 'Noto Sans SC', 'Noto Sans KR', sans-serif;
|
||||
}
|
||||
|
||||
:lang(zh-HK) {
|
||||
font-family: 'Noto Sans HK', 'Noto Sans TC', 'Noto Sans JP', 'Noto Sans SC', 'Noto Sans KR', sans-serif;
|
||||
}
|
||||
|
||||
:lang(zh-Hans), :lang(zh-CN), :lang(zh) {
|
||||
font-family: 'Noto Sans SC', 'Noto Sans HK', 'Noto Sans TC', 'Noto Sans JP', 'Noto Sans KR', sans-serif;
|
||||
}</style>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Document</title>
|
||||
|
|
Reference in a new issue