summaryrefslogtreecommitdiff
path: root/src/lib/text_decoder.cc
AgeCommit message (Collapse)Author
2025-07-10Remove compose.hpp includes.Carl Hetherington
sed -i "/include.*compose.hpp/d;" src/lib/*.cc src/wx/*.cc src/wx/*.h src/tools/*.cc src/lib/*.h test/*.cc
2025-07-10Replace String::compose with fmt.Carl Hetherington
sed -i "/Plural-Forms/n;/%100/n;/scanf/n;s/%[123456789]/{}/g" src/lib/*.cc src/lib/*.h src/wx/*.cc src/tools/*.cc src/lib/po/*.po src/wx/po/*.po src/tools/po/*.po test/*.cc sed -i "s/String::compose */fmt::format/g" src/lib/*.cc src/lib/*.h src/wx/*.cc src/tools/*.cc test/*.cc
2025-03-24Basic support for variable-Z 3D subtitles.Carl Hetherington
2025-03-21White space: text_decoder.{cc,h}Carl Hetherington
2024-12-26Cleanup: fix comment.Carl Hetherington
2024-12-09Fix comment typo.Carl Hetherington
2024-09-03Adapt to some libdcp class renaming to allow open captions/closed subtitles.Carl Hetherington
2024-06-11Fall back to default font file if a font ID is not found in the content.Carl Hetherington
This should not happen, but seems rather likely given the mess that is building (especially with users switching between versions).
2023-11-17Pass through <Ruby> tags in subtitles (#2635) (GH#23).Carl Hetherington
2023-10-14Cleanup: assert result of get_font().Carl Hetherington
2023-02-27Strip disallowed characters from subtitles before they get into the XML.Carl Hetherington
2023-02-27Align text subtitles from the bottom of the screen.Carl Hetherington
2023-02-27Support the 2014 version of SMPTE 428-7 in render_text.cc and use itCarl Hetherington
when placing subtitles (e.g. SRT). Also default to outputting 2014-era alignment.
2022-12-03Bump libsub for libdcp dependency removal.Carl Hetherington
2022-12-01Escape entities just before Pango rendering (#2382).v2.16.35Carl Hetherington
Previously, text coming out of the player would have things like & escaped to &amp;. This escaping is also done by libxml++ when writing XML, so doing it in the player would mean it was done twice. We do, however, need to escape things before passing them to Pango as otherwise it gives errors and renders nothing for the line. Here we move the escaping to just before the rendering, meaning that in the reset of DoM we should pass unescaped strings around.
2022-11-03Bump libdcp for subtitle Z-position fixes (#2356).Carl Hetherington
2022-09-20Fix font_id_map errors when importing DCP subtitles that have noCarl Hetherington
font declarations / tags (#2339).
2022-09-19Fix default placement of SRT (etc.) now that the alignment has changedCarl Hetherington
2022-07-20Handle vertical alignment of subs correctly wrt the difference between ↵Carl Hetherington
Interop and SMPTE.
2022-06-12Set up TextDecoder position based on the time that the next thing willv2.16.14Carl Hetherington
be emitted, instead of the time that the last thing was (#2268). This is to avoid problems with the example shown in the test, where just because a subtitle in source A comes before a subtitle in source B, source A is pass()ed next and may then emit a subtitle which should be after the next one in B.
2022-06-07Rearrange subtitle font management.Carl Hetherington
With this change each subtitle coming out of the player has a reference to a dcpomatic::Font that belongs to the TextContent. This hopefully solves a few problems which all basically stemmed from the fact that previously the decoders/player were deciding what the font ID in the output DCP would be - they can't do that properly.
2022-06-07In-line a call to emit_plain_start() so it's less confusing.Carl Hetherington
2022-06-07Rename some variables.Carl Hetherington
2022-06-07Extract method to set forced appearance.Carl Hetherington
2022-06-07Extract method to escape text.Carl Hetherington
2022-06-07Add a comment.Carl Hetherington
2022-06-07Lengthen some very short variable names.Carl Hetherington
2022-06-07Switch some list -> vector for consistency.Carl Hetherington
2022-04-28Make emit_bitmap_start take a ContentBitmapText.Carl Hetherington
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-09Cleanup some unused using statements and other bits.Carl Hetherington
2021-09-27Some const correctness.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-05-01C++11 tidying.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
2020-07-20Fix vertical alignment with subrip and embedded SSA \an codes.v2.15.90Carl Hetherington
2020-02-16Just having no specified lines value does not mean we definitely need place ↵Carl Hetherington
the subtitle ourselves.
2020-02-14Nudge L/R-aligned subs in from the edge of the screen; do our own placement ↵Carl Hetherington
of subs with no screen height in lines specified.
2020-01-24Support binary STL subtitle files.Carl Hetherington
2019-05-10Put Time types in dcpomatic namespace.Carl Hetherington
2018-11-21Take Film pointer out of Content.Carl Hetherington
2018-09-02Play PNG subtitles from DCPs; possibly not in the right scale.Carl Hetherington
2018-08-23Remove TextType from various places as (I believe) it can be inferred from ↵Carl Hetherington
the content.
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-19Clean up after previous commit.Carl Hetherington
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-19Text to player with types.Carl Hetherington
2018-07-19Remove old content_subtitle.Carl Hetherington