Nedanstående ger radbrytningar, centrerad och vit text med svart skugga


<sub name="Subtitle_TTX" font="Regular;38" foregroundColor="#DCDCDC" shadowColor="#40101010" shadowOffset="2,2" />
<sub name="Subtitle_Regular" font="Regular;38" foregroundColor="#DCDCDC" shadowColor="#40101010" shadowOffset="2,2" />
<sub name="Subtitle_Bold" font="Replacement;38" foregroundColor="#DCDCDC" shadowColor="#40101010" shadowOffset="2,2" />
<sub name="Subtitle_Italic" font="Regular;38" foregroundColor="#DCDCDC" shadowColor="#40101010" shadowOffset="2,2" />

HD skins are setup with screen size 1280x720 pixels.
SD material is sent in 720x576 pixels

In the skin.xml file the subtitle display in the screen is defined from lower left position (x=0 y=0) of the total screen. To use full width of screen for the subtitles you set the Subtitle Display to 1280 wide. However to make sure you get the SD subtitles in screen you can not set the height above 576 as that actually will push the SD subtitles below the screen.

Now to the tricky part, centering the subtitles for both SD and HD channels at the same time as you do not want the subtitles to be wider than 4:3 SD channels.

You achieve this by limiting the with of the Subtitle display to 720 pixels, but as the SD channels uses the center of the 1280 pixels and the subtitle display area starts lower left you have to add half of the difference between 1280 and 720,(1280-720)/2 = 280 to the subtitle display width resulting in 720+280=1000 pixels. This limits the subtitles on the right side of SD 4:3 material. To limit on the left side you set the start position to 140 (half of 280).

As I also wants some margin (20 pixels on each side) I reduced the subtitle display to 960 pixels wide and a set the start position to 160.

With above formula I got the following definition for the Subtitle Display in the skin.xml file:

<screen name="SubtitleDisplay" position="160,120" size="960,576" zPosition="-1" flags="wfNoBorder" backgroundColor="transparent" >
</screen>