def parse_filename(self, filename): """Parse expected name attributes from filename.""" name_nosp = self.family_name.replace(' ', '') condensed_name_nosp = self.condensed_family_name.replace(' ', '') family_names = '%s|%s' % (condensed_name_nosp, name_nosp) filename_match = noto_fonts.match_filename(filename, family_names) family, _, _, _, _, _, _, _, weight, slope, _ = filename_match.groups() if family == condensed_name_nosp: family = self.condensed_family_name else: # family == name_nosp family = self.family_name if not weight: weight = 'Regular' return family, weight, slope