summaryrefslogtreecommitdiff
path: root/src/lib/render_text.cc
AgeCommit message (Collapse)Author
2022-04-22Use libdcp's warnings.hCarl Hetherington
2021-10-25Fix fade factor calculation when there is no end time.Carl Hetherington
In this case we can't do any fade out.
2021-10-17Basic and slightly inaccurate support for <Space> in subtitles (#2103).v2.15.170Carl Hetherington
Adding horizontal space to a Pango layout is hard, and I think this change probably gets it slightly wrong, but it's a step in the right direction.
2021-10-17Move some functions up the file so we can use them.Carl Hetherington
2021-09-27Check that the image used to make a Cairo::ImageSurface is the right ↵Carl Hetherington
alignment and pixel format.
2021-09-27Remove unused usingCarl Hetherington
2021-09-27Replace aligned bool with enum Alignment.Carl Hetherington
2021-08-01Do all text -> HTML conversion for subtitles in the same place.Carl Hetherington
Previously we would convert > to &gt; then the ampersand to &amp; resulting in &amp;gt;
2021-04-08Remove some old Centos 5 support.Carl Hetherington
2021-04-08Assorted C++11/formatting cleanups.Carl Hetherington
2021-01-21Adapt for libdcp use of enum class.Carl Hetherington
2021-01-07BOOST_FOREACH.Carl Hetherington
2021-01-07std::shared_ptrCarl Hetherington
2021-01-04Check that pango/cairo stuff is created successfully.Carl Hetherington
2020-11-16Fix thinko-ed logic causing all subtitles to be treated as thoughCarl Hetherington
they have borders. This fix will cause some movement of border-less subtitles (in existing projects) within the video frame.
2020-10-12Make use of default_font_file().Carl Hetherington
2020-09-27Go back to add_to_cairo_context rather than show_in_cairo_context.Carl Hetherington
On Linux, at least, doing add_to_cairo_context() fill() add_to_cairo_context() stroke() gives a nicer output than show_in_cairo_context() It's not clear exactly what the difference is, but the anti aliasing looks better and the font outlines basically look smoother. May help with #1815.
2020-09-14Rename shared_path -> resources_path.Carl Hetherington
2020-08-03Fix slightly chopped-off subtitles when there are borders.Carl Hetherington
2020-07-26Various OSX warnings fixes.Carl Hetherington
2020-04-24Substantial reworking of the font rendering code to measureCarl Hetherington
the size of the text before rendering, thereby creating correctly- sized output images (rather than ones with guesses on height and with the full target width). This uses some potentially dubious behaviour described here https://stackoverflow.com/questions/31788577/create-pango-layout-before-cairo-surface and could cause any number of problems. The advantages are that a) it should be a little more efficient and b) the images created for the subtitle analysis code are useful.
2020-04-24More extractions.Carl Hetherington
2020-04-24Use a variable for subtitles.front()Carl Hetherington
2020-04-24Extract some bits of code into their own methods.Carl Hetherington
2019-05-10Put Time types in dcpomatic namespace.Carl Hetherington
2019-02-03Fix incorrect subtitle positioning when there are simultaneousCarl Hetherington
subtitles at the same vposition from different reference points (#1458).
2019-01-27Remove specification of italic/bold fonts (#1451); synthesis will be used ↵v2.13.110Carl Hetherington
instead.
2019-01-26Modify FontConfig call to allow italic/bold synthesis.Carl Hetherington
2019-01-26Revert accidentally-committed stuff in pot/merge.Carl Hetherington
2019-01-26pot/merge.Carl Hetherington
2019-01-23Try to improve font rendering on Windows by using freetype for pango/cairo.v2.13.105Carl Hetherington
2018-09-04Try no anti-aliasing when rendering subtitles.Carl Hetherington
2018-09-04Docs say that Context::set_antialias does not affect text.Carl Hetherington
2018-07-23More automated renaming.Carl Hetherington
ActiveCaptions -> ActiveText BitmapCaption -> BitmapText ContentCaption -> ContentText ContentTextCaption -> ContentStringText TextCaptionFileContent -> StringTextFileContent TextCaptionFileDecoder -> StringTextFileDecoder TextCaptionFile -> StringTextFile TextCaption -> StringText PlayerCaption -> PlayerText CaptionContent -> TextContent CaptionDecoder -> TextDecoder CaptionPanel -> TextPanel CaptionView -> TextView CaptionAppearanceDialog -> SubtitleAppearanceDialog CaptionType -> TextType
2018-07-19Reword again: Text -> Caption and Plain -> Text.Carl Hetherington
sed -i "s/ActiveText/ActiveCaptions/g" src/lib/*.{cc,h} sed -i "s/active_text.h/active_captions.h/g" src/lib/*.{cc,h} sed -i "s/active_text.cc/active_captions.cc/g" src/lib/wscript mv src/lib/active_text.cc src/lib/active_captions.cc mv src/lib/active_text.h src/lib/active_captions.h sed -i "s/PlainTextFileContent/TextCaptionFileContent/g" src/lib/*.{cc,h} src/wx/*.cc sed -i "s/PlainTextFile/TextCaptionFile/g" src/lib/*.{cc,h} src/wx/*.cc sed -i "s/plain_text_file_content/text_caption_file_content/g" src/lib/*.{cc,h} src/lib/wscript src/wx/*.{cc,h} test/*.cc mv src/lib/plain_text_file_content.cc src/lib/text_caption_file_content.cc mv src/lib/plain_text_file_content.h src/lib/text_caption_file_content.h sed -i "s/PlainTextFileDecoder/TextCaptionFileDecoder/g" src/lib/*.{cc,h} sed -i "s/plain_text_file_decoder/text_caption_file_decoder/g" src/lib/*.{cc,h} src/lib/wscript src/wx/*.{cc,h} mv src/lib/plain_text_file_decoder.cc src/lib/text_caption_file_decoder.cc mv src/lib/plain_text_file_decoder.h src/lib/text_caption_file_decoder.h sed -i "s/PlayerText/PlayerCaption/g" src/lib/*.{cc,h} sed -i "s/player_text.cc/player_caption.cc/g" src/lib/wscript sed -i "s/player_text.h/player_caption.h/g" src/lib/*.{cc,h} mv src/lib/player_text.cc src/lib/player_caption.cc mv src/lib/player_text.h src/lib/player_caption.h sed -i "s/ContentPlainText/ContentTextCaption/g" src/lib/*.{cc,h} src/wx/*.{cc,h} sed -i "s/ContentBitmapText/ContentBitmapCaption/g" src/lib/*.{cc,h} src/wx/*.{cc,h} sed -i "s/PlainText/TextCaption/g" src/lib/*.{cc,h} test/*.cc sed -i "s/plain_text.h/text_caption.h/g" src/lib/*.{cc,h} mv src/lib/plain_text.h src/lib/text_caption.h
2018-07-19Finish PlayerSubtitles -> PlayerText and SubtitleString -> PlainText.Carl Hetherington
2018-07-19More renaming.Carl Hetherington
sed -i "s/emit_text/emit_plain/g" src/lib/*.cc src/lib/*.h sed -i "s/emit_image_start/emit_bitmap_start/g" src/lib/*.cc src/lib/*.h sed -i "s/emit_text_start/emit_plain_start/g" src/lib/*.cc src/lib/*.h sed -i "s/render_subtitles/render_text/g" src/lib/*.cc src/lib/*.h src/lib/wscript test/*.cc sed -i "s/ImageStart/BitmapStart/g" src/lib/*.cc src/lib/*.h sed -i "s/TextStart/PlainStart/g" src/lib/*.cc src/lib/*.h test/*.cc src/wx/*.cc sed -i "s/ImageSubtitle/BitmapText/g" src/lib/*.cc src/lib/*.h sed -i "s/text_subtitle/plain_text/g" src/lib/*.cc src/lib/*.h src/lib/wscript src/wx/*.cc src/wx/*.h test/*.cc sed -i "s/image_subtitle/bitmap_text/g" src/lib/*.cc src/lib/*.h mv src/lib/render_subtitles.cc src/lib/render_text.cc mv src/lib/render_subtitles.h src/lib/render_text.h mv src/lib/text_subtitle.cc src/lib/plain_text.cc mv src/lib/text_subtitle.h src/lib/plain_text.h