Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > Fractions Won't Display Properly in Any Browser

Fractions Won't Display Properly in Any Browser
Thread Tools
Mac Elite
Join Date: Nov 2003
Location: Rockville, MD
Status: Offline
Reply With Quote
Apr 13, 2005, 07:00 PM
 
I have long wished to display typographically legible and consistent-looking fractions in the various web browsers. So, naturally I first tried using Unicode. What a disaster! Check this out.

METHOD 1
These codes (initial ampersand omitted) for one-third, two-thirds, one-fifth, one-quarter, and one-half (in that order):
Code:
#x2153; #x2154; #x2155; #x00bc; #x00bd;
... looks like this (bad):
⅓ ⅔ ⅕ ¼ ½

METHOD 2
I also tried turning away from the single-character glyphs by using three characters for each fraction, superscript-slash-subscript for one-third, two-thirds, one-fifth, one-quarter, and one-half (in that order):
Code:
#x00b9; #47; #x2083; #x00b2; #47; #x2083; #x00b9; #47; #x2085; #x00b9; #47; #x2084; #x00b9; #47; #x2082;
which looks like this (better at least in a sans-serif font but not in others. Although it looks pretty good in the higher sizes of Lucida Grande, I haven't been able to find a common Windows font that does as good a job):
¹/₃ ²/₃ ¹/₅ ¹/₄ ¹/₂

METHOD 3
Finally, there's one really horsey-looking workaround that I think you'll agree does NOT look good:
Code:
<sup>1</sup>/<sub>/3</sub> <sup>2</sup>/<sub>3</sub> <sup>1</sup>/<sub>5</sub> <sup>1</sup>/<sub>4</sub> <sup>1</sup>/<sub>2</sub>
... which I can't get to display properly in vCode, so you'll just have to try it.

None of these methods really produces results good enough to use on a public, multiplatform website. Why????

Wherein lies the problem? With the Unicode standard itself? The browsers? The text encodings? The operating systems? Why hasn't this been fixed?

Also, please do not tell me to use inline images. I will not do that.
(Last edited by selowitch; Apr 15, 2005 at 01:49 PM. )
     
Clinically Insane
Join Date: Nov 1999
Status: Offline
Reply With Quote
Apr 14, 2005, 05:26 AM
 
What text encoding are you using for the pages? UTF-8? Latin-1? Something else?
You are in Soviet Russia. It is dark. Grue is likely to be eaten by YOU!
     
Mac Elite
Join Date: Nov 2003
Location: Rockville, MD
Status: Offline
Reply With Quote
Apr 14, 2005, 08:34 AM
 
Mmmm. Yesterday, my codes for the fraction glyphs displayed as they look on the web. But today, with the new version of MacNN forums, they do not. I wonder if there's a setting somewhere that affects that?
(EDIT: Yep, looks like HTML code flag is set to "false").

In response to what Millenium is asking, I've tried playing with the encodings (utf-8, utf-32, iso-whatever) to no visible effect.

Has anybody else struggled with this? We have to be able to do this properly. Isn't it fairly common to want to use fractions (and not decimals) when dealing with, say, inches and feet?
(Last edited by selowitch; Apr 15, 2005 at 01:50 PM. )
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 07:25 PM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2