static list<pair<FontFiles, string> > fc_config_fonts;
string
-marked_up (list<TextCaption> subtitles, int target_height, float fade_factor)
+marked_up (list<StringText> subtitles, int target_height, float fade_factor)
{
string out;
- BOOST_FOREACH (TextCaption const & i, subtitles) {
+ BOOST_FOREACH (StringText const & i, subtitles) {
out += "<span ";
if (i.italic()) {
out += "style=\"italic\" ";
* at the same time and with the same fade in/out.
*/
static PositionImage
-render_line (list<TextCaption> subtitles, list<shared_ptr<Font> > fonts, dcp::Size target, DCPTime time, int frame_rate)
+render_line (list<StringText> subtitles, list<shared_ptr<Font> > fonts, dcp::Size target, DCPTime time, int frame_rate)
{
/* XXX: this method can only handle italic / bold changes mid-line,
nothing else yet.
layout->set_alignment (Pango::ALIGN_LEFT);
context->set_line_width (1);
- context->set_antialias (Cairo::ANTIALIAS_GRAY);
Cairo::FontOptions fo;
context->get_font_options (fo);
- fo.set_antialias (Cairo::ANTIALIAS_GRAY);
+ fo.set_antialias (Cairo::ANTIALIAS_NONE);
context->set_font_options (fo);
/* Compute fade factor */
* @param frame_rate DCP frame rate.
*/
list<PositionImage>
-render_text (list<TextCaption> subtitles, list<shared_ptr<Font> > fonts, dcp::Size target, DCPTime time, int frame_rate)
+render_text (list<StringText> subtitles, list<shared_ptr<Font> > fonts, dcp::Size target, DCPTime time, int frame_rate)
{
- list<TextCaption> pending;
+ list<StringText> pending;
list<PositionImage> images;
- BOOST_FOREACH (TextCaption const & i, subtitles) {
+ BOOST_FOREACH (StringText const & i, subtitles) {
if (!pending.empty() && fabs (i.v_position() - pending.back().v_position()) > 1e-4) {
images.push_back (render_line (pending, fonts, target, time, frame_rate));
pending.clear ();