Bug report #12644

A number of fonts in the composer have metrics messed up upon project re-loading

Added by Mathieu Pellerin - nIRV over 4 years ago. Updated over 4 years ago.

Status:Closed
Priority:High
Assignee:Nyall Dawson
Category:Map Composer/Printing
Affected QGIS version:master Regression?:No
Operating System: Easy fix?:No
Pull Request or Patch supplied:No Resolution:
Crashes QGIS or corrupts data:No Copied to github as #:20757

Description

This is a real bummer. With a number of fonts (for e.g. Delicious, http://www.exljbris.com/delicious.html), bold metrics get messed up when opening a composer from a saved project. All the characters are over-bold. It's quite serious as it also affects the export to image.

Steps to reproduce
  1. Install the Delicious font (it's free and available here: http://www.exljbris.com/delicious.html)
  2. Launch QGIS, and create a new composer from the blank project
  3. Add a label item, and set its font family to "Delicious Smallcaps" with a size value of 48
  4. Enter a random string in the label, and notice its style
  5. Save the project with the above-created composer
  6. Exit QGIS
  7. Re-launch QGIS, and open the saved project
  8. Open the composer, and notice how the label item font boldness is all wrong (see attached screenshot comparison)

good-then-bad.png (301 KB) Mathieu Pellerin - nIRV, 2015-04-25 12:07 AM

Associated revisions

Revision 7a3a857d
Added by Nyall Dawson over 4 years ago

Add QgsFontUtils methods for saving/loading font from XML (fix #12644)

Fixes loss of font styles when restoring projects. Credit to @nirvn
for the initial implementation.

History

#1 Updated by Nyall Dawson over 4 years ago

  • Status changed from Open to Closed

Also available in: Atom PDF