IcoMoon图标使用Base64植入CSS – Raychinki Studio
Ray
admin@raychinki.studio
Raychinki Studio
IcoMoon图标使用Base64植入CSS
IcoMoon图标使用Base64植入CSS

在修改主题模板的时候,有个别图标需要调整。找了了一下没发现这些图标的所使用的字体,最后发现字体居然一串Base64字符串。

于是就研究了一下,没想到CSS里面还可以通过Base64直接嵌入字体。之前就了解了不少免费的图标库,因为主体模板里使用的是IcoMoon,这里就以此为例:

  • 首先将主题模板中的字体提取出来:
    @font-face {
    font-family: 'icomoon';
    src: url(data:application/x-font-ttf;charset=utf-8;base64,AAEAAAALAIAAAwAwT1MvMg8SCA4AAAC8AAAAYGNtYXBPdE7OAAABHAAAAMxnYXNwAAAAEAAAAegAAAAIZ2x5ZnuSMuUAAAHwAAA0LGhlYWQUtGMlAAA2HAAAADZoaGVhCKIE4wAANlQAAAAkaG10eIEEBvoAADZ4AAAAiGxvY2H/3Ow0AAA3AAAAAEZtYXhwAFwKOAAAN0gAAAAgbmFtZZlKCfsAADdoAAABhnBvc3QAAwAAAAA48AAAACAAAwQIAZAABQAAApkCzAAAAI8CmQLMAAAB6wAzAQkAAAAAAAAAAAAAAAAAAAABEAAAAAAAAAAAAAAAAAAAAABAAADq3APA/8AAQAPAAEAAAAABAAAAAAAAAAAAAAAgAAAAAAADAAAAAwAAABwAAQADAAAAHAADAAEAAAAcAAQAsAAAACgAIAAEAAgAAQAg5gzmD+kC6TjpS+mU6ZrqgOqI6pzqtOrC6sXqzera6tz//f//AAAAAAAg5gDmD+kC6TjpS+mU6Zrqf+qI6pzqtOrC6sXqzerZ6tz//f//AAH/4xoEGgIXEBbbFskWgRZ8FZgVkRV+FWcVWhVYFVEVRhVFAAMAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAB//8ADwABAAAAAAAAAAAAAgAANzkBAAAAAAEAAAAAAAAAAAACAAA3OQEAAAAAAQAAAAAAAAAAAAIAADc5AQAAAAACAGkAKQOOA0cASQCNA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bBC2ERwSBBKSErIT9BQWFKYU4BUAFSgVghXcFsIW6BfmGAIYeBmsGhYAAAABAAAAIgo2ADkAAAAAAAIAAAAAAAAAAAAAAAAAAAAAAAAADgCuAAEAAAAAAAEABwAAAAEAAAAAAAIABwBgAAEAAAAAAAMABwA2AAEAAAAAAAQABwB1AAEAAAAAAAUACwAVAAEAAAAAAAYABwBLAAEAAAAAAAoAGgCKAAMAAQQJAAEADgAHAAMAAQQJAAIADgBnAAMAAQQJAAMADgA9AAMAAQQJAAQADgB8AAMAAQQJAAUAFgAgAAMAAQQJAAYADgBSAAMAAQQJAAoANACkaWNvbW9vbgBpAGMAbwBtAG8AbwBuVmVyc2lvbiAxLjAAVgBlAHIAcwBpAG8AbgAgADEALgAwaWNvbW9vbgBpAGMAbwBtAG8AbwBuaWNvbW9vbgBpAGMAbwBtAG8AbwBuUmVndWxhcgBSAGUAZwB1AGwAYQByaWNvbW9vbgBpAGMAbwBtAG8AbwBuRm9udCBnZW5lcmF0ZWQgYnkgSWNvTW9vbi4ARgBvAG4AdAAgAGcAZQBuAGUAcgBhAHQAZQBkACAAYgB5ACAASQBjAG8ATQBvAG8AbgAuAAAAAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==) format('truetype');
    font-weight: normal;
    font-style: normal;
    }
  • 提取其中的base64字符串,将其复制到https://www.motobit.com/util/base64-decoder-encoder.asp中,选择decode及export,导出字体源文件base64.bin。
  • 由CSS中字体的“x-font-ttf”属性可知,这是个ttf字体文件,可直接将base64.bin的扩展名改为base64.ttf,得到该字体文件,这时候就可以使用IcoMoon来编辑图标了。
    进入IcoMoon App:https://icomoon.io/app/,点击Import Icons上传base64.ttf,可以看到字体所带的矢量图标,可进行编辑、移动和删除操作,同时也可以加入IcoMoon图标库中免费的490个图标。
  • 选中自己需要的图标后,点击Generate Font,可生成矢量图标文件,包含woff、ttf、svg、eot及相对应的css和demo。
    但生成的文件是不包含base64的,这时候就需要用到https://www.css-js.com/tools/base64.html,将图标、字体文件转换为Base64字符串。
  • 最后将新的Base64替换主体模板原有的Base64就大功告成了!

Raychinki Studio

IcoMoon图标使用Base64植入CSS
在修改主题模板的时候,有个别图标需要调整。找了了一下没发现这些图标的所使用的字体,最后发现字体居然一串Base64字符串。 于是就研究了一下,没想到CSS里面还可以通过Base64直接嵌…
扫描二维码继续阅读
2019-01-09