GNOME Bugzilla – Bug 708110
fontconfig configuration is incomplete on Windows platforms (e.g. font aliases are not configured, synthetic bold/italic variants not available, ...)
Last modified: 2014-07-28 13:40:03 UTC
Well, as the title says, when I choose a font which doesn't originally come with a bold/italic version, and I write some text with it, select it, and choose the bold/italic option of the transparent text tool above, the text doesn't get bold or italic anymore!! This option worked perfectly with Gimp 2.8.4 (I currently also deinstalled Gimp 2.8.6. and reinstalled 2.8.4. and it works perfectly again). So, please fix it! It would suck if the older version is actually better than the new ones! :(
Hi, could you tell me of a good example of a Free font which has no bold/italic (one that I can legally get for free, and even better one with a Free Software license), so that I can test this? Thanks.
There are a number of font-related bug reports for the Windows platforms right now. If I recall correctly, someone on IRC mentioned that recent fontconfig may rely on symlinks to reference some of its configuration files. Might be useful to ask Jernej if this is the issue; and we should check if some of the bug reports can be merged.
@Jehan For example, it happens with this font: http://www.dafont.com/augie.font It's a free font and it got no bold/italic version of it.
weeeeh > ok I'll test some time. Don't necessarily expect it right now because Windows is not my main system. I only use it to test GIMP actually. But I assign this ticket to myself, in order to remember to do it. In any case, I tested under Linux at least. This font works well with bold/italic.
Ok. So I confirm that it does not work on Windows for master, even though it worked on Linux (I did not even know we had this feature to simulate bold/italic typefaces for font which have none!). Then I tested gimp-2-8 (dev branch), then 2.8.4, then I even went as far as 2.7.6. Well I never could have it working! So if you say you have it working fine on released GIMP 2.8.4. I believe the problem comes from a regression in a third-party library (probably freetype or cairo, or even fontconfig, which does not deal with rendering, but it may still be a problem somehow), that may be shipped together with GIMP. Anyhow, I'll go to bed now. Enough testing for today! :-) I'll try to have more determine the issue another day.
Above when I said "freetype or cairo", I meant freetype or pango (though rendering is done in the end by cairo as back-end, so it's not totally out of the picture). And in particular, I think that pango may be at fault, since it has the feature to create "artificial" italic/bold for fonts without such typefaces. So I don't think we re-implement this feature and do it through pango. Yet I could not reproduce a working behavior under Windows with older pango (I tried 1.28.0, 1.29.4, 1.30.0), nor older freetype2 or cairo. I'll stop random-testing, and will ask what versions of all libraries we use in 2.8.4 and 2.8.6 to the Windows build maintainer.
weeeeh, could you confirm me you are using GIMP for Windows, downloaded from this page http://gimp-win.sourceforge.net/ both for 2.8.4 and 2.8.6? Or are you using another source? Thanks.
See also https://mail.gnome.org/archives/gimp-developer-list/2013-September/msg00124.html - I guess that is most likely the cause for many, maybe even all of the recently reported font-related problems for the Windows platform.
Hi, I confirm that the problem source and solution that Drawoc pointed out seem the good ones. I just tested in my VM, and his solution works. I would not close this immediately though because I think something should be done about it for this not to happen again in the next official Windows build of GIMP. Drawoc said that he already has a patch for this in the GIMP tree at build/windows/jhbuild/patches/fontconfig-fix-config-dir.patch, and he uses it for his nightbuilds. Doesn't the official release use the same patches? Could we make sure they do? Then we can close the ticket. Also as drawoc says to, it may be worth to report it upstream, though same as he, I am unsure this can really be considered as a bug on their side. weeeeh > you may want to have a look at the email that Michael linked above. It will give you the solution to your problem for now (a simple config file "fonts.conf" to update).
For information, I've added a link to the freedesktop ticket I created about this issue. A patch has been already proposed by a developer, and I proposed an additional one to warn when the default conf.d was missing. Hopefully this will make it to the tree, and when fixed upstream, we can close this bug. :-)
Hey. Ok so this is fixed upstream starting today. https://bugs.freedesktop.org/show_bug.cgi?id=69836#c3 I guess this will be officially available on the next fontconfig release, then. This means that we should make sure that we use the next fontconfig version when we will release GIMP for Windows, or that we don't forget to apply our internal patch if we use an older version. Is there a way to make sure of this? If we just rely on "we will remember", I feel we'll forget. :p
*** Bug 688593 has been marked as a duplicate of this bug. ***
*** Bug 703325 has been marked as a duplicate of this bug. ***
*** Bug 707224 has been marked as a duplicate of this bug. ***
We can raise the required version of fontconfig to the next release for the Windows platforms. IIRC something similar has been done in the past, for libtool, to require 1.5.
Hi, well hopefully the next bugfix release will be very soon, whereas the commit upstream has barely been committed a few days ago, and there has not been a new fontconfig release since then. So I guess the version raise won't work until fontconfig gets released. Nevertheless the patch from drawoc in build/windows/jhbuild/patches/fontconfig-fix-config-dir.patch on master branch would work fine in the meantime. But this patch is not on gimp-2-8 branch. Actually there is not even a jhbuild/ directory. Could we just ensure that the same process is used for the nightbuilds and the actual releases? Anyway that's good practice to not have several release procedures, otherwise we miss a lot of the point of nightbuilds. Then we keep this ticked opened a few days/weeks/months until Fontconfig release, and when this happen, we up the version for Windows, delete the patch, and close the ticket.
Ok, I can confirm now, the problem was really just the absolute/relative path thingy in font.conf which Drawoc mentioned, changing it with a simple text editor solved the problem for me. Now I can finally use the newer versions of Gimp on Windows! :-) I should mention, in the new 2.8.8. version, this problem still exists (i.e., the font.conf file installed by default has got a absolute path to font.d instead of the relative one). This should be fixed (also, I think it would be rather easy to fix this, since it's just one text file to configure).
Note that the fix for this (9161ed1e4a3f4afaee6dbcfc0b84a279ad99b397) was included in fontconfig 2.11.0. Upgrading should be enough to fix this issue.
@drawoc As a windows user, I've never installed nor upgraded fontconfig on my system (nor actually heard of it until today^^) and I also don't know how to. On windows, I've only installed Gimp with the official Windows Gimp installer, and installed nothing else to make it run. So I think the issue isn't solved with that. The Gimp installer for Windows needs to be changed in the aspect of that one path description line of the font.conf file, so that the "correct" font.conf file will be copied to the GIMP directory on Windows.
Argh! That's exactly why I left this opened to have a clear procedure for our Windows release? Why don't we use the same procedure for the nightbuilds (which patches fontconfig, if not mistaken) and the official build? Or else let's use the last version in the Windows build! weeeeh: I think that Drawoc was saying that to the team, that we should use fontconfig 2.11.0 in our official release, not to Windows users to update it. :-)
Jehan, by assigning bugs to yourself, you take responsibility to resolve them. Others probably won't touch them, they might even vanish from some people's saved searches.
Yes, fontconfig is bundled with GIMP, so I was suggesting that we get Jernej to bundle the newer version of it with the official installer. The nightlies have a different build system from the official builds because the nightlies are currently missing some important features like python support or 64 bit builds.
Michael: right. I assigned it when I was still looking for a code bug, before Drawoc told us this was a dependency's configuration bug. Sorry, I did not think of changing this afterwards. Back to "New" status and default assignee. Anyway it would be good if we could fix the Windows package. Since it is only a configuration file on a dependency to change, I hope we can do this without upping the release version.
@Jehan Ah, ok, alright :-)
The most recent installer gets this right. We could keep that bug report open, and later close it in the General component if the check for a recent enough fontconfig is added, or resolve it as fixed now in the Installer component.
*** Bug 704303 has been marked as a duplicate of this bug. ***
Created attachment 281403 [details] [review] warning when compiling with old fontconfig on Win32. Hi, The fontconfig version with the fix for this is 2.11.0 and the one with the fix for the cache dir configuration (bug 703331) is 2.11.1. So to close both reports on our side, I've opted for a warning, similar to what we did for the gettext's script-fu localization issue. Basically if you compile for Windows, with fontconfig under 2.11.1, the ./configure script will display a warning. It won't prevent compilation. This is up to the Win32 build maintainers to decide to update fontconfig, or fix the configuration files by hand on an older version (since these are only bugs on the default configuration, not in the code). At least there is a clear big warning now, so I think (hope) our maintainers won't oversee this topic again in our next release. Because this has been like 2 or 3 releases we have this bug even though we know the solution to it. With this attached patch, I will feel ok to close the 2 aforementioned reports.
Pushed after asking Mitch on IRC: commit 6b2963928eaf353d3ba14b7f4bb2c98c2a22d66e Author: Jehan <jehan@girinstud.io> Date: Tue Jul 22 18:20:02 2014 +0000 configure: warning when compiling with old fontconfig on Win32. Fontconfig had a few bugs in the default configuration when compiled for Windows. These issues are fixed from version 2.11.1. Display a warning when compiling on win32 platform with older versions. See in particular bugs 708110 and 703331. Resolved as NOTGNOME.