📜 ⬆️ ⬇️

Ruble sign on the website: express method

Ruble sign

Task


Without a headache, start using the ruble sign on the site

Idea


Freely distributed (including for use on the web) fonts like PT Sans and PT Serif have a ruble sign among the characters. If you use these fonts on the site, then you can do without unnecessary html-code, css-tambourines, vector graphics and other Jedi perversions to solve the problem.

Google to the rescue


Google has a kind of great Web Fonts service that makes it very easy and legal to use fonts on web pages. There are not so many Cyrillic fonts there, but we need PT Sans and PT Serif. In addition, for each browser, Google gives its css-code and the desired font file format.
')
This is done to ugliness simply:

1. Connect the css-file with the font we need:
<link href="http://fonts.googleapis.com/css?family=PT+Sans:regular,italic,bold,bolditalic"
rel="stylesheet" type="text/css" />

2. font-face:
.price {
  font-family: 'PT Sans', serif;
  }

3. :
<span class="price">999 &#8399;</span>


?


Internet Explorer , , .

, Fontsquirrel @font-face Kit ( Cyrillic Subset, Don't Subset — ).

, .




Google Fonts API - ( «», «») , . .


PT Sans PT Serif &#8377; &#8399;. , 20B9—20CF . , 22 «».

6.0 U+20B9 . , «» &#8399; .

. ⃏, , .

Source: https://habr.com/ru/post/122191/


All Articles