Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions site_scons/iconfont.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,16 @@
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.


#importing the library

import fontforge
import os
import base64
import json

#creating icon font

def CreateIconFont(name, files, target):
font = fontforge.font()

Expand All @@ -44,6 +49,8 @@ def CreateIconFont(name, files, target):
char = 0xE000

mapping = { }

#managing scalar vector grapics

for svg in files:
if os.path.splitext(svg)[1] == ".svg":
Expand Down Expand Up @@ -105,6 +112,7 @@ def CreateIconFont(name, files, target):
)
for key in mapping
]) + "\n"


f_css = open(target, "w")
f_css.write(css.encode("utf-8"))
Expand Down