This commit is contained in:
xhlove
2020-02-07 19:27:13 +08:00
parent e5de08605c
commit 71c0212fe5
2 changed files with 15 additions and 1 deletions

View File

@@ -35,6 +35,19 @@
> -y或--y 覆盖原有弹幕而不提示 默认不使用 > -y或--y 覆盖原有弹幕而不提示 默认不使用
- 字体配置文件(可选)
新建名为`config.json`的文件,内容形式如下:
```json
{
"fonts_base_folder": "C:/Windows/Fonts",
"fonts": {
"微软雅黑":"msyh.ttc",
"微软雅黑粗体":"msyhbd.ttc",
"微软雅黑细体":"msyhl.ttc"
}
}
```
# 效果示意(字幕与视频不相关) # 效果示意(字幕与视频不相关)
![potplayer截屏](http://puui.qpic.cn/vshpic/0/5TLOX3WbgjudEj61IxYZ4tAuf2lFwl-ynf4S5T4sXkdjS9cd_0/0) ![potplayer截屏](http://puui.qpic.cn/vshpic/0/5TLOX3WbgjudEj61IxYZ4tAuf2lFwl-ynf4S5T4sXkdjS9cd_0/0)
[查看使用演示视频点我][2] [查看使用演示视频点我][2]

View File

@@ -3,7 +3,7 @@
''' '''
# 作者: weimo # 作者: weimo
# 创建日期: 2020-01-04 19:14:46 # 创建日期: 2020-01-04 19:14:46
# 上次编辑时间 : 2020-02-07 18:33:14 # 上次编辑时间 : 2020-02-07 19:21:19
# 一个人的命运啊,当然要靠自我奋斗,但是... # 一个人的命运啊,当然要靠自我奋斗,但是...
''' '''
@@ -30,6 +30,7 @@ ass_events_head = """[Events]\nFormat: Layer, Start, End, Style, Name, MarginL,
# ass_baseline = """Dialogue: 0,0:20:08.00,0:20:28.00,Default,,0,0,0,,{\t(1000,3000,\move(1300,600,360,600))\pos(676.571,506.629)}这是字幕内容示意""" # ass_baseline = """Dialogue: 0,0:20:08.00,0:20:28.00,Default,,0,0,0,,{\t(1000,3000,\move(1300,600,360,600))\pos(676.571,506.629)}这是字幕内容示意"""
def get_fonts_info(): def get_fonts_info():
global fonts
fonts_path = r"C:\Windows\Fonts" fonts_path = r"C:\Windows\Fonts"
if os.path.exists("config.json"): if os.path.exists("config.json"):
with open("config.json", "r", encoding="utf-8") as f: with open("config.json", "r", encoding="utf-8") as f: