AmusementClub / AssFontSubset

使用 fonttools 生成 ASS 字幕文件的字体子集,并自动修改字体名称及 ASS 文件中对应的字体名称
185 stars 4 forks source link

Bold Italic 被 Bold 遮蔽 #10

Closed 0tkl closed 4 months ago

0tkl commented 5 months ago
[Script Info]
Title: 1
ScriptType: v4.00+
WrapStyle: 0
ScaledBorderAndShadow: yes
YCbCr Matrix: TV.709
PlayResX: 1920
PlayResY: 1080

[V4+ Styles]
Format: Name, Fontname, Fontsize, PrimaryColour, SecondaryColour, OutlineColour, BackColour, Bold, Italic, Underline, StrikeOut, ScaleX, ScaleY, Spacing, Angle, BorderStyle, Outline, Shadow, Alignment, MarginL, MarginR, MarginV, Encoding
Style: Default,Times New Roman,65,&H00FFFFFF,&H000000FF,&H00000000,&H00000000,0,0,0,0,100,100,0,0,1,1,0,7,10,10,10,1
Style: Bold,Times New Roman,65,&H00FFFFFF,&H000000FF,&H00000000,&H00000000,-1,0,0,0,100,100,0,0,1,1,0,7,10,10,10,1
Style: Bold Italic,Times New Roman,65,&H00FFFFFF,&H000000FF,&H00000000,&H00000000,-1,-1,0,0,100,100,0,0,1,1,0,7,10,10,10,1

[Events]
Format: Layer, Start, End, Style, Name, MarginL, MarginR, MarginV, Effect, Text
Dialogue: 0,0:00:00.00,0:00:06.99,Bold,,0,0,0,,Lorem ipsum
Dialogue: 0,0:00:00.00,0:00:06.99,Bold Italic,,0,0,0,,Lorem ipsum

fonts 文件夹里放了 times.ttf, timesbd.ttf, timesbi.ttftimesi.ttf(Windows 系统下带的 Times New Roman 字库的 4 个字体文件)

在终端运行 AssFontSubset v2.0.0-beta4 时的输出(路径信息已省略):

> AssFontSubset.Console.exe 1.ass --debug
|INF|开始扫描分析 .\fonts 中的有效字体文件
|INF|支持的字体后缀名为:.ttf, .otf, .ttc, otc
|INF|.\fonts\times.ttf
|INF|.\fonts\timesbd.ttf
|INF|.\fonts\timesbi.ttf
|INF|.\fonts\timesi.ttf
|DBG|初次扫描和解析完成,用时 0 ms
|DBG|开始分析记录可能有多种变体的 fontfamily
|DBG|.\fonts\times.ttf 中的 Times New Roman 检测到其他变体
|DBG|变体分析完成,用时 0 ms
|INF|字体文件扫描完成,用时 0 ms
|INF|开始提取输入 ass 的字体信息
|INF|.\1.ass
|INF|ass 字体信息提取完成,用时 6 ms
|INF|开始生成子集字体信息
|DBG|开始对字体文件信息与 ass 定义的字体进行匹配
|DBG|Times New Roman,1,0 匹配到了 .\fonts\timesbd.ttf 的索引 0
|DBG|Times New Roman,1,1 匹配到了 .\fonts\timesbd.ttf 的索引 0
|DBG|匹配完成

(后略)