added unit tests; fixed sortFontNames function