我想在prestashop中使用"Roboto“字体。我收到了.psd文件中的设计和平面设计师使用的字体“机器人中”和“机器人常规”。我是否正确理解,当我想使用Roboto Normal时,我可以应用:
font- family: "Roboto"
font-weight: 400当我想使用Roboto Medium时,我应该应用:
font- family: "Roboto"
font-weight: 500换句话说,权重400和500是否分别等于Roboto Normal和Roboto Medium?
发布于 2014-11-04 16:28:07
发布于 2018-06-29 23:08:54
一开始我也对此感到有点困惑。
我有一个客户的请求,根据他们的风格指南,我需要为"Roboto","Roboto Medium","Roboto Light“等设置相应的字体。
看看谷歌的字体网站( https://fonts.google.com/specimen/Roboto ),他们显示了"Roboto“字体,然后是它的每一个变体的例子”中“,”轻“等。
但这涉及CSS中的两个设置,这一点并不明显。我最初的想法是这样设置它:
* {font-family: 'Roboto Light', 'Roboto Medium', 'Roboto', etc}但经过实验和一些研究后,它涉及到两个设置,一个是指定核心“族”,然后变化是这样的“权重”:
.Roboto{font-family:'Roboto';font-weight:400;} /* 400 is industry standard for normal */
.RobotoLight{font-familiy:'Roboto';font-weight:300;} /* 300 is industry standard for normal */
.RobotoMedium{font-family:'Roboto';font-weight:500;} /* 500 is industry standard for normal */https://stackoverflow.com/questions/26730431
复制相似问题