How to retrieve contents of a NameRecord in Fonttools?
Options

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.8K Typeface Design
- 476 Type Design Critiques
- 555 Type Design Software
- 1.1K Type Design Technique & Theory
- 640 Type Business
- 831 Font Technology
- 29 Punchcutting
- 508 Typography
- 120 Type Education
- 313 Type History
- 75 Type Resources
- 109 Lettering and Calligraphy
- 30 Lettering Critiques
- 79 Lettering Technique & Theory
- 533 Announcements
- 86 Events
- 110 Job Postings
- 167 Type Releases
- 169 Miscellaneous News
- 274 About TypeDrawers
- 53 TypeDrawers Announcements
- 119 Suggestions and Bug Reports