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

WebView-based subtitle styling doesn't render EDGE_TYPE_OUTLINE correctly #10137

Open
icbaker opened this issue Mar 31, 2022 · 0 comments
Open
Assignees
Labels

Comments

@icbaker
Copy link
Collaborator

icbaker commented Mar 31, 2022

Copying from #2194 (comment):

If I use the webview by subView.setViewType(SubtitleView.VIEW_TYPE_WEB) , the Arabic comma appears at the correct place. But in this mode, the subtitle's style is unruly. For example, CaptionStyleCompat.EDGE_TYPE_OUTLINE the outline is oddly,

I can reproduce this in 2.17.1 (screenshots below), using the "TTML positioning" sample and the following patch to the demo app in PlayerActivity#onCreate:

    playerView.getSubtitleView().setViewType(SubtitleView.VIEW_TYPE_WEB);
    playerView.getSubtitleView().setStyle(new CaptionStyleCompat(
        /* foregroundColor= */ Color.RED,
        /* backgroundColor= */ Color.GREEN,
        /* windowColor= */ Color.CYAN,
        CaptionStyleCompat.EDGE_TYPE_OUTLINE,
        /* edgeColor= */ Color.BLACK,
        /* typeface= */ null
    ));
Outline screenshots

Canvas

Canvas with outline


WebView

WebView with outline

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

No branches or pull requests

1 participant