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
- 489 Type Design Critiques
- 568 Type Design Software
- 1.1K Type Design Technique & Theory
- 662 Type Business
- 868 Font Technology
- 29 Punchcutting
- 526 Typography
- 121 Type Education
- 326 Type History
- 79 Type Resources
- 112 Lettering and Calligraphy
- 33 Lettering Critiques
- 79 Lettering Technique & Theory
- 564 Announcements
- 95 Events
- 116 Job Postings
- 170 Type Releases
- 182 Miscellaneous News
- 278 About TypeDrawers
- 55 TypeDrawers Announcements
- 121 Suggestions and Bug Reports
