Difference between revisions of "Template:Accidental"

From blackwiki
Jump to navigation Jump to search
blackwiki>Dbolton
blackwiki>Dbolton
m (Added alternate text to double flat and double sharp images (for non-graphical browsers))
Line 1: Line 1:
 
<span class="accidental" style="font-family: Lucida Sans Unicode, Arial Unicode MS;">{{#switch: {{{1}}}
 
<span class="accidental" style="font-family: Lucida Sans Unicode, Arial Unicode MS;">{{#switch: {{{1}}}
 
  | flat = &#x266d;
 
  | flat = &#x266d;
  | doubleflat = [[Image:Doubleflat.svg|8px]]
+
  | doubleflat = [[Image:Doubleflat.svg|8px|double flat]]
 
  | natural = &#x266e;
 
  | natural = &#x266e;
 
  | sharp = &#x266f;
 
  | sharp = &#x266f;
  | doublesharp = [[Image:DoubleSharp.svg|8px]]
+
  | doublesharp = [[Image:DoubleSharp.svg|8px|double sharp]]
 
  | #default = {{{1}}}
 
  | #default = {{{1}}}
 
}}</span><noinclude>
 
}}</span><noinclude>

Revision as of 22:31, 22 June 2007

{{{1}}}


Purpose

The template correctly renders Unicode sharps () flats () and natural signs () in Internet Explorer which would otherwise display empty squares. The choice of fonts also improves the rendering in other browsers such as Mozilla Firefox. The idea is modeled after Template:IPA. See the table below to compare the results in your current browser.

Without template With template
Flat
Natural
Sharp

The template also makes use of SVG to display double flat (double flat) and double sharp (double sharp) signs since the corresponding Unicode characters are not widely supported.

Examples

Flat sign

{{accidental|flat}} renders
{{accidental|doubleflat}} renders double flat

Natural sign

{{accidental|natural}} renders

Sharp sign

{{accidental|sharp}} renders
{{accidental|doublesharp}} renders double sharp