Implement font selector for text document based generators.

For now works only before opening file, but we need to use connect() for
this, and change font after it changed in GUI.