{
switch (v_align) {
case dcp::TOP:
- return (v_position / 100) * target_height - offset;
+ return v_position * target_height - offset;
case dcp::CENTER:
- return (0.5 + v_position / 100) * target_height - offset;
+ return (0.5 + v_position) * target_height - offset;
case dcp::BOTTOM:
- return (1.0 - v_position / 100) * target_height - offset;
+ return (1.0 - v_position) * target_height - offset;
}
return 0;
context->set_line_width (1);
for (list<dcp::SubtitleString>::const_iterator i = subtitles.begin(); i != subtitles.end(); ++i) {
- string f = i->font ();
- if (f.empty ()) {
- f = "Arial";
- }
- Pango::FontDescription font (f);
+ Pango::FontDescription font (i->font().get_value_or ("Arial"));
font.set_absolute_size (i->size_in_pixels (target.height) * PANGO_SCALE);
if (i->italic ()) {
font.set_style (Pango::STYLE_ITALIC);