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
- 43 Introductions
- 3.7K Typeface Design
- 803 Font Technology
- 1K Technique and Theory
- 622 Type Business
- 444 Type Design Critiques
- 542 Type Design Software
- 30 Punchcutting
- 136 Lettering and Calligraphy
- 83 Technique and Theory
- 53 Lettering Critiques
- 485 Typography
- 303 History of Typography
- 114 Education
- 68 Resources
- 499 Announcements
- 80 Events
- 105 Job Postings
- 148 Type Releases
- 165 Miscellaneous News
- 270 About TypeDrawers
- 53 TypeDrawers Announcements
- 116 Suggestions and Bug Reports