Help - Search - Members - Calendar
Full Version: Text/font Question
Scenyx Entertainment Community > Xbox1 Forums > Dashboard Forums > Official MediaXMenu (MXM) Forum > MXM Developer/Skinner Forum
49er
I want to add some custom text - "TRACK" - using a custom font, so I put something like this in my skin:

<LayoutElement Type="Text" Font="Impact_18.xpr">
<Color>0x80FFFFFF</Color>
<Constant>TRACK</Constant>
<Pos x=200 y=200>
<Justify x=left y=center>
</LayoutElement>

When I load the skin, it shows the text in the default font.

(I can use the custom font for text that is sourced e.g. DateTime, but not with the <Constant> tag).

Any ideas?
BenJeremy
QUOTE (49er @ Nov 25 2003, 04:25 AM)
I want to add some custom text - "TRACK" - using a custom font, so I put something like this in my skin:

<LayoutElement Type="Text" Font="Impact_18.xpr">
<Color>0x80FFFFFF</Color>
<Constant>TRACK</Constant>
<Pos x=200 y=200>
<Justify x=left y=center>
</LayoutElement>

When I load the skin, it shows the text in the default font.

(I can use the custom font for text that is sourced e.g. DateTime, but not with the <Constant> tag).

Any ideas?

Fonts have to be defined as a resource, then you use the resource name to identify the font.
49er
Hi - thanks for the reply.

Just to be absolutely clear:-

- I've named the font as a resource.

- It works with
<LayoutElement Type="Text" Source="DateTime" Font="Impact_18.xpr">
...
</LayoutElement>


- I can't get it to work with
]<LayoutElement Type="Text" Font="Impact_18.xpr">
<Constant>my custom text here</Constant>
...
</LayoutElement>


I must be missing something - I'll check again for typos when I get home.

(Great dash BTW)
BenJeremy
QUOTE (49er @ Nov 25 2003, 07:23 AM)
Hi - thanks for the reply.

Just to be absolutely clear:-

- I've named the font as a resource.

- It works with
<LayoutElement Type="Text" Source="DateTime" Font="Impact_18.xpr">
...
</LayoutElement>


- I can't get it to work with
]<LayoutElement Type="Text" Font="Impact_18.xpr">
<Constant>my custom text here</Constant>
...
</LayoutElement>


I must be missing something - I'll check again for typos when I get home.

(Great dash BTW)

?? No, that shouldn't work, neither element.

CODE

 <Resource Type="Font" Name="Impact">
   <File>Impact_18.xpr</File>
 </Resource>


Then:

CODE

<LayoutElement Type="Text" Font="Impact">
<Color>0x80FFFFFF</Color>
<Constant>TRACK</Constant>
<Pos x=200 y=200>
<Justify x=left y=center>
</LayoutElement>


You must use the RESOURCE NAME for the element to be able to reference the font. This was done to conserve and consolidate resources. It also makes it a snap to make changes to the fonts, for example, without having to change a bunch of locations in the skin file.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2013 Invision Power Services, Inc.