Template talk:Unicode/Archive 1: Difference between revisions

Content deleted Content added
Archive from Template talk:Unicode
fix syntaxhighlight
 
(6 intermediate revisions by 6 users not shown)
Line 5:
This template was created to allow easy switching to [[unicode]] fonts. This is useful for pages that require unicode to display correctly, such as those written in [[International Phonetic Alphabet]]. On some browsers, such as [[Microsoft]] [[Internet Explorer]], unicode does not seem to be activated automatically, so this template lets you force it manually.
 
<strikes>Until [[MediaWiki]] 1.4, we won't be able to use a single template more than 5 times in any one article, so this limits the use of this for the time being. MW1.4 should be up within a month (Nov. 2004).</strikes> I'm pretty sure you can go hog wild with templates now.
 
One might ask why bother to use a template for this. Simply:
Line 96:
== More problems with unicode template ==
The unicode template is doing a good job of representing ḥ, as well as a number of other characters...but with one huge flaw: it is persistently setting these characters off by the insertion of a leading space:
Tsemaḥ. Any ideas what's wrong here? What's even more annoying is that {{polytoniclang|grc|ḥ}}, while not being set off by a space, appears to be rendering as God-only-knows what, rather than as ḥ like it should be. This same polytonic is showing up here as a poorly drawn spiral, but on [[Mizrahi Jews]], it shows up as a [[fleur-de-lis]]. WHAT IS GOING ON HERE??? :-p [[User:TShilo12|Tomer]] <sup><font color=129DBC>[[User talk:TShilo12|<span style="color: #129DBC;>TALK]]</fontspan>]]</sup> 09:44, Apr 7, 2005 (UTC)
 
:You are describing a spacing bug in [[Arial Unicode MS]], likely the first Unicode font from the list you have installed. The other Unicode fonts listed are not broken. [[User:Anárion|Jordi]]·[[User_talk:Anárion|✆]] 10:11, 7 Apr 2005 (UTC)
 
::Any recommendations for how to "fix" this problem? If not in Wikipedia, on my machine, as it seems what you're describing may be OS/Font dependent, rather than a problem with the template itself. [[User:TShilo12|Tomer]] <sup><font color=129DBC>[[User talk:TShilo12|<span style="color: #129DBC;>TALK]]</fontspan>]]</sup> 10:36, Apr 7, 2005 (UTC)
 
:::Install another Unicode font: [[Code2000]], [[TITUS Cyberbit Basic]], [http://scripts.sil.org/cms/scripts/page.php?site_id=nrsi&cat_id=FontDownloadsDoulos Doulos SIL], [http://everywitchway.net/linguistics/fonts/chrysuni.html Chrysanthi Unicode] are all given higher preference than Arial Unicode MS, so they will be used instead once installed. Code2000 at least includes the character, I am not sure about the other fonts. [[User:Anárion|Jordi]]·[[User_talk:Anárion|✆]] 10:47, 7 Apr 2005 (UTC)
 
::Also, the spacing thing means a lot less to me than the fact that the characters seem, bizarrely enough, to be being represented differently, on various pages. What's really disturbing is that I changed the the unicode representation to polytonic specifically to get it to appear correctly on the page, which it did...but now today, it's no longer showing up correctly. what gives? [[User:TShilo12|Tomer]] <sup><font color=129DBC>[[User talk:TShilo12|<span style="color: #129DBC;>TALK]]</fontspan>]]</sup> 10:41, Apr 7, 2005 (UTC)
 
:::I don't actually see the different character display you describe, so I have no clue what is going on there. Mizraḥim has a h-with-dot, not a fleur-de-lis. [[User:Anárion|Jordi]]·[[User_talk:Anárion|✆]] 10:47, 7 Apr 2005 (UTC)
Line 118:
I think the problem may arise because you're using Polytonic rather than Unicode. Both of these have been updated recently. In particular Polytonic now favours a serif font in both English and Greek (it was sans before), and this may be the cause of the fleur de lis, which I certainly see on my system here with MSIE. Note that the fleur de lis is the bold version, the spiral is tne normal version, and using italics gives other characters - see below. The effect of the recent change to the Unicode template by the way is that you should no longer need to user Polytonic other than for polytonic Greek. I myself started using Polytonic to overcome the problems with Unicode a while back but have now reverted all this.
:With Unicode: Mizraḥi and Mizrāḥî
:With Polytonic: {{Polytoniclang|grc|Mizraḥi}} and {{Polytoniclang|grc|Mizrāḥî}}
:Polytonic and bold '''{{Polytoniclang|grc|Mizraḥi}} and {{Polytoniclang|grc|Mizrāḥî}}'''
:Polytonic and italic ''{{Polytoniclang|grc|Mizraḥi}} and {{Polytoniclang|grc|Mizrāḥî}}''
:Polytonic bold and italic '' '''{{Polytoniclang|grc|Mizraḥi}} and {{Polytoniclang|grc|Mizrāḥî}}''' ''
[[User:Ross Burgess|rossb]] 15:04, 7 Apr 2005 (UTC)
 
: Woah! Those all looked fine on my Mac, except the h-dot is not italicized (of course, my browser ignores the templates' font spec). I just looked at it in a vanilla Windows XP system, and each line is mucked up in a different way! At least there's no extra space. I think we have to face the fact that some systems just won't be able to read some text. ''&mdash;[[User:Mzajac |Michael]]&nbsp;[[User talk:Mzajac |Z.]]&nbsp;<small>2005-04-7&nbsp;15:41&nbsp;Z</small>''
 
::OK, thanks. As demonstrated by your (Ross') examples, the unicode template works fine if the entire word is included inside the unicode tag. [[User:TShilo12|Tomer]] <sup><font color=129DBC>[[User talk:TShilo12|<span style="color: #129DBC;>TALK]]</fontspan>]]</sup> 22:11, Apr 7, 2005 (UTC)
 
::: I've put some stuff in my Wikipedia user CSS to apply text colour to these templates. Helps troubleshoot some problems. Below is the code. These web-safe colours are just light enough to distinguish the colour (in my browser), but dark enough so that they don't jump off the page. ''&mdash;[[User:Mzajac |Michael]]&nbsp;[[User talk:Mzajac |Z.]]&nbsp;<small>2005-04-7&nbsp;23:10&nbsp;Z</small>''
Line 152:
 
 
::Can someone who's sure they've got all the right fonts installed check to see whether or not this ☿ shows up as the little squiggly for [[Mercury (planet)]]? I added <nowiki>{{Unicode| }}</nowiki> to it, but it still doesn't show up on my sqween. In case you're uncertain, it should look like this: [[Image:Mercury_symbol.svg|20px|Mercury]]. [[User:TShilo12|Tomer]] <sup><font size=-1 color=129DBC>[[User talk:TShilo12|<span style="font-size:x-small; color: #129DBC;>TALK]]</fontspan>]]</sup> 01:26, Jun 6, 2005 (UTC)
 
::: Works fine in Safari and Firefox/Mac for me. ''&mdash;[[User:Mzajac |Michael]]&nbsp;[[User talk:Mzajac |Z.]]&nbsp;<small>2005-06-6&nbsp;02:23&nbsp;Z</small>''
Line 211:
 
The font declarations for these three templates have been moved to the style sheet at [[MediaWiki:Common.css]]. This reduces the size of Wikipedia pages' code, by as much as 100kB in the case of [[International Phonetic Alphabet|IPA]]. The respective font declarations are applied to HTML entities with one of the following attributes (capitalization counts). The three templates in question have been updated, so they will continue working as before.
<code>class="IPA"</code>
<code>class="Unicode"</code>
<code>class="polytonic"</code>
 
The only disadvantage of the new scheme is that only admin users are able to edit the font declarations in Common.css (or is it an advantage?). But you can override the font declaration for yourself by editing your own Wikipedia user style sheet. See [[Template talk:IPA#Applying custom styles to IPA text]]. Alternatively, you can use a browser like [[Mozilla Firefox]], [[Opera (web browser) |Opera]], or [[Safari (web browser) |Safari]], in which Unicode text just works.
Line 266:
 
==Between this template and IAST template==
...which one is more suited to render transliterated [[devanagiri]] script words on most computers? --<font colorspan style="color: orange;">[[User:Babub|<font colorspan style= "color:DarkBlue;">Babub</fontspan>]]<sup>([[User talk:Babub|<font colorspan style= "color:blue;">Talk</fontspan>]]|[[Special:User contributions/Babub|<font colorspan style= "color:blue;">Contribs</fontspan>]])</sup></fontspan> 14:48, 19 July 2006 (UTC)
 
The need for the Unicode template to display Devanagari is no longer as much of an issue as better support for Unicode is more widespread. The Unicode template is rarely used on the Hinduism pages that use Devanagari. The [[IAST]] transliteration method can be shown via the IAST template if IAST is used. The template I see most often on the Hinduism pages for Sanskrit is some variant of this: <nowiki>([[Sanskrit]]:{{lang|sa|गणेश पुराणम्}}; {{IAST|gaṇeśa purāṇam}})</nowiki> which displays:
Line 343:
== Used idle for a purpose? ==
 
In [[Advertising]] (at least today's version [http://en.wikipedia.org/w/index.php?title=Advertising&oldid=397672662]), the template is used like this: <ttcode><nowiki>{{unicode|}}</nowiki></ttcode> (early in the source text). Is this useful for some reason? -[[User:DePiep|DePiep]] ([[User talk:DePiep|talk]]) 19:28, 19 November 2010 (UTC)
 
== Font override ==
Line 357:
Does anyone know what I am doing wrong here? [[User:Laricaney|Laricaney]] ([[User talk:Laricaney|talk]]) 15:35, 15 February 2011 (UTC)
 
:You need to add the <ttcode>!important;</ttcode> keyword. I added it in your code above. <span style="font-family:'Trebuchet MS',sans-serif"> — [[User:Edokter|<span style="color:#008"><i>E</i>dokter</span>]] ([[User_talk:Edokter|<span style="color:#080">talk</span>]]) — </span> 16:15, 15 February 2011 (UTC)
 
::It worked, thanks! [[User:Laricaney|Laricaney]] ([[User talk:Laricaney|talk]]) 16:55, 15 February 2011 (UTC)
Line 387:
: Rather than attempt to make one size fit all with this template, or create the same problem with a similar untargeted unicode template, I suggest that you create a template specifically suited to the range(s) of characters that you want to handle. (If the characters are only used on one or two pages, you could of course simply apply a font-family style attribute using {{tag|span|o}} tags manually.)
: See {{Tlx|Script}} and, for example, {{Tlx|Script/Coptic}}, for an existing series of subtemplates which seek to do this.
: In case the browser already has a suitable default font, it might also help to specify a [http://www.w3.org/TR/CSS21/fonts.html#generic-font-families generic fallback] as the last item in the font-family list, e.g. <sourcesyntaxhighlight lang="html5html" enclose="none"inline><span style="font-size-adjust:0.54; font-family:'P22 Declaration Script','American Scribe','National Archive', Ovidius, 'Ovidius Script', Horizon, 'Final Frontier Old Style', Charcoal, Virtue, sans-serif;">...</span></sourcesyntaxhighlight>
: — [[User:Richardguk|Richardguk]] ([[User talk:Richardguk|talk]]) 17:48, 5 December 2012 (UTC)
::{{tlx|Script}} mixes up ''scripts'' and ''languages''. It should not do when used for this purpose. -[[User:DePiep|DePiep]] ([[User talk:DePiep|talk]]) 19:05, 5 December 2012 (UTC)