Skinning.fonts: Difference between revisions

From Shareaza Wiki
Jump to navigation Jump to search
mNo edit summary
No edit summary
 
Line 1: Line 1:
{{do not translate}}
{{Language}}
{{Recovered|The following content has been recovered from the old wiki and pantheraproject*net. Competent verification is needed.}}
{{Updated|2014.05.06|2.7.x.0}}


<h1> <span class="mw-headline">&lt;fonts&gt;</span></h1>
=<fonts>=
<p>The <b>&lt;fonts&gt;</b> 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.
</p><p>Here is an example from <b>MyFontSkin.xml</b>:
</p>
<div dir="ltr" style="text-align: left;"><div class="source-xml" style="font-family: monospace;"><pre><span class="re1">&lt;?xml</span> <span class="re0">version</span>=<span class="st0">&quot;1.0&quot;</span> <span class="re0">encoding</span>=<span class="st0">&quot;UTF-8&quot;</span><span class="re2">?&gt;</span>
<span class="re1">&lt;skin</span> <span class="re0">xmlns</span>=<span class="st0">&quot;http://www.shareaza.com/schemas/Skin.xsd&quot;</span> <span class="re0">version</span>=<span class="st0">&quot;1.0&quot;</span><span class="re2">&gt;</span>
<span class="re1">&lt;manifest</span> <span class="re0">name</span>=<span class="st0">&quot;My Font Skin&quot;</span> <span class="re0">author</span>=<span class="st0">&quot;Me&quot;</span> <span class="re0">type</span>=<span class="st0">&quot;Skin&quot;</span><span class="re2">/&gt;</span>
<span class="re1">&lt;fonts<span class="re2">&gt;</span></span>
  <span class="re1">&lt;font</span> <span class="re0">name</span>=<span class="st0">&quot;System.Plain&quot;</span> <span class="re0">face</span>=<span class="st0">&quot;Times New Roman&quot;</span> <span class="re0">size</span>=<span class="st0">&quot;12&quot;</span> <span class="re0">weight</span>=<span class="st0">&quot;bold&quot;</span><span class="re2">/&gt;</span>
  <span class="re1">&lt;font</span> <span class="re0">name</span>=<span class="st0">&quot;System.Plain&quot;</span> <span class="re0">face</span>=<span class="st0">&quot;MS UI Gothic&quot;</span> <span class="re0">size</span>=<span class="st0">&quot;12&quot;</span> <span class="re0">weight</span>=<span class="st0">&quot;normal&quot;</span> <span class="re0">language</span>=<span class="st0">&quot;ja&quot;</span><span class="re2">/&gt;</span>
  <span class="re1">&lt;font</span> <span class="re0">name</span>=<span class="st0">&quot;System.Plain&quot;</span> <span class="re0">face</span>=<span class="st0">&quot;Tahoma&quot;</span> <span class="re0">size</span>=<span class="st0">&quot;14&quot;</span> <span class="re0">weight</span>=<span class="st0">&quot;bold&quot;</span> <span class="re0">language</span>=<span class="st0">&quot;chs&quot;</span><span class="re2">/&gt;</span>
<span class="re1">&lt;/fonts<span class="re2">&gt;</span></span>
<span class="re1">&lt;/skin<span class="re2">&gt;</span></span></pre></div></div>
<p>These attributes are available for each font specification:
</p>
<ul><li><b>name</b> - The name of the font target.
</li><li><b>face</b> - The font face name, for example "<b>Tahoma</b>".
</li><li><b>size</b> - The font size, for example "<b>11</b>".
</li><li><b>weight</b> - The font weight, either as a constant or an integer value between 1 and 1000. "<b>normal</b>" and "<b>bold</b>" are also accepted.
</li><li><b>language</b> - The specific language that this font specification will be used on.
</li></ul>
<p>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 "<b>ja</b>" for Japanese.
</p><p>And here is a list and description of the different font target names:
</p>
<table border="1" cellspacing="0" cellpadding="5">


<tr style="background-color:#FFFFC0;">
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.
<td>Font
 
</td><td>Description
Here is an example from '''MyFontSkin.xml''':
</td></tr>
 
<tr>
<?xml version="1.0" encoding="UTF-8"?>
<td>System.Plain
<skin xmlns="http://shareaza.sourceforge.net/schemas/Skin.xsd" version="1.0">
</td><td>The plain system font, used in all menus, toolbars and command bars.
  <manifest name="My Font Skin" author="Me" type="Skin"/>
</td></tr>
  <fonts>
<tr>
      <font name="System.Plain" face="Times New Roman" size="12" weight="bold"/>
<td>System.Bold
      <font name="System.Plain" face="MS UI Gothic" size="12" weight="normal" language="ja"/>
</td><td>The bold/emphasis system font, used for headings and default command items.
      <font name="System.Plain" face="Tahoma" size="14" weight="bold" language="chs"/>
</td></tr>
  </fonts>
<tr>
</skin>
<td>Panel.Caption
 
</td><td>The panel window (tabbed mode) caption font.
These attributes are available for each font specification:
</td></tr></table>
 
<p>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:
* '''name''' - The name of the font target.
</p>
* '''face''' - The font face name, for example "'''Tahoma'''".
<div dir="ltr" style="text-align: left;"><div class="source-xml" style="font-family: monospace;"><pre><span class="re1">&lt;import</span> <span class="re0">path</span>=<span class="st0">&quot;HOOG0553.ttf&quot;</span><span class="re2">/&gt;</span></pre></div></div>
* '''size''' - The font size, for example "'''11'''".
<p>A full example:
* '''weight''' - The font weight, either as a constant or an integer value between 1 and 1000. "'''normal'''" and "'''bold'''" are also accepted.
</p>
* '''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.
<div dir="ltr" style="text-align: left;"><div class="source-xml" style="font-family: monospace;"><pre><span class="re1">&lt;?xml</span> <span class="re0">version</span>=<span class="st0">&quot;1.0&quot;</span> <span class="re0">encoding</span>=<span class="st0">&quot;UTF-8&quot;</span><span class="re2">?&gt;</span>
 
<span class="re1">&lt;skin</span> <span class="re0">xmlns</span>=<span class="st0">&quot;http://www.shareaza.com/schemas/Skin.xsd&quot;</span> <span class="re0">version</span>=<span class="st0">&quot;1.0&quot;</span><span class="re2">&gt;</span>
And here is a list and description of the different font target names:
<span class="re1">&lt;manifest</span> <span class="re0">name</span>=<span class="st0">&quot;My Font Skin&quot;</span> <span class="re0">author</span>=<span class="st0">&quot;Me&quot;</span> <span class="re0">type</span>=<span class="st0">&quot;Skin&quot;</span><span class="re2">/&gt;</span>
 
<span class="re1">&lt;fonts<span class="re2">&gt;</span></span>
 
  <span class="re1">&lt;import</span> <span class="re0">path</span>=<span class="st0">&quot;HOOG0553.ttf&quot;</span><span class="re2">/&gt;</span>
{| border="0" cellspacing="0" cellpadding="5"
  <span class="re1">&lt;font</span> <span class="re0">name</span>=<span class="st0">&quot;System.Plain&quot;</span>   <span class="re0">face</span>=<span class="st0">&quot;Arial&quot;</span> <span class="re0">size</span>=<span class="st0">&quot;10&quot;</span> <span class="re0">weight</span>=<span class="st0">&quot;bold&quot;</span><span class="re2">/&gt;</span>
|- style="background-color:#FFFFC0"
  <span class="re1">&lt;font</span> <span class="re0">name</span>=<span class="st0">&quot;System.Bold&quot;</span>   <span class="re0">face</span>=<span class="st0">&quot;Arial&quot;</span> <span class="re0">size</span>=<span class="st0">&quot;10&quot;</span> <span class="re0">weight</span>=<span class="st0">&quot;bold&quot;</span><span class="re2">/&gt;</span>
|'''Police'''
  <span class="re1">&lt;font</span> <span class="re0">name</span>=<span class="st0">&quot;Panel.Caption&quot;</span> <span class="re0">face</span>=<span class="st0">&quot;Arial&quot;</span> <span class="re0">size</span>=<span class="st0">&quot;10&quot;</span> <span class="re0">weight</span>=<span class="st0">&quot;bold&quot;</span><span class="re2">/&gt;</span>
|'''Description'''
<span class="re1">&lt;/fonts<span class="re2">&gt;</span></span>
|-
<span class="re1">&lt;/skin<span class="re2">&gt;</span></span></pre></div></div>
|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://shareaza.sourceforge.net/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>
 
{{Nav2|Skinning tutorial}}

Latest revision as of 08:47, 6 May 2014

  Languages:

[[::Skinning.fonts|English]] • [[::Skinning.fonts/de|Deutsch]] • [[::Skinning.fonts/es|Español]] • [[::Skinning.fonts/fr|Français]] • [[::Skinning.fonts/he|עברית]] • [[::Skinning.fonts/it|Italiano]] • [[::Skinning.fonts/nl|Nederlands]] • [[::Skinning.fonts/pl|Polski]] • [[::Skinning.fonts/pt|Português]] • [[::Skinning.fonts/ru|Русский]] • [[::Skinning.fonts/zh-hant|‪中文(繁體)]]

e
  Updated:

This page has been updated on 2014.05.06 for the release of Shareaza v2.7.x.0.

e

<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://shareaza.sourceforge.net/schemas/Skin.xsd" version="1.0">
  <manifest name="My Font Skin" author="Me" type="Skin"/>
  <fonts>
     
     
     
  </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:


Police 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://shareaza.sourceforge.net/schemas/Skin.xsd" version="1.0">
  <manifest name="My Font Skin" author="Me" type="Skin"/>
  <fonts>
     <import path="HOOG0553.ttf"/>
     
     
     
  </fonts>
</skin>



Navigation:     ShareazaWiki > Skinning tutorial > Skinning.fonts