How to retrieve contents of a NameRecord in Fonttools?
Jason Campbell
Posts: 100
This will get me the list of name table entries:
ttfont = TTFont(filename)
print str(ttfont['name'].names)
But what if I want to retrieve the associated record, like retrieve the copyright as a string?
I was hoping this would work:
But what if I want to retrieve the associated record, like retrieve the copyright as a string?
I was hoping this would work:
ttfont = TTFont(filename)
print str(ttfont['name'].getName(0,1,0))
but that just returns:
but that just returns:
<NameRecord NameID=0; PlatformID=1; LanguageID=0>
thanks!
0
Comments
-
print ttfont['name'].getName(0,1,0).string
0 -
thanks, I knew I must be missing something simple!0
Categories
- All Categories
- 46 Introductions
- 3.9K Typeface Design
- 487 Type Design Critiques
- 563 Type Design Software
- 1.1K Type Design Technique & Theory
- 655 Type Business
- 859 Font Technology
- 29 Punchcutting
- 520 Typography
- 119 Type Education
- 324 Type History
- 77 Type Resources
- 112 Lettering and Calligraphy
- 33 Lettering Critiques
- 79 Lettering Technique & Theory
- 558 Announcements
- 94 Events
- 114 Job Postings
- 170 Type Releases
- 179 Miscellaneous News
- 276 About TypeDrawers
- 54 TypeDrawers Announcements
- 120 Suggestions and Bug Reports
