This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 19273 - WebVTT: Define a default value for 'line-height'
Summary: WebVTT: Define a default value for 'line-height'
Status: RESOLVED WORKSFORME
Alias: None
Product: TextTracks CG
Classification: Unclassified
Component: WebVTT (show other bugs)
Version: unspecified
Hardware: PC All
: P2 normal
Target Milestone: ---
Assignee: Ian 'Hixie' Hickson
QA Contact: This bug has no owner yet - up for the taking
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-10-04 10:19 UTC by Silvia Pfeiffer
Modified: 2012-12-31 05:42 UTC (History)
5 users (show)

See Also:


Attachments

Description Silvia Pfeiffer 2012-10-04 10:19:48 UTC
Section 3.5.1 defines default settings for CSS values. It includes a default font of '5vh', i.e. 5% of video height.

When "line" cue settings are provide as line numbers, we need to provide exact positioning. However, line heights are different between browsers - CSS only specifies that line-height should be between 1.1 - 1.3 times the font height.

To get exact line positioning, we should also provide a default setting for line-height.
Comment 1 Silvia Pfeiffer 2012-10-24 21:51:03 UTC
I'm finding that this looks best:

line-height: '5vh'
font: '5/1.3vh sans-serif'

This has the result that every browser covers the video viewport with 20 lines exactly, rather than being random.
Comment 2 Ian 'Hixie' Hickson 2012-11-21 19:19:15 UTC
CSS specifies that the line height is 'normal' which is derived fron the font metrics.

We could set the line-height to 6.5vh as you suggest, but then it would have overlap in cases where the font's metrics are able to suggest a better line height (e.g. Zapfino).

zcorpan, foolip: any opinion on this?
Comment 3 Silvia Pfeiffer 2012-11-21 20:45:22 UTC
This is a problem of compatibility between browsers, which each interpret "normal" differently, not just for different fonts, but for the same font.
Comment 4 Ian 'Hixie' Hickson 2012-11-22 00:14:41 UTC
If they're interpreting the font metrics differently, file a bug on the browsers getting it wrong.
Comment 5 Simon Pieters 2012-11-22 09:50:09 UTC
I think we should keep 'normal' in WebVTT as the default. It should be possible for authors and users to change font and have the line height follow appropriately. If you want a certain number of lines, you can set line-height. That browsers differ in line-height for the same font is a bug.