Bug KODI 19.1 play ASS subtitle with fonts problem
#1
Hi,

Since SRT subtitle cannot adjust subtitle's outline, I give up to find solution and turn to SSA subtitle to cover this question...(hung work)
but I found some weird problem as below:
======================================================
Because my interface language is Chinese Traditional(cht, Taiwan), I would like to use font as 華康仿宋體.ttf
 
Condition 1:   
FONT TO USE FOR TEXT SUBTITLES : 華康仿宋體-W2.ttf
OVERRIDE ASS/SSA SUBTITLE FONTS : OFF
kodi\media\font\華康仿宋體-W2.ttf
ASS font is define as 華康仿宋體-W2

Play SRT: (Chinese) Subtitle can be shown and font is correct as 華康仿宋體-W2.ttf.
Play AAS: (Chinese) Subtitle can be shown, but font is wrong as arial.ttf.

Condition 2:   
FONT TO USE FOR TEXT SUBTITLES : 華康仿宋體-W2.ttf
OVERRIDE ASS/SSA SUBTITLE FONTS : ON
kodi\media\font\華康仿宋體-W2.ttf
ASS font is define as 華康仿宋體-W2

Play SRT: (Chinese) Subtitle can be shown and font is correct as 華康仿宋體-W2.ttf.
Play AAS: (Chinese) Subtitle can not shown.

Condition 3:   
->I rename 華康仿宋體-W2.ttf as WaKa.ttf (just revise chinese file name to english file name)
FONT TO USE FOR TEXT SUBTITLES : WaKa.ttf
OVERRIDE ASS/SSA SUBTITLE FONTS : ON
kodi\media\font\WaKa.ttf
ASS font is define as WaKa.ttf

Play SRT: (Chinese) Subtitle can be shown and font is correct as WaKa.ttf.
Play AAS: (Chinese) Subtitle can be shown and font is correct as WaKa.ttf.

Condition 4:   
->I rename 華康仿宋體-W2.ttf as WaKa.ttf (just revise chinese file name to english file name)
FONT TO USE FOR TEXT SUBTITLES : WaKa.ttf
OVERRIDE ASS/SSA SUBTITLE FONTS : OFF
kodi\media\font\WaKa.ttf
ASS font is define as WaKa.ttf

Play SRT: (Chinese) Subtitle can be shown and font is correct as WaKa.ttf.
Play AAS: (Chinese) Subtitle can be shown, but font is wrong as arial.ttf.

=================================================
Can anyone tell me which setting is wrong or it is something bug to fail shown SSA subtitle with correct fonts?
Reply
#2
I'm not sure how much info we capture, but a debug level log uploaded might give some clues.  I suspect it is a Kodi bug, though.

scott s.
.
Reply
#3
Update:  I've done some testing, and it seems like PR#19535 was supposed to fix this in Kodi 20, but so far in testing I can't get it to work the way I think it should.

scott s.
.
Reply
#4
Update:  OP, I tried to duplicate your issue on Kodi 20 nightly, and got a Kodi crash.  I created a new issue for that here:  20108 (GH issue) but I still would like to see a debug log, and maybe upload the .ass file so I can take a look at it. (you can truncate the subtitle after a few of the text lines).

scott s.
.
Reply
#5
@scott967 

Hi Scott

I post my log as below
Conditon1 log, https://paste.kodi.tv/gigawuxina.kodi
Condition2 log, https://paste.kodi.tv/hajecusuvu.kodi

and subtitle for here
https://mega.nz/folder/dnggBTzZ#6BId6q5ebNyR-zhgd7G6Sw

thanks for your quick reply and your great help ^^
Reply
#6
Thanks for the logs and font file.  I think there are some problems with local font files causing Kodi crashes, but after testing various configurations, I think I found your problem.

Namely, for Kodi to find your local font for use in ASS / substation alpha, the filename of the font must be the same as the font family name within the font (and this is also what must be in the ass file style definition).

In this case, the font file you are using, 華康仿宋體-W2.ttf, provides a font with font family name DFFangSongW2-B5.  You can see this if you install the in windows 10 (DO NOT DO THIS!  THIS SEEMS TO CAUSE A BIG PROBLEM WHEN KODI TRIES TO USE THE ASS FILE).

So how I got it to work was to edit the ass file
 
Code:
Style: Default,DFFangSongW2-B5,18,&H00FFFFFF,&H0300FFFF,&H00000000,&H02000000,0,0,0,0,100,100,0,0,1,1,0,2,10,10,10,1

and then rename the font file to DFFangSongW2-B5.ttf within your userdata media\Fonts\ folder.

Note that I haven't tested, but it could also work to edit the font in a font editor to change the font family name, but from what I've seen, ascii is preferred for the family name so I didn't try this.

scott s.
.
Reply

Logout Mark Read Team Forum Stats Members Help
KODI 19.1 play ASS subtitle with fonts problem0