我可以将嵌入式base64编码字体转换为字体文件吗? [英] Can I convert embedded base64 encode font to a font file?

查看:852
本文介绍了我可以将嵌入式base64编码字体转换为字体文件吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

  @ font-face {
字体家族:'F';
src:url()format(embedded-opentype),
url(data:application / x-font-woff; charset = utf-8; base64,d09GRgABAA ...等等。 .. ETC

可以将其转换为字体文件吗?

谢谢!

解决方案

复制base64编码的部分并转换它。

Linux

  base64 -d base64_encoded_font.txt> font.woff 

Mac OS X

  openssl base64 -d -in base64_encoded_font.txt -out font.woff 
$ b

WIndows



转至 http://www.motobit.com/util/base64-decoder-encoder.asp 并粘贴文本。选择解码数据Base64字符串(base64解码)和导出为二进制文件。


I have an @font-face rule, and its look like this:

@font-face{
    font-family:'F';
src:url("") format("embedded-opentype"),
url(data:application/x-font-woff;charset=utf-8;base64,d09GRgABAA ... ETC... ETC

Can i convert this to a font file?

Thanks!

解决方案

Copy the base64 encoded part and convert it. There are many ways to do that.

Linux

base64 -d base64_encoded_font.txt > font.woff

Mac OS X

openssl base64 -d -in base64_encoded_font.txt -out font.woff

WIndows

Go to http://www.motobit.com/util/base64-decoder-encoder.asp and paste the text. Choose "decode the data from a Base64 string (base64 decoding)" and "export to a binary file".

这篇关于我可以将嵌入式base64编码字体转换为字体文件吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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