Skip to content

Video player: fix time display jitter with tabular numerals#11641

Merged
niksedk merged 1 commit into
SubtitleEdit:mainfrom
mjuhasz:tweak/video-time-display-jitter
Jun 15, 2026
Merged

Video player: fix time display jitter with tabular numerals#11641
niksedk merged 1 commit into
SubtitleEdit:mainfrom
mjuhasz:tweak/video-time-display-jitter

Conversation

@mjuhasz

@mjuhasz mjuhasz commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

The elapsed/remaining time and the slash + total duration were shifting horizontally during playback. The cause is proportional font rendering: even though the time string is always a fixed 12 characters (HH:MM:SS,mmm), digits like 1 are narrower than 8 in the default system font, so the centered TextBlock drifts left and right as each millisecond ticks by.

Enable the tnum (tabular numerals) OpenType feature on the time display TextBlock so all digits occupy the same width without changing the font family. Also pad the elapsed-mode string with a leading space to match the width of the remaining-mode string (which has a "-" prefix), preventing a jump when toggling between the two modes.

Before:

before.mov

After:

after.mov

@niksedk niksedk merged commit f2fdb98 into SubtitleEdit:main Jun 15, 2026
2 checks passed
@mjuhasz mjuhasz deleted the tweak/video-time-display-jitter branch June 15, 2026 19:41
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

Successfully merging this pull request may close these issues.

2 participants