Skip Menu |

This queue is for tickets about the Prima CPAN distribution.

Report information
The Basics
Id: 103484
Status: resolved
Priority: 0/
Queue: Prima

People
Owner: Nobody in particular
Requestors: ppisar [...] redhat.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: 1.43
Fixed in: (no value)



Subject: Font tests fail with hlv fonts
While 1.42 passes all tests for me, 1.43 fails on the same system: t/Object/Fonts.t ........ 183/? # Failed test 'width by size / hlv' # at t/Object/Fonts.t line 51. # got: '5' # expected: '4' xft: want 10x0.0.variable.hlv/iso8859-1^0 xft: refuse xft: want 42x0.0.variable.hlv/iso8859-1^0 xft: refuse xft: want 10x0.0.variable.hlv/iso8859-1^0 xft: refuse xft: want -36x0.0.variable.hlv/iso8859-1^0 xft: refuse xft: want -8x0.0.variable.hlv/iso8859-1^0 xft: refuse xft: want 9x0.0.default.hlv/iso8859-1^12 xft: try nonrotated font xft: want 9x0.0.default.hlv/iso8859-1^0 xft: refuse xft: FC_PIXEL_SIZE = 9 xft: refuse bitmapped font xft: want 9x0.0.default.hlv/iso8859-1^0 xft: refuse xft: want 9x0.0.variable.hlv/iso8859-1^0 xft: refuse xft: want 9x24.0.default.hlv/iso8859-1^0 xft: refuse xft: want 9x4.0.default.hlv/iso8859-1^0 xft: refuse xft: want -7x0.0.variable.hlv/iso8859-1^0 xft: refuse xft: want -7x24.0.default.hlv/iso8859-1^0 xft: refuse xft: want -7x4.0.default.hlv/iso8859-1^0 xft: refuse # Failed test 'width by size / hlv' # at t/Object/Fonts.t line 51. # got: '5' # expected: '4' xft: want 8x0.ffffffc7.default.hlv/iso8859-1^0 xft: refuse font reqH:8(s=7)x0.ffffffff.default hlv/iso8859-1 font: #1481 (diff=50): -mplus-hlv-bold-i-normal--0-0-75-75-p-0-iso8859-1 font: pick:0(0)x0.5.variable hlv/iso8859-1 .vector font: construct h=8, s=0 font: loading -mplus-hlv-bold-i-normal--8-0-75-75-p-0-iso8859-1 font height pick: 1::8 => 9, advised 71 font: construct h=7.1, s=0 font: loading -mplus-hlv-bold-i-normal--7-0-75-75-p-0-iso8859-1 font: width = FXA_AVERAGE_WIDTH 4(44) font cache add: 8(6)x4.5.variable hlv/iso8859-1 xft: want 8x0.0.default.hlv/iso8859-1^0 xft: refuse xft: want 16x0.0.variable.hlv/iso8859-1^0 xft: refuse # Failed test 'width by size / hlvw' # at t/Object/Fonts.t line 51. # got: '6' # expected: '5' xft: want 12x0.0.variable.hlvw/iso8859-1^0 xft: refuse xft: want 48x0.0.variable.hlvw/iso8859-1^0 xft: refuse xft: want 12x0.0.variable.hlvw/iso8859-1^0 xft: refuse xft: want -39x0.0.variable.hlvw/iso8859-1^0 xft: refuse xft: want -9x0.0.variable.hlvw/iso8859-1^0 xft: refuse xft: want 11x0.0.default.hlvw/iso8859-1^12 xft: try nonrotated font xft: want 11x0.0.default.hlvw/iso8859-1^0 xft: refuse xft: FC_PIXEL_SIZE = 11 xft: refuse bitmapped font xft: want 11x0.0.default.hlvw/iso8859-1^0 xft: refuse xft: want 11x0.0.variable.hlvw/iso8859-1^0 xft: refuse xft: want 11x30.0.default.hlvw/iso8859-1^0 xft: refuse xft: want 11x6.0.default.hlvw/iso8859-1^0 xft: refuse xft: want -8x0.0.variable.hlvw/iso8859-1^0 xft: refuse xft: want -8x27.0.default.hlvw/iso8859-1^0 xft: refuse xft: want -8x5.0.default.hlvw/iso8859-1^0 xft: refuse # Failed test 'width by size / hlvw' # at t/Object/Fonts.t line 51. # got: '6' # expected: '5' xft: want 9x0.ffffffc7.default.hlvw/iso8859-1^0 xft: refuse font reqH:9(s=8)x0.ffffffff.default hlvw/iso8859-1 font: #1489 (diff=6050): -mplus-hlvw-medium-r-normal--0-0-75-75-p-0-iso8859-1 font: pick:0(0)x0.0.variable hlvw/iso8859-1 .vector font: construct h=9, s=0 font: loading -mplus-hlvw-medium-r-normal--9-0-75-75-p-0-iso8859-1 font height pick: 1::9 => 11, advised 73 font: construct h=7.3, s=0 font: loading -mplus-hlvw-medium-r-normal--7-0-75-75-p-0-iso8859-1 font height pick: 2::9 => 8, advised 79 font: construct h=7.9, s=0 font: loading -mplus-hlvw-medium-r-normal--7-0-75-75-p-0-iso8859-1 font height pick: 3::9 => 8, advised 83 font: construct h=8.3, s=0 font: loading -mplus-hlvw-medium-r-normal--8-0-75-75-p-0-iso8859-1 font: width = FXA_AVERAGE_WIDTH 5(49) font cache add: 9(7)x5.0.variable hlvw/iso8859-1 xft: want 9x0.0.default.hlvw/iso8859-1^0 xft: refuse xft: want 16x0.0.variable.hlvw/iso8859-1^0 xft: refuse t/Object/Fonts.t ........ 960/? # Looks like you failed 4 tests of 1099. t/Object/Fonts.t ........ Dubious, test returned 4 (wstat 1024, 0x400) Failed 4/1099 subtests (less 148 skipped subtests: 947 okay) The hlv fonts are some Japanese bitmap fonts. You can get them from this RPM package <https://koji.fedoraproject.org/koji/buildinfo?buildID=533147>. There are these files: $ fc-list |grep hlv /usr/share/fonts/japanese-bitmap/mplus_h12rw.pcf.gz: hlvw:style=Regular /usr/share/fonts/japanese-bitmap/mplus_h12b-euro.pcf.gz: hlv:style=Bold /usr/share/fonts/japanese-bitmap/mplus_h10b-euro.pcf.gz: hlv:style=Bold /usr/share/fonts/japanese-bitmap/mplus_h10-euro.pcf.gz: hlv:style=Regular /usr/share/fonts/japanese-bitmap/mplus_h12-euro.pcf.gz: hlv:style=Regular /usr/share/fonts/japanese-bitmap/mplus_h12.pcf.gz: hlv:style=Regular /usr/share/fonts/japanese-bitmap/mplus_h10i-euro.pcf.gz: hlv:style=Italic /usr/share/fonts/japanese-bitmap/mplus_h12i-euro.pcf.gz: hlv:style=Italic /usr/share/fonts/japanese-bitmap/mplus_h12bi-euro.pcf.gz: hlv:style=Bold Italic /usr/share/fonts/japanese-bitmap/mplus_h10bi.pcf.gz: hlv:style=Bold Italic /usr/share/fonts/japanese-bitmap/mplus_h12bi.pcf.gz: hlv:style=Bold Italic /usr/share/fonts/japanese-bitmap/mplus_h10bi-euro.pcf.gz: hlv:style=Bold Italic /usr/share/fonts/japanese-bitmap/mplus_h12rw-euro.pcf.gz: hlvw:style=Regular /usr/share/fonts/japanese-bitmap/mplus_h10b.pcf.gz: hlv:style=Bold /usr/share/fonts/japanese-bitmap/mplus_h12b.pcf.gz: hlv:style=Bold /usr/share/fonts/japanese-bitmap/mplus_h10i.pcf.gz: hlv:style=Italic /usr/share/fonts/japanese-bitmap/mplus_h10.pcf.gz: hlv:style=Regular /usr/share/fonts/japanese-bitmap/mplus_h12i.pcf.gz: hlv:style=Italic Probably your test requires a feature not supported by these fonts. `fc-list -v' shows more details about the fonts but I don't know what information is important for you.
Hi, thanks for the report! These fonts indeed are corner cases, reporting FXA_AVERAGE_WIDTHs inconsistent with the requested XLFD widths; I think I adapted for this now. May I ask you to run the test again with the following patch and see if that works for you? Sincerely, Dmitry --- a/unix/apc_font.c +++ b/unix/apc_font.c @@ -1291,7 +1291,10 @@ AGAIN: /* detailing width */ if ( f-> font. width == 0 || !f-> flags. width) { - if ( XGetFontProperty( s, FXA_AVERAGE_WIDTH, &v) && v) { + if ( f-> vecname && font-> width > 0) { + f-> font. width = font-> width; + Fdebug("font: width = copy as is %d\n", f->font.width); + } else if ( XGetFontProperty( s, FXA_AVERAGE_WIDTH, &v) && v) { XCHECKPOINT; f-> font. width = (v + 5) / 10; Fdebug("font: width = FXA_AVERAGE_WIDTH %d(%d)\n", f->font.width, v);
Subject: Re: [rt.cpan.org #103484] Font tests fail with hlv fonts
Date: Mon, 20 Apr 2015 14:10:32 +0200
To: KARASIK via RT <bug-Prima [...] rt.cpan.org>
From: Petr Pisar <ppisar [...] redhat.com>
On Thu, Apr 16, 2015 at 01:00:16PM -0400, KARASIK via RT wrote: Show quoted text
> Hi, thanks for the report! These fonts indeed are corner cases, reporting > FXA_AVERAGE_WIDTHs inconsistent with the requested XLFD widths; I think > I adapted for this now. May I ask you > to run the test again with the following patch and see if that works for you? >
The patch makes the test passing for me. However in constrained testing environment (only a few installed fonts) I get a new failure: $ xvfb-run -a prove -b t/Object/Fonts.t t/Object/Fonts.t .. Fontconfig warning: FcPattern object size does not accept value 12(i) t/Object/Fonts.t .. 1/? Fontconfig warning: FcPattern object size does not accept value 27(i) Fontconfig warning: FcPattern object size does not accept value 5(i) Fontconfig warning: FcPattern object size does not accept value 5(i) Fontconfig warning: FcPattern object size does not accept value 30(i) Fontconfig warning: FcPattern object size does not accept value 6(i) Fontconfig warning: FcPattern object size does not accept value 30(i) Fontconfig warning: FcPattern object size does not accept value 6(i) # Failed test 'size / Liberation Sans' # at t/Object/Fonts.t line 33. # got: '12' # expected: '6' Fontconfig warning: FcPattern object size does not accept value 12(i) Fontconfig warning: FcPattern object size does not accept value 12(i) Fontconfig warning: FcPattern object size does not accept value 12(i) Fontconfig warning: FcPattern object size does not accept value 12(i) xft: want 10x0.0.default.Liberation Sans/iso8859-1^0 xft: want 42x0.0.variable.Liberation Sans/iso8859-1^0 xft: want 10x0.0.variable.Liberation Sans/iso8859-1^0 xft: want -30x0.0.variable.Liberation Sans/iso8859-1^0 xft: want -6x0.0.variable.Liberation Sans/iso8859-1^0 # Failed test 'size / Liberation Sans' # at t/Object/Fonts.t line 33. # got: '12' # expected: '6' xft: want 20x0.0.default.Liberation Sans/iso8859-1^12 xft: want 20x0.0.default.Liberation Sans/iso8859-1^0 xft: want 20x0.0.variable.Liberation Sans/iso8859-1^0 xft: want 20x42.0.default.Liberation Sans/iso8859-1^0 xft: want 20x10.0.default.Liberation Sans/iso8859-1^0 xft: want -12x0.0.variable.Liberation Sans/iso8859-1^0 xft: want -12x42.0.default.Liberation Sans/iso8859-1^0 xft: want -12x10.0.default.Liberation Sans/iso8859-1^0 xft: want 20x0.ffffffc7.default.Liberation Sans/iso8859-1^0 xft: want 20x0.0.default.Liberation Sans/iso8859-1^0 xft: want 16x0.0.variable.Liberation Sans/iso8859-1^0 Fontconfig warning: FcPattern object size does not accept value 30(i) Fontconfig warning: FcPattern object size does not accept value 6(i) # Failed test 'size / Comfortaa' # at t/Object/Fonts.t line 33. # got: '12' # expected: '6' Fontconfig warning: FcPattern object size does not accept value 12(i) Fontconfig warning: FcPattern object size does not accept value 12(i) Fontconfig warning: FcPattern object size does not accept value 12(i) Fontconfig warning: FcPattern object size does not accept value 12(i) xft: want 10x0.0.default.Comfortaa/iso8859-1^0 xft: want 42x0.0.variable.Comfortaa/iso8859-1^0 xft: want 10x0.0.variable.Comfortaa/iso8859-1^0 xft: want -30x0.0.variable.Comfortaa/iso8859-1^0 xft: want -6x0.0.variable.Comfortaa/iso8859-1^0 # Failed test 'size / Comfortaa' # at t/Object/Fonts.t line 33. # got: '12' # expected: '6' xft: want 19x0.0.default.Comfortaa/iso8859-1^12 xft: want 19x0.0.default.Comfortaa/iso8859-1^0 xft: want 19x0.0.variable.Comfortaa/iso8859-1^0 xft: want 19x42.0.default.Comfortaa/iso8859-1^0 xft: want 19x10.0.default.Comfortaa/iso8859-1^0 xft: want -12x0.0.variable.Comfortaa/iso8859-1^0 xft: want -12x42.0.default.Comfortaa/iso8859-1^0 xft: want -12x10.0.default.Comfortaa/iso8859-1^0 xft: want 19x0.ffffffc7.default.Comfortaa/iso8859-1^0 xft: want 19x0.0.default.Comfortaa/iso8859-1^0 xft: want 16x0.0.variable.Comfortaa/iso8859-1^0 # Looks like you failed 4 tests of 63. t/Object/Fonts.t .. Dubious, test returned 4 (wstat 1024, 0x400) Failed 4/63 subtests On different system, I get different expected number: # Failed test 'height / glisp' # at t/Object/Fonts.t line 33. # got: '12' # expected: '11' I will try to find which fonts make the test happy. -- Petr
Download (untitled)
application/pgp-signature 213b

Message body not shown because it is not plain text.

From: ppisar [...] redhat.com
Dne Po 20.dub.2015 08:10:57, ppisar napsal(a): Show quoted text
> $ xvfb-run -a prove -b t/Object/Fonts.t > t/Object/Fonts.t .. Fontconfig warning: FcPattern object size does not > accept value 12(i) > t/Object/Fonts.t .. 1/? Fontconfig warning: FcPattern object size does > not accept value 27(i) > Fontconfig warning: FcPattern object size does not accept value 5(i) > Fontconfig warning: FcPattern object size does not accept value 5(i) > Fontconfig warning: FcPattern object size does not accept value 30(i) > Fontconfig warning: FcPattern object size does not accept value 6(i) > Fontconfig warning: FcPattern object size does not accept value 30(i) > Fontconfig warning: FcPattern object size does not accept value 6(i) > > # Failed test 'size / Liberation Sans' > # at t/Object/Fonts.t line 33. > # got: '12' > # expected: '6'
I could not reproduce the pass without these failures on other machine. On the one machine where is passes, it fails the same way when running against Xfvb instead of the Xorg with nouveau. Maybe something related to DPI and font scaling.
Hi Petr, May I ask to test with another patch? This time I cannot give the proper one because it's too far off with all debug stuff I've added, but can you try something like this fix below? Thank you! Dmitry diff --git a/unix/xft.c b/unix/xft.c index 442c702..a530d37 100644 --- a/unix/xft.c +++ b/unix/xft.c @@ -690,7 +690,7 @@ prima_xft_font_pick( Handle self, Font * source, Font * dest , double * size, Xft FcPatternAddDouble( request, FC_SIZE, *size); XFTdebug("FC_SIZE = %.1f", *size); } else { - FcPatternAddInteger( request, FC_SIZE, requested_font. size); + FcPatternAddDouble( request, FC_SIZE, requested_font. size); XFTdebug("FC_SIZE = %d", requested_font. size); } } else {
Subject: Re: [rt.cpan.org #103484] Font tests fail with hlv fonts
Date: Thu, 23 Apr 2015 09:20:43 +0200
To: KARASIK via RT <bug-Prima [...] rt.cpan.org>
From: Petr Pisar <ppisar [...] redhat.com>
On Wed, Apr 22, 2015 at 06:49:21PM -0400, KARASIK via RT wrote: Show quoted text
> May I ask to test with another patch? This time I cannot give the proper one > because it's too far off with all debug stuff I've added, but can you try > something like this fix below? >
Great. Applying this patch on top of the previous one makes all tests passing. Both on real Xorg and also on Xvfb on all the machines I tested previously. -- Petr
Download (untitled)
application/pgp-signature 213b

Message body not shown because it is not plain text.