Update (based on updated question)
Apparently, the generated OTF font is incorrectly encoded for the Internet - all browsers have different font rendering mechanisms, and decoding of this file fails in Chrome and Firefox, and even Font Squirrel reports. The font is damaged and cannot be converted. Oddly enough, Safari works great.
If you want to use the features of the Roboto font, you will have to create your own web fonts. I created a demo page demonstrating some features of the Roboto font with various web fonts ( woff2 , woff , otf , ttf ) by following these steps:
After running make in the google / roboto repository, you should get the TTF fonts in the RobotoTTF directory. These files include all the features of the Roboto font, and you can use them to create web font files. If you want, you can even use TTF fonts:
@font-face { font-family: 'Roboto'; font-style: normal; font-weight: 400; src: local('Roboto'), local('Roboto-Regular'), url('./Roboto-Regular.ttf') format('truetype'); }
although your file size will be large, and you should definitely convert them to other web font formats ( woff2 gives better results and is supported in all modern browsers ) to significantly reduce the file size, so your @font-face ad will:
@font-face { font-family: 'Roboto'; font-style: normal; font-weight: 400; src: local('Roboto'), local('Roboto-Regular'), url('./Roboto-Regular.woff2') format('woff2'); }
You can also enable and use the font features in the generated web fonts and use them in your CSS code:
.yourclass { font-feature-settings: ...; }
There are many tools you can use online and on your computer. I tried the following, which work pretty well, preserving the OpenType features in the generated web fonts:
On the side note you can find LCDF Typetools , especially otfinfo use as otfinfo -f Roboto-Regular.ttf list of all the functions supported by the font.
Here are the features for the Roboto font:
- c2sc - Small capitals from capitals
- ccmp - Composition / decomposition of glyphs
- cpsp - Capital Space
- dlig - discretionary ligatures
- dnom - denominators
- Fraction - Fractions
- kern - kerning
- liga - Standard Ligatures
- lnum - Lining
- mark - Mark Positioning
- mkmk - Mark to mark positioning
- numr - Numerals
- onum - Old figures
- pnum - Proportional Indicators
- salt - stylistic alternatives
- smcp - Small capitals
- ss01 - Stylistic Set 1
- ss02 - Stylistic Set 2
- ss03 - Stylistic Set 3
- ss04 - Stylistic Set 4
- ss05 - Stylistic Set 5
- ss06 - Stylistic Set 6
- ss07 - Stylistic Set 7
- tnum - Tabular data
- unic - unicase
Hope you find this helpful.
** Deleted as not relevant to the updated question