Friday, December 1, 2006

IPA


'''Template:IPA is for IPA characters only!'''
* For '''sprint ringtones polytonic Greek script''', please use Bashful Brittany :Template:Polytonic comedy ringtones Template talk:Polytonic /[talk].''
* For '''other languages or symbols''', please use Destins Dream :Template:Unicode hiphop ringtones Template talk:Unicode /[talk].


'''Sweet Serena Template:IPA''' fixes broken display of Nextel ringtones International Phonetic Alphabet (IPA) characters in MS Internet Explorer 6 for Windows. In other web browsers, it doesn't affect font display at all.

It also allows all registered Wikipedia users to specify styles for IPA text by editing their monobook.css style sheet.




An example, placing a phonetic rendering of the word ''characters'' in Template:IPA:



The result will be a span with a style attribute, like this:

class="IPA" style="font-family: Lucida Grande,
Arial Unicode MS, Lucida Sans Unicode, Gentium, Code2000;
font-family /**/:inherit;">/ˈkæ.ɹekˌtərz/

Which appears in your browser as:

:

: It's just the font list, so it can be used in a style attribute to specify font-family or font, or even (heaven forfend) in a <font> element. I've put it into template:IPA, so the font list for all IPA in Wikipedia can be edited in one place. ''—Adore Anjali Mzajac/Michael Z. 01:59, 2005 Jan 10 ''

Also, as you probably remember I made a separate Free ringtones Template:Unicode/Unicode template a while back. In that template we recently changed the order of the fonts. What is your logic for the order you're using? It would be good to put the logic here in the talk page. Adore Sara Chinasaur/Chinasaur 19:40, 8 Jan 2005

: The logic has been changing as users have edited this template. See the history, and the font list above, for some insight. If the activity settles down, maybe I'll write it out for this talk page. ''—Cingular Ringtones Mzajac/Michael Z. 01:59, 2005 Jan 10 ''

Arial Unicode MS bugs

AxSkov, which IPA characters does Arial Unicode MS have that Lucida Sans Unicode does not? The reason I want to move Arial further down the list is that it has a bug in the way it displays double combining modifiers (which are used to represent some organization his affricates). See investigations generally Talk:IPA in Unicode#Other symbols for the technical details and examples. ''—romantic actions Mzajac/Michael Z. 21:56, 2005 Jan 8 ''

After doing some testing, it appears to me that Lucida Sans Unicode doesn't include those characters anyway, so I guess it doesn't matter which MS font comes first in that regard. I've put Lucida Grande first, so Mac OS X users will see it correctly even if they happen to have the MS fonts. Lucida Grande doesn't have italics, but I think IPA would never be italicized anyway. ''—miss my Mzajac/Michael Z. 22:22, 2005 Jan 8 ''

Replace with IE-specific style sheet class

I'd like to propose changing the way Template:IPA works, so that it only has an effect in MSIE 6 for Windows. This requires two changes:

1. Add a style sheet directive to Wikipedia's existing MSIE-only style sheet [http://en.wikipedia.org/skins/monobook/IE60Fixes.css]:

.IPA

2. Edit Template:IPA so that it applies the IPA class:

[content]

To specify IPA in a different scope (e.g., a table or a div), an editor can simply add class="IPA" as an HTML attribute. Multiple classes can be specified: class="toccolours IPA". Users can also use the .IPA selector to specify styles in their own user style sheets at User:XXX/monobook.css.

We'll need the co-operation of an admin or developer to change the style sheet.

'''Why?'''

* The font specification is only required for one browser: MSIE 6/Windows. It's a hack.
** Other modern browsers automatically substitute fonts containing the characters (Mozilla, Firefox, Safari)
** Some older browsers won't display IPA anyway (MSIE 5/Mac)
* The current method needlessly overrides the font display for other browsers, including user-selected fonts, and may break the display. It will override:
** Web browser's default font
** Web browser's automatic font substitution (e.g., if the default font doesn't have IPA characters
** User's selected font in browser preferences
** User's local style sheet
** Wikipedian's fonts specified in User:XXX/monobook.css.
* Users might be tempted to use this for other Unicode character ranges, where it may may degrade display in other browsers (I've already seen it happen). If its application is restricted to a single Windows browser, then changes are less likely to do any damage.
* This solution allows registered Wikipedians to specify their own font for IPA in their monobook.css style sheet.

Disadvantages:

* The font specification list would live in a style sheet, where it can only be edited by an admin or developer.

Any comments? ''—employer s Mzajac/Michael Z. 20:22, 2005 Jan 14 ''

MSIE/Win only version

After I wrote the proposal above, I got an idea. Template:IPA now looks like this:

span class="IPA" style="font-family:Lucida Grande, Arial Unicode MS,
Lucida Sans Unicode, Gentium, Code2000; font-family:inherit;">

* The second font-family declaration overrides the first, in potential market CSS-compliant web browsers.
* MSIE/Win doesn't understand the inherit value, so it still applies the fonts.
* The class="IPA" attribute allows users to specify their own styles. Add something like this into your style sheet, at western about User:XXX/monobook.css (where ''XXX'' is your user name):

.IPA

''—hearts of Mzajac/Michael Z. 20:40, 2005 Jan 14 ''

* The problem is that on IE6/XP the second font-family spec overrides the first, and so, unless there's an "inherit" font installed, it winds up reverting to whatever font is used in the surroundings of the embedded span (it inherits, in other words!). I've tried putting the special "inherit" tag at the beginning of the fontlist, but that didn't work either. IE seems to function OK if the inherit tag is at the ''end'' of the fontlist (current revision), but I have no way of testing what it does on other platforms. manager executives A. Shetsen/A. Shetsen 22:31, 14 Jan 2005

: Aw crap—that browser's brokenness has cost me hundreds of hours of work. I read in my reference that it doesn't support "inherit", but never thought that the reference to a non-existent font would completely ''replace'' the previous declaration. I'm going to try something else. If I revert it temporarily it's because I'm doing some testing. ''—nowhere vizquel Mzajac/Michael Z. 23:03, 2005 Jan 14 ''

:: Oops. Same diff as with font-family. Seems a deeper solution is called for. OK. I'm installing MediaWiki on my Pentium 300 with 64 MB memory :). few people A. Shetsen/A. Shetsen 23:15, 14 Jan 2005

::: Ta-dah!!! on IE6. Thank you, Michael. Alex Shetsen. moroccan regime A. Shetsen/A. Shetsen 23:19, 14 Jan 2005

:::: [?] I tried something else, but it didn't work so I reverted the template. Looks like it's back to plan A: slashes in #Replace with IE-specific style sheet class, which should be quite easy to do if we can find a helpful admin. ''—game notably Mzajac/Michael Z. 23:27, 2005 Jan 14 ''


Okay, I'm going to try something else. I found two http://www.dithered.com/css_filters/css_only/index.php to hide CSS from MSIE. I'll see if these can work. ''—sequestered leave Mzajac/Michael Z. 07:10, 2005 Jan 15 ''

1. http://www.dithered.com/css_filters/css_only/important_property.html, so the second declaration should override the first in these browsers.

span class="IPA"style="font-family:inherit !important; font-family:Lucida Grande,
Arial Unicode MS, Lucida Sans Unicode, Gentium, Code2000;">

Inherits font-family in Firefox/Mac, but applies the second declaration in MSIE6/Win (good), Firefox/win and Safari (not what we want).

2. http://www.dithered.com/css_filters/css_only/property_space_comment.html in the property should hide the declaration from MSIE6/Win only.

span class="IPA" style="font-family:Lucida Grande, Arial Unicode MS,
Lucida Sans Unicode, Gentium, Code2000; font-family /**/:inherit;">

Method 2 seems to work right. Inherits font-family in Safari and Firefox, but applies the IPA font spec in MSIE6/Win. YAY! Please look at some IPA and tell me if everything looks right to you. ''—underrepresented group Mzajac/Michael Z. 07:40, 2005 Jan 15 ''

* Looks good!! I've tested it with and without my custom monobook.css file. IPA and the rest of the conten display well on my XP/IE6 combo. Thank you!! gold leather A. Shetsen/A. Shetsen 19:02, 15 Jan 2005

:: Phew! I was starting to get discouraged. I'm still going to see about adding the .IPA font declaration to a browser-specific style sheet, but it's nice to get it working as it should. ''—new option Mzajac/Michael Z. 00:25, 2005 Jan 16 ''


Looks very good on a common public computer with no particular extras added. This is a REAL improvement! Kudos!place pensive Ruhrjung/Ruhrjung 13:41, Jan 24, 2005

Attention, Australia!

Dear anonymous user from Australia (203.164.184.61, etc.),

Why do you keep changing this template? It's set up to work around a font-display inadequacy in MS Internet Explorer for Windows, and to not do anything in other web browsers. There's an explanation in re expected #Technical details, above. If you're changing it for another reason, please let us know here.

You can override the font display for yourself only, by putting something like the following in your browser's user style sheet, or by registering as a Wikipedia user and putting it in your own Wikipedia style sheet. Registration has other benefits, too.

.IPA /, as otherwise a spurious space will appear after the leading slash or bracket. I realised this after seeing some of my edits corrected by Angr. User:Ross Burgess/rossb 06:57, 18 Feb 2005

: Yup. I don't think it used to do this; anyone know if template behaviour has changed in the last week or two? ''—User:Mzajac /Michael User talk:Mzajac /Z. 2005-02-18 16:13 Z''