After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 708110 - fontconfig configuration is incomplete on Windows platforms (e.g. font aliases are not configured, synthetic bold/italic variants not available, ...)
fontconfig configuration is incomplete on Windows platforms (e.g. font aliase...
Status: RESOLVED NOTGNOME
Product: GIMP
Classification: Other
Component: Tools
2.8.6
Other Windows
: Normal major
: ---
Assigned To: GIMP Bugs
GIMP Bugs
: 688593 703325 704303 707224 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2013-09-15 13:16 UTC by weeeeh.poioioi
Modified: 2014-07-28 13:40 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
warning when compiling with old fontconfig on Win32. (4.03 KB, patch)
2014-07-22 16:34 UTC, Jehan
none Details | Review

Description weeeeh.poioioi 2013-09-15 13:16:58 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! :(
Comment 1 Jehan 2013-09-17 15:26:14 UTC
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.
Comment 2 Michael Schumacher 2013-09-17 16:02:07 UTC
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.
Comment 3 weeeeh.poioioi 2013-09-17 17:20:40 UTC
@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.
Comment 4 Jehan 2013-09-19 15:01:38 UTC
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.
Comment 5 Jehan 2013-09-21 15:06:11 UTC
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.
Comment 6 Jehan 2013-09-22 07:59:19 UTC
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.
Comment 7 Jehan 2013-09-22 08:07:19 UTC
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.
Comment 8 Michael Schumacher 2013-09-23 10:44:20 UTC
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.
Comment 9 Jehan 2013-09-26 03:00:37 UTC
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).
Comment 10 Jehan 2013-09-29 03:54:10 UTC
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. :-)
Comment 11 Jehan 2013-09-30 03:04:17 UTC
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
Comment 12 Jehan 2013-10-03 13:35:13 UTC
*** Bug 688593 has been marked as a duplicate of this bug. ***
Comment 13 Jehan 2013-10-04 14:54:16 UTC
*** Bug 703325 has been marked as a duplicate of this bug. ***
Comment 14 Michael Schumacher 2013-10-05 11:07:55 UTC
*** Bug 707224 has been marked as a duplicate of this bug. ***
Comment 15 Michael Schumacher 2013-10-05 11:12:05 UTC
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.
Comment 16 Jehan 2013-10-05 12:38:04 UTC
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.
Comment 17 weeeeh.poioioi 2013-11-05 19:33:11 UTC
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).
Comment 18 Mike Henning (drawoc) 2013-11-05 21:17:39 UTC
Note that the fix for this (9161ed1e4a3f4afaee6dbcfc0b84a279ad99b397) was included in fontconfig 2.11.0. Upgrading should be enough to fix this issue.
Comment 19 weeeeh.poioioi 2013-11-05 21:39:33 UTC
@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.
Comment 20 Jehan 2013-11-05 22:21:24 UTC
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. :-)
Comment 21 Michael Schumacher 2013-11-06 00:03:49 UTC
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.
Comment 22 Mike Henning (drawoc) 2013-11-06 00:05:55 UTC
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.
Comment 23 Jehan 2013-11-06 00:26:07 UTC
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.
Comment 24 weeeeh.poioioi 2013-11-06 07:44:56 UTC
@Jehan
Ah, ok, alright :-)
Comment 25 Michael Schumacher 2013-12-15 14:41:28 UTC
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.
Comment 26 Michael Schumacher 2014-01-12 23:53:23 UTC
*** Bug 704303 has been marked as a duplicate of this bug. ***
Comment 27 Jehan 2014-07-22 16:34:54 UTC
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.
Comment 28 Jehan 2014-07-28 13:40:03 UTC
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.