custom font problem in opera
I am using css font import property for a custom font to use in my website. fonts are "LeagueGothic.otf" and "DroidSans.ttf". all browsers are behaving perfect except opera(v-11.50). the fonts are not smooth. they have broken ages and that looks ugly. cufon works perfect but I do not want to use it. is there any solution for this? thanks a lot. you ca开发者_运维百科n have look at my css code style -
@font-face {
font-family: DroidSans;
src: url(DroidSans.ttf);
}
@font-face {
font-family: League Gothic;
src: url(LeagueGothic.otf);
}
body { color: #333333; font-family:'DroidSans',Arial; font-size:14px; line-height:20px;}
h1, h2, h3, h4, h5, h6, a{font-family: "League Gothic","Arial Narrow","Arial",sans-serif; font-weight: lighter; text-transform: uppercase;}
The Opera team has embedded a new font rendering module to support ".WOFF" formats into the Opera browser. They started using this new module since Opera 11.10. Try converting your font ".ttf" and ".otf" formats into ".WOFF" and it should be compatible with Microsoft, Mozilla and Opera browsers. I included a link here to support my answer.
http://dev.opera.com/articles/view/introducing-woff-web-open-font-format/#introduction
@font-face {
font-family: 'raleway';
src: url('raleway_thin-webfont.woff') format('woff');
font-style: normal;
}
em {
font-family: raleway, serif;
color: #F45355;
}
Also incase someone else wants to look through the Opera docs about their fonts. http://www.opera.com/docs/specs/presto29/css/fonts/
Opera is only browser, that not supports custom fonts with css. I don't know why but this is stupid. I don't care Opera customers/viewers same as peoples using text browsers. They don't like new things, ok.
Other way if you don't want cufon, is typekit https://typekit.com/ For personal pages this is free, but this is similar way as cufon.
I solved this problem.I use fontsquirrel.com or like this tool to generate webfont and this works fine in all browsers.
精彩评论