本文介绍了如何合并字体?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 29岁程序员,3月因学历无情被辞! 我有一些字体, OpenSans-bold.ttf OpenSans-extrabold.ttf OpenSans-italic.ttf OpenSans- ttf 我如何继续创建一个文件,反对这许多不同的文件? 例如 small {font-family:OpenSans; font-weight:normal;} strong {font-family:OpenSans; font-weight:bold;} h2 {font-family:OpenSans; font-weight:bolder;} 任何帮助都会被接受。解决方案在一个文件中组合多种字体的简单方法是将它们编码在base64中并将它们嵌入到CSS中。他们仍然会是不同的字体,但总大小会增加。有许多在线工具可以为您上传的字体文件创建css,例如这一个。 / p> I have a number of fonts,OpenSans-bold.ttfOpenSans-boldItalic.ttfOpenSans-extrabold.ttfOpenSans-italic.ttfOpenSans-light.ttfHow would I go on about to just create one file, as oppose to this many different files?And perhaps use them on CSS like I would normally, or like you would on photoshop?e.g.small{font-family:"OpenSans"; font-weight: normal;}strong{font-family:"OpenSans"; font-weight: bold;}h2 {font-family:"OpenSans"; font-weight: bolder;}Any help would be appriciated. 解决方案 An easy way to combine multiple fonts in one file is to encode them in base64 and embed them in CSS. They will still be different fonts though and the total size will increase. There are various online tools that can create the css for font files you upload, like this one. 这篇关于如何合并字体?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云!