2012-11-13, 20:08
I am trying to understand the skin hiërarchie however there are a couple of questions.
XBMC version: 12.0-ALPHA7 Git:20121111-860cd91 (Compiled: Nov 11 2012)
The image (8x8) is nicely shown on the given posx and posy. The text however is not.
The fonts i tested:
Fonts:
The vertical text position is not shown on posy 100. It looks like this is font related?
Why is this and how are you skinners handle this?
A other thing i don't really understand is this.
I tested this with 2 fonts.
As shown in the above picture the 2 fonts are reacting very different when it comes to the posy. As webdesigner i am familiar with html and css. If i use html/css in the same way as i did above it will look like this:
The small text is vertically aligned center. The height is still 100 i will asume the text must be centered within it's given height.
At least that is what the wiki says:
XBMC version: 12.0-ALPHA7 Git:20121111-860cd91 (Compiled: Nov 11 2012)
Code:
<control type="label">
<label>Test</label>
<posx>100</posx>
<posy>100</posy>
<height>100</height>
<width>250</width>
<align>left</align>
<aligny>top</aligny>
<font>Nexa-Light60</font>
<textcolor>White</textcolor>
</control>
<control type="label">
<label>Test</label>
<posx>300</posx>
<posy>100</posy>
<height>100</height>
<width>250</width>
<align>left</align>
<aligny>top</aligny>
<font>DroidSans60</font>
<textcolor>White</textcolor>
</control>
<control type="label">
<label>Test</label>
<posx>500</posx>
<posy>100</posy>
<height>100</height>
<width>250</width>
<align>left</align>
<aligny>top</aligny>
<font>OpenSans-Regular60</font>
<textcolor>White</textcolor>
</control>
<control type="label">
<label>Test</label>
<posx>700</posx>
<posy>100</posy>
<height>100</height>
<width>250</width>
<align>left</align>
<aligny>top</aligny>
<font>SegoeUI60</font>
<textcolor>White</textcolor>
</control>
<control type="image" id="1">
<description>My first image control</description>
<posx>900</posx>
<posy>100</posy>
<width>200</width>
<height>100</height>
<align>left</align>
<aligny>top</aligny>
<texture>test.png</texture>
</control>
The image (8x8) is nicely shown on the given posx and posy. The text however is not.
The fonts i tested:
Code:
<font>
<name>Nexa-Light60</name>
<filename>Nexa-Light.ttf</filename>
<size>60</size>
</font>
<font>
<name>DroidSans60</name>
<filename>DroidSans.ttf</filename>
<size>60</size>
</font>
<font>
<name>OpenSans-Regular60</name>
<filename>OpenSans-Regular.ttf</filename>
<size>60</size>
</font>
<font>
<name>SegoeUI60</name>
<filename>segoeui.ttf</filename>
<size>60</size>
</font>
Fonts:
- Nexa light
- DroidSans regular
- OpenSans regular
- SegoeUI regular
The vertical text position is not shown on posy 100. It looks like this is font related?
Why is this and how are you skinners handle this?
A other thing i don't really understand is this.
I tested this with 2 fonts.
- DroidSans regular
- OpenSans regular
Code:
<font>
<name>DroidSans30</name>
<filename>DroidSans.ttf</filename>
<size>30</size>
</font>
<font>
<name>DroidSans60</name>
<filename>DroidSans.ttf</filename>
<size>60</size>
</font>
<font>
<name>OpenSans-Regular30</name>
<filename>OpenSans-Regular.ttf</filename>
<size>30</size>
</font>
<font>
<name>DroidSans60</name>
<filename>DroidSans.ttf</filename>
<size>60</size>
</font>
Code:
<control type="label">
<label>Test</label>
<posx>100</posx>
<posy>100</posy>
<height>100</height>
<width>250</width>
<align>left</align>
<aligny>top</aligny>
<font>DroidSans60</font>
<textcolor>White</textcolor>
</control>
<control type="label">
<label>Test</label>
<posx>300</posx>
<posy>100</posy>
<height>100</height>
<width>250</width>
<align>left</align>
<aligny>center</aligny>
<font>DroidSans30</font>
<textcolor>White</textcolor>
</control>
<control type="label">
<label>Test</label>
<posx>500</posx>
<posy>100</posy>
<height>100</height>
<width>250</width>
<align>left</align>
<aligny>top</aligny>
<font>OpenSans-Regular60</font>
<textcolor>White</textcolor>
</control>
<control type="label">
<label>Test</label>
<posx>700</posx>
<posy>100</posy>
<height>100</height>
<width>250</width>
<align>left</align>
<aligny>center</aligny>
<font>OpenSans-Regular30</font>
<textcolor>White</textcolor>
</control>
As shown in the above picture the 2 fonts are reacting very different when it comes to the posy. As webdesigner i am familiar with html and css. If i use html/css in the same way as i did above it will look like this:
The small text is vertically aligned center. The height is still 100 i will asume the text must be centered within it's given height.
At least that is what the wiki says:
Quote:align Can be left, right, or center. Aligns the text within the given label <width>. Defaults to left
aligny Can be top or center. Aligns the text within its given label <height>. Defaults to top