如何合并字体? [英] How to merge fonts?

查看:104
本文介绍了如何合并字体?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一些字体,




  • OpenSans-bold.ttf

  • < boldItalic.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.ttf
  • OpenSans-boldItalic.ttf
  • OpenSans-extrabold.ttf
  • OpenSans-italic.ttf
  • OpenSans-light.ttf

How 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.

这篇关于如何合并字体?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆