From 75e81dbbaafa76dfde25343f50563aed8c7776e7 Mon Sep 17 00:00:00 2001 From: jstebbins Date: Sun, 5 Apr 2015 20:20:28 +0000 Subject: 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 --- libhb/common.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'libhb/common.c') 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"); -- cgit v1.2.3