You are here: Re: Hyphens and IE, an observation « HTML « IT news, forums, messages
Re: Hyphens and IE, an observation

Posted by Jukka K. Korpela on 10/25/07 20:21

Scripsit Dylan Parry:

> I do find it strange how something as simple as a hyphen is not
> included within common fonts.

The Unicode HYPHEN U+2010 is simple as such, but it's something rather new
in terms of character code standards, and no common keyboard layout lets you
type it directly. It has been used very little, and few people know about
it. It normally takes hours to explain the difference between it and the
"ASCII hyphen" - to an educated person (others won't get it at all).

According to the Unicode standard, it's the recommended character for
punctuation hyphen, as in "up-to-date". But this doesn't make it much more
popular, and as you have seen, it mostly fails when you try to use it on web
pages.

> A quick test using character map shows
> that the hyphen is not included in Arial, nor in Times New Roman. It
> is included in Calibri and Calmbria though

Indeed. That was interesting. Calibri and Cambria aren't that great in
character repertoire, but they do have HYPHEN U+2010. On the other hand, it
appears to have a glyph that is completely identical with the "ASCII hyphen"
(HYPHEN-MINUS, U+002D), so you don't much by using it. (As characters, they
may still have different properties in processing.)

That's permitted by standards (they don't mandate the lengths of hyphens),
but the general idea is that HYPHEN is assumed to be a traditional hyphen
character in appearance, EN DASH is assumed to be considerably longer, and
ditto for MINUS SIGN, whereas HYPHEN-MINUS is supposed to have "medium
length" since it has to do the jobs of all those characters. In practice,
that's not how it works, though.

As an exception, in Lucida Sans Unicode, HYPHEN is much shorter (and better
for use as hyphen) than HYPHEN-DASH. But that's because its HYPHEN-DASH is
far too long, actually even slightly longer than EN DASH! That's a good
reason for not using Lucida Sans Unicode except in special occasions.

> IE7 appears to be choosing the hyphen glyph from Arial Unicode MS,
> which as a larger font causes the display error I experienced.

It's not really larger or, rather, the size does not matter as such. What
matters is that it has an x-height larger than your basic font, and HYPHEN
(as well as HYPHEN-MINUS, which has identical glyph in Arial Unicode MS) is
normally placed near half of the x-height. So when it appears near letters
from another font, the odds are that it appears in too high a vertical
position.

You're seeing it in Arial Unicode MS because you have Microsoft Office
software installed; the font comes along with that (though it's not always
installed with it). People who don't have it will probably see HYPHEN in
Lucida Sans Unicode, resulting in a similar problem.

This indicates that font mixing is rather problematic. You could set you
page's font to Arial Unicode MS and have a uniform appearance where HYPHEN
looks OK - but only when that font is available, and it's really not a great
font. You might set it to Cambria or Calibri, which might be fine for people
who have it - but they're still a minority. Using Lucida Sans Unicode is
questionable for several reasons. Finally, you could use a font-family
setting with a nice list of fonts, but those fonts would be rather different
from each other, so what would you base your styling on? (Font choice tends
to affect many design choices. For example, Arial Unicode MS tends to
require a fairly large line-height, which would not be that nice to
Calibri.)

> From these experiments, and reading the replies here, it's obvious
> that the hyphen character is simply not ready to be used on the Web,

Yes, that's the practical conclusion.

> despite it being such a commonly-used character,

This depends on your definition of "character". As an element of coded
character sets, HYPHEN is rarely used.

> and as such I'll
> have to stick to the damned hyphen-minus, the illegitimate child of
> ASCII :)

Yes, it'll have to do the job of HYPHEN. But you can use EN DASH as a dash
(in punctuation, in denoting ranges, etc.) and the MINUS SIGN as a
mathematical operator. They work pretty well these days, both in text
processing and on web pages.

--
Jukka K. Korpela ("Yucca")
http://www.cs.tut.fi/~jkorpela/

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация