Actually quit when the window is closed.
Refactor font panel.

I also fixed the bug of not being able to set the font family.