Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sorting problem when dealing with Text blocks mixing plain text and Ruby elements #15

Open
xuzhaozheng opened this issue Nov 4, 2024 · 1 comment

Comments

@xuzhaozheng
Copy link

xuzhaozheng commented Nov 4, 2024

When processing SMPTE 429-7 2014 standard XML subtitles. There is an error in the sorting logic of the output after parsing the Text block, which seems to place the Ruby block before the normal text by default, ignoring the actual order in the SMPTE XML. A similar problem was mentioned in an issue of DCP-o-matic, but this time the problem is not solved by that modification.

  • My SMPTE Subtitle XML
    image

  • Import XML into omatic
    image

  • The DCP Render of CineAsset Player
    image

123 should show before 新干线; Clipster can correctly process this XML and give the correct MXF.

Take ruby1.xml for example:
Original version:
<Text VAlign="center" VPosition="0"><Ruby><Rb>Base</Rb><Rt Size="0.7" Position="after" Offset="0.1" Spacing="0.4" AspectAdjust="0.9">Annotate</Rt></Ruby>Hello world</Text>

Versions that may cause problems:
<Text VAlign="center" VPosition="0">- This should appear before Ruby -<Ruby><Rb>Base</Rb><Rt Size="0.7" Position="after" Offset="0.1" Spacing="0.4" AspectAdjust="0.9">Annotate</Rt></Ruby>Hello world</Text>

It may also be necessary to refine the output rendering of line breaks for Ruby blocks, as described in 429-7 2014.
image

@cth103
Copy link
Owner

cth103 commented Nov 6, 2024

Thanks for the note, I see what you mean, I'll take a look. I'll track this over on our own bugtracker https://dcpomatic.com/bugs/view.php?id=2884

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants