summaryrefslogtreecommitdiffstats
path: root/libhb/deccc608sub.c
diff options
context:
space:
mode:
authorjstebbins <[email protected]>2015-04-10 16:12:40 +0000
committerjstebbins <[email protected]>2015-04-10 16:12:40 +0000
commit6ec1cc1e62c7df3d5cecac65d6f7446a438eefd6 (patch)
tree25fbce5c03919b946819f3b03c405b4fd5dc90bf /libhb/deccc608sub.c
parent864ce5a4227d81f688f32e808245b2600f431ac3 (diff)
decccsub608: make font size independent on the amount of cropping
And use alignment tag \an1 instead of \a1 git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@7077 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'libhb/deccc608sub.c')
-rw-r--r--libhb/deccc608sub.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/libhb/deccc608sub.c b/libhb/deccc608sub.c
index 77c677359..dacb064ee 100644
--- a/libhb/deccc608sub.c
+++ b/libhb/deccc608sub.c
@@ -880,7 +880,7 @@ static int write_cc_buffer_as_ssa(struct eia608_screen *data,
// then width of screen is 42 columns (see CEA-708)
screen_columns = 42;
}
- font_size = cropped_height * .066;
+ font_size = wb->height * .8 * .066;
safe_x = 0.1 * wb->width;
safe_y = 0.1 * wb->height;
@@ -910,7 +910,7 @@ static int write_cc_buffer_as_ssa(struct eia608_screen *data,
x = cropped_width - columns * cell_width - min_safe_x;
if (x < min_safe_x)
x = min_safe_x;
- pos = hb_strdup_printf("{\\a1\\pos(%d,%d)}", x, y);
+ pos = hb_strdup_printf("{\\an1\\pos(%d,%d)}", x, y);
int line = 1;
for (i = 0; i < 15; i++)
@@ -1808,9 +1808,9 @@ static int decccInit( hb_work_object_t * w, hb_job_t * job )
// Generate generic SSA Script Info.
int height = job->title->geometry.height - job->crop[0] - job->crop[1];
int width = job->title->geometry.width - job->crop[2] - job->crop[3];
- int safe_height = 0.8 * height;
+ int safe_height = 0.8 * job->title->geometry.height;
hb_subtitle_add_ssa_header(w->subtitle, "Courier New",
- .08 * safe_height, width, height);
+ .066 * safe_height, width, height);
}
// When rendering subs, we need to push rollup subtitles out
// asap (instead of waiting for a completed line) so that we