PackageDev
PackageDev copied to clipboard
Use `sublime.choose_font_dialog` when editing `font_face` setting
Since build 4156, ST has an sublime.choose_font_dialog API that opens a font choose dialog. Even though ST already provides its own menu entry to edit the main font (Preferences > Font > Choose…), PD could still offer to open the dialog for any Preferences file.
As for how exactly, I'm considering
- an
on_text_commandlistener that intercepts the command to open the auto complete popup, - a phantom with a link similar to the pencil icons we already show in the default preferences,
- …?
It appears the results of this API aren't exactly exciting when it comes to sub-families. Selecting any font of the Roboto Mono family (… Thin, … Light, … Regular, … Thin Italic, etc.) always results in {'font_face': 'Roboto Mono', 'font_size': 10}.