More test + small performance improvements

Replaced lists with sets in a few places to prevent duplicated font
names