Miguel Moura
Miguel Moura

Reputation: 39374

Is there a polyfill for HTML characters?

I have the following characters on a website: ❱ ❱ The codes are:

❱ ❱

In IE8 the characters do not display.

Is there any polyfill for this? I do not know what to look for.

Thank You, Miguel

Upvotes: 2

Views: 122

Answers (2)

CJdriver
CJdriver

Reputation: 458

You could import your own icon pack. I use Font Awesome on a lot of my projects and haven't seen any performance issues. http://fortawesome.github.io/Font-Awesome/icons/

fa-angle-right seems to resemble the right arrow you're trying to add.

There are multiple ways to import the pack, but the easiest is to use the BootstrapCDN they provide and pasting the following into the head of your page

<link href="//maxcdn.bootstrapcdn.com/font-awesome/4.1.0/css/font-awesome.min.css" rel="stylesheet">

After that it's just a matter of placing the icon on your page wherever you need it.

<i class="fa fa-angle-right"></i>

I've tested this on Windows XP - IE8 as well as Safari iOS 7 and the icons display.

Upvotes: 0

Jukka K. Korpela
Jukka K. Korpela

Reputation: 201568

No, polyfills cannot solve problems like this. What you can do is (apart from using an image, which circumvents the problem instead of solving it)

  • to set up a list of fonts that are known to contain the character (in an acceptable shape) and declare it as a value for font-family; if you do this, fileformat.info information about the font support is a good starting point
  • find a suitable free font that contains the character, e.g. DejaVu Sans, and use that font as a web font (downloadable font) via @font-face.

For some additional notes, see my Guide to using special characters in HTML.

Upvotes: 1

Related Questions