pax_global_header00006660000000000000000000000064137277410510014521gustar00rootroot0000000000000052 comment=0fe81a08dee6e7614c0f196e6668a9aafaad0d3e GlyphsInfo-master/000077500000000000000000000000001372774105100144405ustar00rootroot00000000000000GlyphsInfo-master/Convert to tabbed file.py000066400000000000000000000060621372774105100211430ustar00rootroot00000000000000# -*- coding: utf-8 -*- inputFilePath = "/Path/To/File/GlyphData.txt" import sys, os if len(sys.argv) > 1: inputFilePath = sys.argv[1] if len(inputFilePath) < 5: print "Please supply a path to a file. This can be either a GlyphData.xml or a tab separated .txt file" exit() if not os.path.isfile(inputFilePath): print "Could not find file at path:", inputFilePath exit() # This list defineds the columns and ordering in the tabbed file. fields = ["unicode", "name", #"unicode2", "sortName", "sortNameKeep", "decompose", "category", "subCategory", "script", "production", "altNames", "description", "anchors", "accents"] def writeTabbedHeader(File): line = "\t".join(fields)+"\n" File.write(line) def writeTabbedContent(inputFilePath, outFile): import xml.etree.ElementTree tree = xml.etree.ElementTree.parse(inputFilePath).getroot() i = 0 for node in tree.iter(): if node.tag != "glyph": continue nodeAttribs = dict(node.attrib) attribs = [] for field in fields: attrib = nodeAttribs.get(field, "") if field == "unicode" and len(attrib) > 0: attrib = "\"%s\"" % attrib # Excel and Number import is as numbers anyway but you got to try attribs.append(attrib) try: nodeAttribs.pop(field) except: pass if len(nodeAttribs) > 0: print "Attributes not written:", node.attrib["name"], nodeAttribs line = "\t".join(attribs)+"\n" outFile.write(line.encode("utf-8")) def writeDataHeader(File): File.write('\n\ \n\ \n\ \n\ ]>\n\ \n') def writeDataContent(inputFilePath, outFile): import codecs inFile = codecs.open(inputFilePath, "r", "utf-8") fields = inFile.readline().strip('\n').split("\t") print "Reading Fields:",", ".join(fields) for line in inFile: attribs = line.strip('\n').split("\t") line = u' 0: attrib = attrib.strip("\"") line += u'%s="%s" ' % (field, attrib) line += '/>\n' outFile.write(line.encode("utf-8")) outFile.write('\n') inFile.close() if inputFilePath[-4:] == ".xml": print "To Tabbed", inputFilePath outputFilePath = inputFilePath[:-4]+".txt" outputFile = open(outputFilePath, "w") writeTabbedHeader(outputFile) writeTabbedContent(inputFilePath, outputFile) outputFile.close() elif inputFilePath[-4:] == ".txt": print "To XML: ", inputFilePath outputFilePath = inputFilePath[:-4]+"_new.xml" outputFile = open(outputFilePath, "w") writeDataHeader(outputFile) writeDataContent(inputFilePath, outputFile) outputFile.close() GlyphsInfo-master/GlyphData.xml000066400000000000000000216450451372774105100170600ustar00rootroot00000000000000 ]> GlyphsInfo-master/GlyphData_Ideographs.xml000066400000000000000000103565611372774105100212250ustar00rootroot00000000000000 ]> GlyphsInfo-master/LICENSE000066400000000000000000000020701372774105100154440ustar00rootroot00000000000000The MIT License (MIT) Copyright (c) 2016 Georg Seifert Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. GlyphsInfo-master/README.md000066400000000000000000000050071372774105100157210ustar00rootroot00000000000000# GlyphsInfo This is the basic subset of the glyph info that is used inside Glyphs.app. ## Readable Names the glyph names are derived from the AGL with some adjustments. For glyphs not in that list a name is invented. It’s mostly based on the unicode description but heavily edited to produce short and readable names. To distinguish different scripts, a hyphen+script tag is appended. For common scripts like Arabic and Cyrillic a short version is used (-ar, -cy). Most other scripts just get the full script name to make it easier for people that are not familiar with those scripts. ## Ideograph Entries The Ideographs and Han glyphs are in a separate file to make it more manageable. ## Contribution Please fork the repository and send pull requests for missing scripts, changes and misspellings. ## Todo and known issues The list does not cover the full Unicode. I add script ranges on request as i like to check/edit the results and that is easier if someone involved in that script is around. ## Notices ### Contains Information for the `Adobe AGL`: Copyright 2002, 2010, 2015 Adobe Systems Incorporated. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. Neither the name of Adobe Systems Incorporated nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. GlyphsInfo-master/write simple GlyphData.py000066400000000000000000000046161372774105100212630ustar00rootroot00000000000000#MenuTitle: write simple GlyphData # -*- coding: utf-8 -*- infos = GSGlyphsInfo.sharedManager().glyphInfos() # or: # infos = GSGlyphsInfo.alloc().initWithLocalFile_(NSURL.fileURLWithPath_("path to custom GlyphData.xml file")) f = open("GlyphData.xml", "w") fIdeo = open("GlyphData_Ideographs.xml", "w") def writeHeader(f): f.write('\n\ \n\ \n\ \n\ ]>\n\ \n') writeHeader(f) writeHeader(fIdeo) disabledGlyphs = ["brevecomb_acutecomb", "brevecomb_gravecomb", "brevecomb_hookabovecomb", "brevecomb_tildecomb", "circumflexcomb_acutecomb", "circumflexcomb_gravecomb", "circumflexcomb_hookabovecomb", "circumflexcomb_tildecomb", "idotaccent.sc", "i.sc", ] forcedGlyphs = ["ringcenter-ar"] def printInfo(info): string = ' 0: isUniName = True except: pass if info.script == "han" and isUniName: fIdeo.write(printInfo(info)) elif (info.name in disabledGlyphs or info.name.endswith(".case") or (info.script == "arabic" and info.unicode is None)) and (info.name not in forcedGlyphs): continue else: f.write(printInfo(info)) count += 1 print "Written %d entries" % count f.write('\n') fIdeo.write('\n') f.close() fIdeo.close()