6

I'm searching for UTF-8 fonts to add it to my webpage, but I don't find.

(function() {
  var link_element = document.createElement("link"),
    s = document.getElementsByTagName("script")[0];
  if (window.location.protocol !== "http:" && window.location.protocol !== "https:") {
    link_element.href = "http:";
  }
  link_element.href += "//fonts.googleapis.com/css?family=Josefin+Slab:100italic,100,300italic,300,400italic,400,600italic,600,700italic,700";
  link_element.rel = "stylesheet";
  link_element.type = "text/css";
  s.parentNode.insertBefore(link_element, s);
  document.getElementsByTagName("html")[0].style.fontStyle = "Josefin Slab";
})();
* {
  font-family: "Josefin Slab";
  font-size: 30px;
}
This happens when I write Ő, Ű, ő or ű

I want to display "Ő", "Ű", "ő" and "ű". Can someone help?

Tamás
  • 950
  • 2
  • 10
  • 29

3 Answers3

11

UTF-8 is an encoding, a way of representing Unicode. Unicode is, in effect, a list of all characters, punctuation, spaces etc. a user might need to make in a piece of text.

You probably don't need a single font that supports Arabic, Hindi and Chinese, indeed very few fonts try to cover anything like the whole Uniocde code space.

Many fonts are compatible with Unicode (most nowadays), but you need to think about which parts of Unicode you want. Most fonts only try to cover a few languages, or a group of related scripts, like Latin, Greek and Cyrillic. For instance, it sounds like you want good coverage of Latin letters including accented forms.

It looks like you're interested specifically in Slab Serif fonts available through Google Web Fonts. I suggest you start by looking at Roboto Slab which has decent coverage (including all those glyphs you use in your question) and comes in four weights.

user52889
  • 1,501
  • 8
  • 16
2

"Josefin Slab" (Google Fonts) has only the Latin characters support.
You should find a font where you can pick the Latin Extended extension.

enter image description here

For example "Josefin Sans" is such font.

"//fonts.googleapis.com/css?family=Josefin+Sans" // Latin only, same issue
"//fonts.googleapis.com/css?family=Josefin+Sans&subset=latin,latin-ext" // WORKS!
Roko C. Buljan
  • 196,159
  • 39
  • 305
  • 313
1

A "UTF-8 font" makes no sense; UTF-8 is a way of specifying (or "encoding") the values of which Unicode characters you want to display on the screen. If those characters exist in your font then they can be displayed. So what you want is a Unicode font and, yes, there are very very many … though most support only a subset of the over 110,000 scripts and symbol sets.

For what it's worth, the snippet in your question displays correctly for me using Chrome 39 on Windows 7; some other browsers are not so good displaying Unicode so consider that as well.

Lightness Races in Orbit
  • 378,754
  • 76
  • 643
  • 1,055