rosettatype / hyperglot

Hyperglot: a database and tools for detecting language support in fonts
http://hyperglot.rosettatype.com
GNU General Public License v3.0
166 stars 23 forks source link

Filter / sort option by number of speakers ? #78

Closed RosaWagner closed 2 years ago

RosaWagner commented 2 years ago
kontur commented 2 years ago

Sounds useful. I'll probably have time to add this in end of May.

kontur commented 2 years ago

Having to delay this to June.

kontur commented 2 years ago

@RosaWagner If you check out dev you can try:


$ hyperglot path/to/font.ttf --speakers
$ hyperglot path/to/font.ttf --speakers --sorting="speakers"
$ hyperglot path/to/font.ttf --speakers --sorting="speakers" --sort-dir="desc"

# the default output is equivalent to
$ hyperglot path/to/font.ttf --sorting="speakers" --sort-dir="asc"

With regards to the speaker "threshold" I wonder how useful it really is. Maybe the most essential would be a flag to remove languages with 0 speakers. At the same time I feel this could be up to the application entirely. What do you think?
kontur commented 2 years ago

Btw, if you feel you can think of other useful sorting attributes, feel free to add here, the item value is the sorting lambda that gets applied to each Language object.

RosaWagner commented 2 years ago

To answer your question, Languages with 0 speaker is still a useful information ;)

RosaWagner commented 2 years ago

Just testing it and it works super fine ;) thanks a lot for this feature!

kontur commented 2 years ago

Roger, in dev for now, will deploy to pip version with the next update.

kontur commented 2 years ago

Deployed as part of 0.4.0