Skip to content

textShadow Rendering Issue #133

Open

Description

@dkneeland

When tts:textShadow has a negative X axis direction, the shadow will cover the preceding text.

image

IMSCJS_Issue_textShadow.xml.txt

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<tt xml:lang="en" xmlns="http://www.w3.org/ns/ttml" xmlns:ttp="http://www.w3.org/ns/ttml#parameter" xmlns:tts="http://www.w3.org/ns/ttml#styling" ttp:profile="http://www.w3.org/ns/ttml/profile/imsc1/text">
  <head>
    <styling>
      <style xml:id="proportional" tts:color="white" tts:backgroundColor="transparent" tts:fontFamily="proportionalSansSerif" tts:fontSize="80%" tts:fontWeight="normal" tts:fontStyle="normal"/>
    </styling>
    <layout>
      <region xml:id="trans_80"  tts:backgroundColor="transparent" tts:showBackground="whenActive" tts:origin="10% 10%"   tts:extent="80% 80%"  tts:textAlign="center" tts:displayAlign="after"/>
    </layout>
  </head>
  <body>
    <div>
      <p begin="15s" dur="1s" style="proportional" region="trans_80"><span tts:textShadow="-20% 10% 5% black">Shadow Example</span></p>
    </div>
  </body>
</tt>

Activity

  1. palemieux commented on Nov 6, 2018

    @palemieux
    Contributor

    This happens when text-shadow is applied across individual span elements: each of the span elements is rendered individually, resulting in span elements rendered later overlapping those rendered earlier. See example below:

    https://codepen.io/palemieux/pen/aQvdQr

    Until CSS supports becomes reality, imscJS unfortunately needs to wrap individual characters in span elements, e.g. to render itts:fillLineGap.

    In typical use cases, isn't shadow offset small enough to avoid overlap?

  2. dkneeland commented on Nov 6, 2018

    @dkneeland
    Author

    Normally the subtitle shadow will be slightly to the right/bottom of the text. I agree that in normal practice, this bug is not an issue.

  3. palemieux commented on Nov 6, 2018

    @palemieux
    Contributor

    @dkneeland Ok. That is good news. I suggest keeping the issue open in the backlog, revisiting it regularly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions