google / google/ExoPlayer

Allow Cue to specify monospace font, size of character grid etc

Open
#4,173 2 comments 0 reactions 1 assignee Assigned to @icbaker View on GitHub
enhancement
Dominant language
Java
Stars
21.9k
Forks
6k
PR merge metrics
No merged PRs in 30d

Description

I'm implementing a teletext decoder in ExoPlayer and I'm looking for advises about font/line sizing. Teletext uses a matrix of characters, 24 lines, 40 columns. But it doesn't seem that this size information can be conveyed through Cue objects for correct rendering. SubtitleView uses a default font size of 5.33% of the viewport height, but the actual line height (including font ascent and descent) is larger than that, and only 13 lines of text can actually fit on screen (I'm using monospace font; the screen height is 768px, the computed font size is ~40px and the actual line height is 56px). The decoder does not seem to have any way to let the SubtitleView know about the size of the expected character grid. What would be the recommended approach to address this problem?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.