View Bug Details

IDProjectCategoryView StatusLast Update
0002556DCP-o-maticBugspublic2023-12-31 19:37
Reporteroverlookmotel Assigned Tocarl  
PrioritynormalSeveritymajorReproducibilityhave not tried
Status confirmedResolutionopen 
PlatformMacOSOS XOS Version10.14
Product Version2.16.57 
Target Version2.16.x 
Summary0002556: Subtitles rendering off-centre horizontally from XML source
Description

DCP-o-matic 2.16.59. While trying to burn in soft subtitles from a DCP, they are being rendered off-centre horizontally.

This is the case both in the preview in DOM GUI, and the output DCP.

The same operation in DOM 2.14.54 renders the subs centred. Also the original DCP viewed in Easy DCP Player also shows the subtitles centred.

Images below showing all 3.

Side issue: DOM also doesn't seem to use the font specified in the DCP for italicised text (Arial bold), though it does for non-italics. This can be seen by comparing to EasyDCP Player's rendering.

Steps To Reproduce

Can be reproduced with just the captions XML file, extracted from the original DCP. I'll email that XML to you Carl.

TagsNo tags attached.
Branch2556-subtitles-with-spaces
Estimated weeks required
Estimated work requiredUndecided

Relationships

related to 0002341 resolvedcarl DOM misinterprets newlines in subtitle elements. 
related to 0002557 feedbackcarl Specified font not used for italicised text 

Activities

overlookmotel

2023-06-09 01:50

developer  

carl

2023-06-09 14:17

administrator   ~0005742

I think this because DoM is rendering all the space inside the <Text> tag literally - perhaps it should collapse it, but I can't find a reference for that...

carl

2023-06-09 14:19

administrator   ~0005743

I found this in the 2014 subtitle standard:

"All space characters present inside the content of a Text element shall be rendered, even when located
in a Font, HGroup or Rotate child element – meaning that consecutive space characters shall not be
collapsed. Space character(s) located outside of a Text element shall not be rendered. Also, as specified
in Section 5.11, control codes (e.g., carriage return, line feed, tab, etc...) shall not be rendered."

carl

2023-06-09 14:23

administrator   ~0005744

I moved the "side issue" into 0002557 as it's easy to miss stuff like that.

overlookmotel

2023-06-09 15:25

developer   ~0005746

Confirmed, that does seem to be what it is.

The subtitles XML in my example puts Font elements for italics on a separate line within the Text element, with space for indentation.

The subtitle before the one pictured is not italicised and so does not have any excess space within the Text element, and it does render centred.

But...

There's also excess space after the closing tag of the Font element, before the closing Text tag. That's 4 spaces less than the space at the start of the Text element, due to the indentation pattern. But it looks like the subs are off-centre by more than 4 spaces.

So I am wondering if DCP-o-matic is correctly taking into account excess space at the start of Text elements, but ignoring at the end.

This DCP was made with easyDCP Creator+ 3.7.6. So, even if the real fault is with the DCP, probably there's lots more like this out there.

Sorry, I would include XML extracts which would make this easier to describe, but I know that Mantis renders them incorrectly.

carl

2023-06-10 23:09

administrator   ~0005753

It's a good point. It looks like something weird is going on with subtitle spacing when there is a combination of newlines and spaces within the text.

overlookmotel

2023-09-04 11:10

developer   ~0005922

My suspicion is that it's ignoring spaces which are "outside" of a line break.

i.e. \n subtitle text \n is treated as [ignore]\n[include]subtitle text[include]\n[ignore]

In the case above, the problem is that the excess space is after the line breaks on both sides, so only the spacing before the subtitle text is included and it shifts the subtitle right.

It may be that DOM's interpretation of spacing is perfectly correct and the fault is with the original DCP, in which case this should likely be closed without any action. However, if the space "outside" the line breaks should be included according to the spec, that'd make the subs render (almost) centred in this case.

overlookmotel

2023-09-04 11:12

developer   ~0005923

Mantis removed some of the spaces from my example above. Let me try again:

    \n    subtitle text    \n    
[ignore]\n[include]subtitle text[include]\n[ignore]

carl

2023-09-05 22:51

administrator   ~0005933

I think you're right, there's more to do here...

Bug History

Date Modified Username Field Change
2023-06-09 01:50 overlookmotel New Bug
2023-06-09 01:50 overlookmotel File Added: off-centre sub DOM 2.16.59.png
2023-06-09 01:50 overlookmotel File Added: off-centre sub DOM 2.14.54.png
2023-06-09 01:50 overlookmotel File Added: off-centre sub Easy DCP Player.png
2023-06-09 09:16 carl Severity minor => major
2023-06-09 09:16 carl Estimated work required => Undecided
2023-06-09 09:17 carl Target Version => 2.16.60
2023-06-09 14:17 carl Note Added: 0005742
2023-06-09 14:17 carl Assigned To => carl
2023-06-09 14:17 carl Status new => confirmed
2023-06-09 14:19 carl Note Added: 0005743
2023-06-09 14:20 carl Status confirmed => acknowledged
2023-06-09 14:22 carl Relationship added related to 0002557
2023-06-09 14:23 carl Note Added: 0005744
2023-06-09 15:25 overlookmotel Note Added: 0005746
2023-06-10 23:09 carl Note Added: 0005753
2023-06-10 23:10 carl Status acknowledged => confirmed
2023-06-16 23:04 carl Branch => 2556-subtitles-with-spaces
2023-06-21 20:48 carl Target Version 2.16.60 => 2.16.x
2023-09-01 15:59 carl Target Version 2.16.x => 2.16.64
2023-09-01 19:48 carl Relationship added related to 0002341
2023-09-04 11:10 overlookmotel Note Added: 0005922
2023-09-04 11:12 overlookmotel Note Added: 0005923
2023-09-05 22:51 carl Note Added: 0005933
2023-09-13 22:34 carl Target Version 2.16.64 => 2.16.65
2023-09-21 00:08 carl Target Version 2.16.65 => 2.16.66
2023-10-15 08:25 carl Target Version 2.16.66 => 2.16.67
2023-11-19 21:38 carl Target Version 2.16.67 => 2.16.68
2023-11-24 12:24 carl Target Version 2.16.68 => 2.16.69
2023-11-27 21:30 carl Target Version 2.16.69 => 2.16.70
2023-12-02 19:58 carl Target Version 2.16.70 => 2.16.71
2023-12-31 19:37 carl Target Version 2.16.71 => 2.16.x