我正在尝试开发一个magento主题,除了一个,我想在我的magento主题中使用自定义字体,根据我的客户需求,字体是“eurostile阔德”,我在做的时候尝试了核心php,就像我把字体文件放在字体文件夹中并将字体文件夹放置到
D:\xampp\htdocs\clothing_site\skin\frontend\default\gwcc\
这个目录。现在,我在css中使用这个字体系列,并这样调用:
@font-face {
font-family: 'eurostile_extended_2regular';
src: url('fonts/eurostile_extended_2-webfont.eot');所有我想知道如何使用任何自定义下载的字体家庭在magento,任何帮助将不胜感激,感谢提前,谢谢提前。
发布于 2013-03-22 13:23:03
要在您的网站上使用自定义字体,您有3个选项。
您需要将字体转换为不同的格式,如.eot、.svg、.ttf、.woff,因为不同的浏览器支持不同的格式。然后,将这些字体添加到CSS中,例如:http://screencast.com/t/0KV17zkSri:http://screencast.com/t/ypgKHV7lSm,现在使用这样的字体:http://screencast.com/t/NheSnxPCE1SN
有几个在线服务可以将给定的格式转换为所有其他所需的格式,如http://www.fontsquirrel.com/tools/webfont-generator。如果这些服务黑名单你的字体,然后尝试搜索一个特定的格式,如"ttf到eot“,你会找到一些其他服务。
发布于 2014-04-06 15:24:28
@font-face {
font-family: 'Adobe Garamond Regular';
src: url('../fonts/Adobe Garamond Regular.eot');
src: url('../fonts/Adobe Garamond Regular.eot?#iefix') format('embedded-opentype'),
url('../fonts/Adobe Garamond Regular.woff') format('woff'),
url('../fonts/AGaramondPro-Regular.otf') format('otf'),
url('../fonts/Adobe Garamond Regular.ttf') format('truetype'),
url('../fonts/Adobe Garamond Regular.svg#Adobe Garamond Regular') format('svg');
font-weight: normal;
font-style: normal;
}
body{ font-family:'Adobe Garamond Regular'; } //added to code发布于 2013-03-22 13:05:05
https://stackoverflow.com/questions/15570860
复制相似问题