Skinning Tutorial

[ Back to Shareaza Skinning ]

<fonts>

The <fonts> element changes the fonts used within the user interface. Each different font is given a name, and you can set each of these named fonts to a particular font style.

Here is an example from MyFontSkin.xml:

<?xml version="1.0" encoding="UTF-8"?>
<skin xmlns="http://www.shareaza.com/schemas/Skin.xsd" version="1.0">
   <manifest name="My Font Skin" author="Me" type="Skin"/>
   <fonts>
      <font name="System.Plain" face="Times New Roman" size="12" weight="bold"/>
      <font name="System.Plain" face="MS UI Gothic" size="12" weight="normal" language="ja"/>
      <font name="System.Plain" face="Tahoma" size="14" weight="bold" language="chs"/>
   </fonts>
</skin>

These attributes are available for each font specification:

  • name - The name of the font target.
  • face - The font face name, for example "Tahoma".
  • size - The font size, for example "11".
  • weight - The font weight, either as a constant or an integer value between 1 and 1000. "normal" and "bold" are also accepted.
  • language - The specific language that this font specification will be used on. Not setting this attributes will make this specification apply to all languages. The language code and not the language name should be used, for example "ja" for Japanese.

And here is a list and description of the different font target names:

Font Description
System.Plain The plain system font, used in all menus, toolbars and command bars.
System.Bold The bold/emphasis system font, used for headings and default command items.
Panel.Caption The panel window (tabbed mode) caption font.

If you want to use a font not typically found by default on Windows then you can import the font. Just include the font (in this case, Hoog0553) in your skin's folder and add the following path:

<import path="HOOG0553.ttf"/>

A full example:

<?xml version="1.0" encoding="UTF-8"?>
<skin xmlns="http://www.shareaza.com/schemas/Skin.xsd" version="1.0">
   <manifest name="My Font Skin" author="Me" type="Skin"/>
   <fonts>
      <import path="HOOG0553.ttf"/>
      <font name="System.Plain"   face="Arial" size="10" weight="bold"/>
      <font name="System.Bold"    face="Arial" size="10" weight="bold"/>
      <font name="Panel.Caption"  face="Arial" size="10" weight="bold"/>
   </fonts>
</skin>

[ Back to Shareaza Skinning ]

  • en
  • es
  • fr
  • de
  • hr
  • it
  • lt
  • nl
  • nb
  • pl
  • pt
  • sl
  • tr
  • el
  • he
  • ja
  • zh-tw
  • en
  • ca
  • fa
  • ru
Many people contribute their time and effort to Shareaza. Please see our acknowledgements page.
Visit Shareaza's Project Page at SourceForge.net

SourceForge.net Logo
< Top of the Page | Contact Us >