diff options
author | jstebbins <[email protected]> | 2015-04-05 20:20:28 +0000 |
---|---|---|
committer | jstebbins <[email protected]> | 2015-04-05 20:20:28 +0000 |
commit | 75e81dbbaafa76dfde25343f50563aed8c7776e7 (patch) | |
tree | 0a77a01ccc250a10518505ba6df0e122e59e3cee /libhb/common.c | |
parent | 52f3c7354980d3f0467c7d8db7361d6009ab7d06 (diff) |
deccc608sub: fix column alignment issues
Use a fixed width font, and insert hard spaces where necessary to allign
columns correctly in multi-line CCs.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@7061 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'libhb/common.c')
-rw-r--r-- | libhb/common.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/libhb/common.c b/libhb/common.c index 7d97a0da0..053a4c4c2 100644 --- a/libhb/common.c +++ b/libhb/common.c @@ -3764,7 +3764,8 @@ void hb_subtitle_close( hb_subtitle_t **sub ) ********************************************************************** * *********************************************************************/ -int hb_subtitle_add_ssa_header(hb_subtitle_t *subtitle, int w, int h) +int hb_subtitle_add_ssa_header(hb_subtitle_t *subtitle, const char *font, + int w, int h) { // Free any pre-existing extradata free(subtitle->extradata); @@ -3784,9 +3785,9 @@ int hb_subtitle_add_ssa_header(hb_subtitle_t *subtitle, int w, int h) "\r\n" "[V4+ Styles]\r\n" "Format: Name, Fontname, Fontsize, PrimaryColour, SecondaryColour, OutlineColour, BackColour, Bold, Italic, Underline, StrikeOut, ScaleX, ScaleY, Spacing, Angle, BorderStyle, Outline, Shadow, Alignment, MarginL, MarginR, MarginV, Encoding\r\n" - "Style: Default,Arial,%d,&H00FFFFFF,&H00FFFFFF,&H000F0F0F,&H000F0F0F,0,0,0,0,100,100,0,0.00,1,2,3,2,20,20,20,0\r\n"; + "Style: Default,%s,%d,&H00FFFFFF,&H00FFFFFF,&H000F0F0F,&H000F0F0F,0,0,0,0,100,100,0,0.00,1,2,3,2,20,20,20,0\r\n"; - subtitle->extradata = (uint8_t*)hb_strdup_printf(ssa_header, w, h, fs); + subtitle->extradata = (uint8_t*)hb_strdup_printf(ssa_header, w, h, font, fs); if (subtitle->extradata == NULL) { hb_error("hb_subtitle_add_ssa_header: malloc failed"); |