Skip to content

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

@xuzhaozheng

Description

@xuzhaozheng

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions