Bug 47704 - fontconfig test fails
Summary: fontconfig test fails
Status: RESOLVED MOVED
Alias: None
Product: fontconfig
Classification: Unclassified
Component: library (show other bugs)
Version: 2_1
Hardware: Other All
: medium normal
Assignee: fontconfig-bugs
QA Contact: Behdad Esfahbod
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-03-22 03:53 UTC by Petr Gajdos
Modified: 2018-08-20 21:50 UTC (History)
2 users (show)

See Also:
i915 platform:
i915 features:


Attachments

Description Petr Gajdos 2012-03-22 03:53:12 UTC
Test fails imho because of wrong out.expected.

fontconfig-2.9.0/test[1]> for i in 4x6.pcf 8x16.pcf ; do fc-query $i; done | grep "family\|size"
Pattern has 18 elts (size 32)
	family: "Misc Fixed"(s)
	pixelsize: 6(f)(s)
Pattern has 18 elts (size 32)
	family: "Sony Fixed"(s)
	pixelsize: 16(f)(s)
fontconfig-2.9.0/test[0]> cat out.expected 
Fixed:pixelsize=16
Fixed:pixelsize=6
=
Fixed:pixelsize=16
Fixed:pixelsize=6
=
Fixed:pixelsize=16
Fixed:pixelsize=6
fontconfig-2.9.0/test> cat out
Misc Fixed:pixelsize=6
Sony Fixed:pixelsize=16
=
Misc Fixed:pixelsize=6
Sony Fixed:pixelsize=16
=
Misc Fixed:pixelsize=6
Sony Fixed:pixelsize=16
Comment 1 Akira TAGOH 2012-03-22 04:14:32 UTC
I don't see any fails on those testing. is it a result of run-test.sh in test dir?
Comment 2 Petr Gajdos 2012-03-22 05:36:07 UTC
(In reply to comment #1)
> I don't see any fails on those testing. is it a result of run-test.sh in test
> dir?

Hmmmm ...
Yes. with make check I get:

[...]
make[2]: Entering directory `/home/abuild/rpmbuild/BUILD/fontconfig-2.9.0/test'
*** Test failed: Basic check
*** output is in 'out', expected output in 'out.expected'
FAIL: run-test.sh
==================
1 of 1 test failed
==================
[..]

I thought it is because

fontconfig-2.9.0/test> FONTCONFIG_FILE=`pwd`/fonts.conf ../fc-list/fc-list - family pixelsize

gives 
Misc Fixed:pixelsize=6
Sony Fixed:pixelsize=16

for me instead of
Fixed:pixelsize=16
Fixed:pixelsize=6
in the out.expected.

(note strings before whitespace seems to be removed.)
Comment 3 Akira TAGOH 2012-03-22 05:48:07 UTC
actually "Misc" and "Sony" is the foundry but not the family name though. you can try FC_DEBUG=384 fc-query.
Comment 4 Petr Gajdos 2012-03-22 06:36:18 UTC
(In reply to comment #3)
> actually "Misc" and "Sony" is the foundry but not the family name though. you
> can try FC_DEBUG=384 fc-query.

Tried:

fontconfig-2.9.0/test> FC_DEBUG=384 ../fc-query/fc-query 4x6.pcf | grep "family\|foundry"
Fontconfig error: Cannot load default config file
using FreeType family "Misc Fixed"
	family: "Misc Fixed"(s)
	foundry: "Misc"(s)


So what's wrong?
Comment 5 Akira TAGOH 2012-03-22 06:42:41 UTC
Do you have any patches in freetype for that perhaps?
Comment 6 Petr Gajdos 2012-03-22 07:22:58 UTC
(In reply to comment #5)
> Do you have any patches in freetype for that perhaps?

You are right, that's it. Marking the patch fixing the test as suse-specific, will try to figure out why we have this later.

Thanks a lot & sorry for noise.
Comment 7 Behdad Esfahbod 2012-03-22 07:25:35 UTC
(In reply to comment #6)
> (In reply to comment #5)
> > Do you have any patches in freetype for that perhaps?
> 
> You are right, that's it. Marking the patch fixing the test as suse-specific,
> will try to figure out why we have this later.

Yes, suse has been carrying that patch for quite a while.
Comment 8 Quentin "Sardem FF7" Glidic 2017-03-19 13:08:33 UTC
One of our users at Exherbo is hitting this bug again with freetype >=2.7.1
Comment 9 Quentin "Sardem FF7" Glidic 2017-03-19 13:09:53 UTC
Test output diff as reference:
--- out	2017-03-19 12:11:15.790611338 +0100
+++ out.expected	2012-02-20 04:49:18.000000000 +0100
@@ -1,8 +1,8 @@
-Misc Fixed:pixelsize=6
-Sony Fixed:pixelsize=16
+Fixed:pixelsize=16
+Fixed:pixelsize=6
 =
-Misc Fixed:pixelsize=6
-Sony Fixed:pixelsize=16
+Fixed:pixelsize=16
+Fixed:pixelsize=6
 =
-Misc Fixed:pixelsize=6
-Sony Fixed:pixelsize=16
+Fixed:pixelsize=16
+Fixed:pixelsize=6
Comment 10 Akira TAGOH 2017-03-21 02:34:03 UTC
I see this issue and introduced by freetype 2.7.1:

- PCF family names are made more `colourful'; they now include the
      foundry  and information  whether they contain  wide characters.
      For example,  you no longer get `Fixed' but  rather `Sony Fixed'
      or `Misc Fixed Wide'.
Comment 11 GitLab Migration User 2018-08-20 21:50:56 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/fontconfig/fontconfig/issues/84.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.