From 65df20b04f9392c1522d72c87725da6825e1940c Mon Sep 17 00:00:00 2001 From: Just Date: Thu, 23 Dec 1999 14:44:59 +0000 Subject: [PATCH] added browseTTFont() function. git-svn-id: svn://svn.code.sf.net/p/fonttools/code/trunk@32 4cde692c-a291-49d1-8350-778aa11640f8 --- Lib/fontTools/ttLib/test/ttBrowser.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/Lib/fontTools/ttLib/test/ttBrowser.py b/Lib/fontTools/ttLib/test/ttBrowser.py index 67d0f7916..fb67736a9 100644 --- a/Lib/fontTools/ttLib/test/ttBrowser.py +++ b/Lib/fontTools/ttLib/test/ttBrowser.py @@ -332,3 +332,20 @@ def qcurveto(pt0, pt1, pt2, done_moveto): ATM.fillCurveToATM((x1a, y1a), (x1b, y1b), (x2, y2)) return pt2 + +def browseTTFont(): + fss, ok = macfs.StandardGetFile() + if not ok: + return + path = fss.as_pathname() + indices = macUtils.getSFNTResIndices(path) + if indices: + for i in indices: + TableBrowser(path, res_index=i) + else: + TableBrowser(path) + + +if __name__ == "__main__": + browseTTFont() +