Blame tools/generate_rename_glyph_list.py

Packit 7179fe
#!/usr/bin/python
Packit 7179fe
# -*- coding: utf-8 -*-
Packit 7179fe
Packit 7179fe
# Copyright (C) 2012, Aravinda VK <hallimanearavind@gmail.com>
Packit 7179fe
#                          http://aravindavk.in
Packit 7179fe
Packit 7179fe
# This program is free software: you can redistribute it and/or modify
Packit 7179fe
# it under the terms of the GNU General Public License as published by
Packit 7179fe
# the Free Software Foundation, either version 3 of the License, or
Packit 7179fe
# (at your option) any later version.
Packit 7179fe
Packit 7179fe
# This program is distributed in the hope that it will be useful,
Packit 7179fe
# but WITHOUT ANY WARRANTY; without even the implied warranty of
Packit 7179fe
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
Packit 7179fe
# GNU General Public License for more details.
Packit 7179fe
Packit 7179fe
# You should have received a copy of the GNU General Public License
Packit 7179fe
# along with this program. If not, see <http://www.gnu.org/licenses/>.
Packit 7179fe
Packit 7179fe
import sys
Packit 7179fe
import fontforge
Packit 7179fe
Packit 7179fe
font = fontforge.open(sys.argv[1])
Packit 7179fe
Packit 7179fe
for i in font.glyphs():
Packit 7179fe
    if i.unicode != -1:
Packit 7179fe
        print "%s : %s" %(i.glyphname, "U" + hex(i.unicode).replace("0x", "").upper().zfill(4))
Packit 7179fe
    else:
Packit 7179fe
        print "%s : " %(i.glyphname)