Bug report #8072

Use more modern default font for labels on Windows

Added by Aren Cambre almost 11 years ago. Updated over 5 years ago.

Status:Closed
Priority:Normal
Assignee:Larry Shaffer
Category:Labelling
Affected QGIS version:master Regression?:No
Operating System:Windows 7 x64 Easy fix?:No
Pull Request or Patch supplied:No Resolution:end of life
Crashes QGIS or corrupts data:No Copied to github as #:16911

Description

On Windows, the labeler uses MS Shell Dlg font for labels by default. This appears to be a holdover from olden days of Windows, plus that font appears to be meant for UI features, not for rendered output. See http://msdn.microsoft.com/en-us/library/windows/desktop/dd374112(v=vs.85).aspx for more info on this.

Per http://msdn.microsoft.com/en-us/library/windows/apps/hh700394.aspx, it appears that Calibri is the correct default font now for QGIS on Windows to use for labeling.


Related issues

Related to QGIS Application - Feature request #10387: change default label font Open 2014-05-29

History

#1 Updated by Larry Shaffer almost 11 years ago

  • Assignee set to Larry Shaffer

Hi Aren,

Thank you very much for pointing this out, and for providing excellent reference links. I agree it should be Calibri. MS Shell Dlg is the default Qt app font under Windows, and generally for GUI layout, as you noted. However, there are a couple of issues, all of which I think can be overcome.

  • Calibri is a Vista+ font, unless the user has installed Office 2007, etc. The reality is that there a quite a few users still on XP on older hardware that use QGIS. We could try to load Calibri and it will default back to the Qt default if not found. We certainly don't want to try and ship a copy of Calibri with QGIS, due probably to licensing issues.
  • The default has been MS Shell Dlg for quite some time. This means any project where users have not set a font family may have their fonts changed. I'll have to look into whether the default family is (or has been) always saved to settings or not.
  • We may have to define a default point size as well for Windows, if Calibri doesn't seem the 'right' under the default Qt size (usually 12 pt).

#2 Updated by Aren Cambre almost 11 years ago

Thanks! I was hoping there was some meta-font you could use, similar to MS Shell Dlg, but I couldn't figure one out.

Per http://en.wikipedia.org/wiki/Calibri, Calibri is packaged with Office 2007 and Vista. All Vista or Windows 7/8 users should have it, and Windows XP users are likely to have it unless they are still running Office 2003. As Windows 2000 reached end of life in 2010, it's probably not worth worrying about that OS.

I'll bet that very few are running running pre-XP machines without Office >= 2007. Even if they are, that strongly hardware with insufficient resources to support QGIS. Therefore, I urge you to consider just making Calibri the default on Windows, maybe with a fallback common to all OSes if it's not present.

#3 Updated by aperi2007 - almost 11 years ago

Why not use the Font Liberation ?

https://fedorahosted.org/liberation-fonts/

It is free and public and so it could be installed also on linux without problem.
Perhaps it could also be added to the qgis package.

#4 Updated by Aren Cambre almost 11 years ago

I'm glad you're thinking outside the box, but I have four concerns:
  1. The fonts they mimic or intend to replace (Times New, Arial, Courier New) have largely been superseded in the Windows world with Calibri, Cambria, and Consolas, which are also technically superior in certain respects.
  2. Not sure it's generally a good idea to install more fonts on a system. What if a user doesn't want them? Then what happens with default fonts?
  3. I'll wager that most QGIS users use Windows. This is the workhorse OS of the professional world. It makes sense, to me, to reuse what's already common on Windows and follow recommended practices whenever possible, and here that includes Windows's fonts.
  4. These fonts' license is apparently incompatible with the GPL, which is what QGIS is released under. What does this mean for QGIS?

#5 Updated by aperi2007 - almost 11 years ago

The question is to think to project qgis like a project for only that machine where it born (for you eyes only) or for every other machine where there is a qgis installed and where the project could be ported.

The "calibri" is not available on linux as I know. And also on windows is not really available on all machine.
And so a project on windows is not totally portable on another system.
Also you can think to a qgis-server publication.

Please also notice all the major gis desktop system will install their own font to support the portable between more systems.

The qgis when a font is not available will automatically substitiute it with some other.
But this silently downgrade the rendering quality.

No one option for an user to know the full list of fonts needed for a good rendering of a project.
So the quality surely will be donwgrade when the project sill port from a machine to another.
Because not all the machine has the same fonts.

:)

Regards.

#6 Updated by Aren Cambre almost 11 years ago

The question is to think to project qgis like a project for only that machine where it born (for you eyes only) or for every other machine where there is a qgis installed and where the project could be ported.

I agree, but the issue of font compatibility between Windows, Apple, and Linux is not a new problem and probably not one that we should seek to solve with QGIS. There are relatively simple workarounds that allow users to take advantage of Windows's native fonts without getting involved in complex issues of bundling new fonts.

And also on windows [Calibri] not really available on all machine.

Calibri is on every Windows machine that runs Vista or later or runs Office 2007 or later. This means two things:
  1. Almost every Windows box has it.
  2. A good portion of Windows machines (almost all?) that lack Carlibri are too old to properly handle QGIS. QGIS has significant CPU, hard drive, and memory needs.

Also, all Apple machines running Office 2008 or higher has Calibri. And per http://en.wikipedia.org/wiki/Calibri#Availability, there's some free ways to get Calibri.

Therefore, the rare Windows machine that don't have Calibri and can't even use one of the free ways of getting it is likely to be too old to run QGIS properly. QGIS projects using Calibri on Windows are quite likely to transfer fine to any other Windows machine.

The qgis when a font is not available will automatically substitiute it with some other.

Yes, I think that is probably the most practical solution. A similar concept is already in CSS, where font lists are given to the browser, and the first font that is present is used: http://www.w3schools.com/cssref/css_websafe_fonts.asp

Please also notice all the major gis desktop system will install their own font to support the portable between more systems.

I checked ArcGIS, and it appears that it installs a font for symbols. Not clear that it installs any other fonts. Not only is that kind of weird, it's not the same as what's being proposed here.

#7 Updated by aperi2007 - almost 11 years ago

Therefore, the rare Windows machine that don't have Calibri and can't even use one of the free ways of getting it is
likely to be too old to run QGIS properly. QGIS projects using Calibri on Windows are quite likely to transfer fine to
any other Windows machine.

The calibri is an office level font.
I guess it is not available on windows server machine.

I have a windows 2003 machine (used for arcims).
It has no the Calibri font.
I don' t know what happened with newest windows server versions.

Regards.

#8 Updated by Aren Cambre almost 11 years ago

Windows Server 2003 is already out of mainstream support, and no service packs have been made for it since 2009: http://support.microsoft.com/lifecycle/search/default.aspx?sort=PN&alpha=Windows+Server+2003&Filter=FilterNO. Therefore, full Windows Server 2003 compatibility should not be a primary consideration.

Windows 2003 users can still probably install one of the free options to get Calibri. See http://en.wikipedia.org/wiki/Calibri#Availability.

#9 Updated by aperi2007 - almost 11 years ago

I agree the windows is not a primary consideration
Infact we are just moved on Linux with MapServer.
And plan to use also qgis-server on a RedHat server system.

But the idea that a customr could do a project on a windows using calibri fonts and after when the project is to publish on a Linux where the calibri is not available is francly understandable to me.

In a production environment is hard that a sysadm will allow to install something not certified for that environment.
I agree with you that for little and hobbiest works is wonderful to install all the world available.

Another question is why you say .
dismiss all out of support software.

Please notice that actually
qgis will use the posgres 8.3 libraries that are all dismissed.
This mean the qgis should dismiss the postgres 8.3 ?

http://www.postgresql.org/support/versioning/

Do you know how many libraries are out of support in qgis stack ?

So you should remove all them ?
:)

Regards.

#10 Updated by Aren Cambre almost 11 years ago

Please notice that actually
qgis will use the posgres 8.3 libraries that are all dismissed.
This mean the qgis should dismiss the postgres 8.3 ?

For the sake of sanity, software developers generally should not support stuff that is beyond its useful or supported life unless there is a good reason to do otherwise, such as if a large installed base of users are on an old version.

So with Postgres specifically, do its users show a tendency to decline to stay up to date with the software? If not, not clear why QGIS should explicitly support 8.3 unless it's super easy to do.

The rest of your argument goes down a rabbit hole. Fact is, Windows is the mainstream OS for the world with >90% of desktop users on it. Any issue with font compatibility is not anything new with QGIS. It would be fine for QGIS to follow a commonly-used standard, and the font lists I proposed above is one such standard. It would not be appropriate for QGIS to involve itself in a distraction of creating a new standard or using a goofy workaround that just adds complexity and little value, like the barely used Font Liberation project (it barely gets any Google results).

#11 Updated by Paolo Cavallini over 10 years ago

  • Target version changed from Version 2.0.0 to Future Release - High Priority

#12 Updated by Tudor Bărăscu over 8 years ago

Shouldn't this be a feature request rather than a bug?

#13 Updated by Aren Cambre over 8 years ago

It is properly a UI bug. It makes things look ugly and needlessly different. Just because it's UI-related doesn't mean it can't be a bug.

#14 Updated by Giovanni Manghi about 7 years ago

  • Easy fix? set to No
  • Regression? set to No

#15 Updated by Giovanni Manghi over 5 years ago

  • Status changed from Open to Closed
  • Resolution set to end of life

Also available in: Atom PDF