The Birdfont Source Code


All Repositories / birdfont.git / commitdiff – RSS feed

Remove hyphen in the full name field (Name table)

These changes was commited to the Birdfont repository Thu, 24 Aug 2017 17:40:04 +0000.

Contributing

Send patches or pull requests to johan.mattsson.m@gmail.com.
Clone this repository: git clone https://github.com/johanmattssonm/birdfont.git
[Thu, 24 Aug 2017 17:40:04 +0000]

Updated Files

libbirdfont/KerningTools.vala
libbirdfont/OpenFontFormat/NameTable.vala
--- a/libbirdfont/KerningTools.vala +++ b/libbirdfont/KerningTools.vala @@ -245,7 +245,6 @@ } } - kerning_class.h += 50; classes.add_tool (kerning_class); }
--- a/libbirdfont/OpenFontFormat/NameTable.vala +++ b/libbirdfont/OpenFontFormat/NameTable.vala @@ -152,7 +152,11 @@ public string validate_full_name (string s) { string n = name_validation (s, true); string regular_suffix = " Regular"; - + + n = n.replace ("-Regular", " Regular"); + n = n.replace ("-Bold", " Bold"); + n = n.replace ("-Italic", " Italic"); + if (n.has_suffix (regular_suffix)) { n = n.substring (0, n.length - regular_suffix.length); }