enthought / enable

Enable: low-level drawing and interaction
Other
91 stars 45 forks source link

Map `MODERN` to `"monospace"` and `TELETYPE` to `"typewriter"` #977

Closed corranwebster closed 1 year ago

corranwebster commented 2 years ago

This changes font handling to:

Replaces uses of "modern" with "sans-serif" where appropriate (particularly in defaults) to keep appearances the same.

This now renders the benchmark like this (see the "mono" and "type" columns in particular): image

This is not backwards compatible: users who use "modern" font family will get different fonts, but it is easily fixed by changing the font family. So this should probably be part of a major release.

Fixes #974.

corranwebster commented 2 years ago

Converting this to draft as there are other paths which get to modern in a FontQuery object and which are causing failures. The approach here may need a re-think.

corranwebster commented 1 year ago

This has been fixed up and is ready for review.

corranwebster commented 1 year ago

Compare with current QPainter backend: image