Skip to content

Define default fonts#1

Open
arhpreston wants to merge 1 commit intobettsmatt:masterfrom
arhpreston:defaults
Open

Define default fonts#1
arhpreston wants to merge 1 commit intobettsmatt:masterfrom
arhpreston:defaults

Conversation

@arhpreston
Copy link

A few minor improvements:

  • Sensible default fonts (Times New Roman and Arial Bold) so users don't need to add any config to get up and running
  • New method get_font to allow users to specify just the font name (rather than full path to font)

@bettsmatt
Copy link
Owner

Sensible defaults are good. I'm not sure trying to find where fonts are installed per platform is the best approach. Could we include fonts in the package instead?

@arhpreston
Copy link
Author

Could we include fonts in the package instead?

I guess you could package free fonts. Coding the paths for different distros works fine too. Your call.

@bettsmatt
Copy link
Owner

Tried to merge and it broke.

  • I think the platform should be .startswith('linux').
  • Error messages are now not as friendly when the config is missing and the platform is not recognised (runtime vs startup error).
  • Scanning multiple directories will slow everything down (this should be moved to some kind of set up anyway).

Alternatively we could check for system fonts when the module is loaded and then throw an exception after loading if none are found. We could also read these or a subset of them in to prevent looking up the font in every request.

bettsmatt added a commit that referenced this pull request Dec 7, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants