Bug 170997
Summary: | Chinese fonts can't be used on ghostscript | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Akira TAGOH <tagoh> | ||||||
Component: | ghostscript | Assignee: | Tim Waugh <twaugh> | ||||||
Status: | CLOSED RAWHIDE | QA Contact: | Mike McLean <mikem> | ||||||
Severity: | medium | Docs Contact: | |||||||
Priority: | medium | ||||||||
Version: | rawhide | CC: | eng-i18n-bugs | ||||||
Target Milestone: | --- | Keywords: | i18n | ||||||
Target Release: | --- | ||||||||
Hardware: | All | ||||||||
OS: | Linux | ||||||||
Whiteboard: | |||||||||
Fixed In Version: | 8.15.1-4 | Doc Type: | Bug Fix | ||||||
Doc Text: | Story Points: | --- | |||||||
Clone Of: | Environment: | ||||||||
Last Closed: | 2006-01-27 11:55:58 UTC | Type: | --- | ||||||
Regression: | --- | Mount Type: | --- | ||||||
Documentation: | --- | CRM: | |||||||
Verified Versions: | Category: | --- | |||||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||||
Cloudforms Team: | --- | Target Upstream Version: | |||||||
Embargoed: | |||||||||
Bug Depends On: | |||||||||
Bug Blocks: | 150221 | ||||||||
Attachments: |
|
Description of problem: Due to the miswriting the font filename into cidfmap.zh_*, gs can't deal with them. Version-Release number of selected component (if applicable): 3.00.pre2-1 How reproducible: always Steps to Reproduce: 1.echo "/BousungEG-Light-GB-UniGB-UTF8-H findfont" | gs 2. 3. Actual results: gs reports the error like "Can't find the font file /usr/share/fonts/chinese/TrueType/uming.ttf Expected results: font should be loaded successfully. Additional info: Actually I think it maybe better to just fix the filename to standardize them, so that next version of the font comes we don't have to modify cidfmap again. what do you think? Well, if it's the original name, it shouldn't be changed because it may confuses. I am going to include new version of tar ball that is using saner filename, which will help this bug. The new upstream tar ball actually have uming.ttf and ukai.ttf so it is all good for us. Fixed in upstream. Font seems to be loaded OK in fonts-chinese-3.02-4. # echo "/BousungEG-Light-GB-UniGB-UTF8-H findfont" | gs ESP Ghostscript 815.01 (2005-09-22) Copyright (C) 2004 artofcode LLC, Benicia, CA. All rights reserved. This software comes with NO WARRANTY: see the file PUBLIC for details. GS>Loading a TT font from /usr/share/fonts/chinese/TrueType/uming.ttf to emulate a CID font BousungEG-Light-GB ... Error: /rangecheck in --string-- Operand stack: BousungEG-Light-GB-UniGB-UTF8-H Font BousungEG-Light-GB-UniGB-UTF8-H Un iGB-UTF8-H --nostringval-- FDepVector --nostringval-- 0 BousungEG-Ligh t-GB CIDFont true BousungEG-Light-GB BousungEG-Light-GB --nostringval- - --dict:14/15(L)-- --nostringval-- 106942 106942 Execution stack: %interp_exit .runexec2 --nostringval-- --nostringval-- --nostringval- - 2 %stopped_push --nostringval-- --nostringval-- %loop_continue 2 3 %oparray_pop --nostringval-- --nostringval-- false 1 %stopped_pus h .runexec2 --nostringval-- --nostringval-- --nostringval-- 2 %stopp ed_push --nostringval-- 1 3 %oparray_pop 2 3 %oparray_pop --nost ringval-- --nostringval-- 5 4 %oparray_pop --nostringval-- 1 1 0 --nostringval-- %for_pos_int_continue --nostringval-- 10 5 %oparray _pop --nostringval-- --nostringval-- --nostringval-- --nostringval-- - -nostringval-- --nostringval-- --nostringval-- --nostringval-- --nostrin gval-- --nostringval-- %array_continue --nostringval-- --nostringval-- --nostringval-- Dictionary stack: --dict:1116/1686(ro)(G)-- --dict:0/20(G)-- --dict:80/200(L)-- --dict:17 /17(ro)(G)-- --dict:3/10(L)-- --dict:20/26(ro)(G)-- --dict:28/50(ro)(G)-- --dict:15/40(L)-- Current allocation mode is local Current file position is 42 Oh no, that's not ok but obviously gs shows an error. it looks like another problem was introduced. reopening ATM. I have tested some truetype fonts in gs7 and gs8. Some truetype fonts are: uming.ttf ukai.ttf uming-v0.1-pre2.ttf ukai-v0.1-pre2.ttf bkai00mp.ttf bsmi00lp.ttf gbsn00lp.ttf gkai00mp.ttf gbsn00lp.ttf gkai00mp.ttf zysong.ttf uming.ttf, ukai.ttf, uming-v0.1-pre2.ttf and ukai-v0.1-pre2.ttf can not be loadded by gs7 and gs8. When they are loadded, display the information: "Error: /rangecheck in --string--". The others can be loadded by gs7 and gs8. They are ok. So I think the font files of uming.ttf, ukai.ttf, uming-v0.1-pre2.ttf and ukai-v0.1-pre2.ttf have probably some errors. :) (1) for uming.ttf in gs7: GS>/Uming findfont Loading Uming font from /usr/share/fonts/zh_CN/TrueType/uming.ttf... Error: /rangecheck in --string-- Operand stack: Uming Font Uming 343159 Uming --nostringval-- Uming (/usr/share/fonts/zh_CN/TrueType/uming.ttf) false --nostringval-- 106942 106942 Execution stack: %interp_exit .runexec2 --nostringval-- --nostringval-- --nostringval-- 2 %stopped_push --nostringval-- --nostringval-- %loop_continue 2 3 %oparray_pop --nostringval-- --nostringval-- false 1 %stopped_push .runexec2 --nostringval-- --nostringval-- --nostringval-- 2 %stopped_push --nostringval-- 1 3 %oparray_pop 2 3 %oparray_pop --nostringval-- --nostringval-- --nostringval-- --nostringval-- --nostringval-- false 1 %stopped_push 5 4 %oparray_pop --nostringval-- --nostringval-- --nostringval-- --nostringval-- --nostringval-- %array_continue --nostringval-- --nostringval-- --nostringval-- %loop_continue --nostringval-- --nostringval-- --nostringval-- 10 --nostringval-- --nostringval-- false 1 %stopped_push --nostringval-- --nostringval-- --nostringval-- --nostringval-- --nostringval-- %array_continue --nostringval-- --nostringval-- --nostringval-- --nostringval-- Dictionary stack: --dict:1060/1123(ro)(G)-- --dict:0/20(G)-- --dict:88/200(L)-- --dict:17/17(ro)(G)-- --dict:1060/1123(ro)(G)-- --dict:28/50(ro)(G)-- --dict:12/40(L)-- Current allocation mode is local Current file position is 16 (2) for ukai.ttf in gs7: GS<1>/Ukai findfont Loading Ukai font from /usr/share/fonts/zh_CN/TrueType/ukai.ttf... Error: /rangecheck in --string-- Operand stack: Uming Ukai Font Ukai 465592 Ukai --nostringval-- Ukai (/usr/share/fonts/zh_CN/TrueType/ukai.ttf) false --nostringval-- 103632 103632 Execution stack: %interp_exit .runexec2 --nostringval-- --nostringval-- --nostringval-- 2 %stopped_push --nostringval-- --nostringval-- %loop_continue 3 3 %oparray_pop --nostringval-- --nostringval-- false 1 %stopped_push .runexec2 --nostringval-- --nostringval-- --nostringval-- 2 %stopped_push --nostringval-- 2 3 %oparray_pop 3 3 %oparray_pop --nostringval-- --nostringval-- --nostringval-- --nostringval-- --nostringval-- false 1 %stopped_push 6 4 %oparray_pop --nostringval-- --nostringval-- --nostringval-- --nostringval-- --nostringval-- %array_continue --nostringval-- --nostringval-- --nostringval-- %loop_continue --nostringval-- --nostringval-- --nostringval-- 11 --nostringval-- --nostringval-- false 1 %stopped_push --nostringval-- --nostringval-- --nostringval-- --nostringval-- --nostringval-- %array_continue --nostringval-- --nostringval-- --nostringval-- --nostringval-- Dictionary stack: --dict:1060/1123(ro)(G)-- --dict:0/20(G)-- --dict:88/200(L)-- --dict:17/17(ro)(G)-- --dict:1060/1123(ro)(G)-- --dict:28/50(ro)(G)-- --dict:12/40(L)-- Current allocation mode is local Current file position is 15 (3) for uming-v0.1-pre2.ttf in gs7: GS<2>/Uming-pre findfont Loading Uming-pre font from /data/Exer/cvsTest/fonts-chinese/devel/uming-v0.1-pre2.ttf... Error: /rangecheck in --string-- Operand stack: Uming Ukai Uming-pre Font Uming-pre 591366 Uming-pre --nostringval-- Uming-pre (/data/Exer/cvsTest/fonts-chinese/devel/uming-v0.1-pre2.ttf) false --nostringval-- 106822 106822 Execution stack: %interp_exit .runexec2 --nostringval-- --nostringval-- --nostringval-- 2 %stopped_push --nostringval-- --nostringval-- %loop_continue 4 3 %oparray_pop --nostringval-- --nostringval-- false 1 %stopped_push .runexec2 --nostringval-- --nostringval-- --nostringval-- 2 %stopped_push --nostringval-- 3 3 %oparray_pop 4 3 %oparray_pop --nostringval-- --nostringval-- --nostringval-- --nostringval-- --nostringval-- false 1 %stopped_push 7 4 %oparray_pop --nostringval-- --nostringval-- --nostringval-- --nostringval-- --nostringval-- %array_continue --nostringval-- --nostringval-- --nostringval-- %loop_continue --nostringval-- --nostringval-- --nostringval-- 12 --nostringval-- --nostringval-- false 1 %stopped_push --nostringval-- --nostringval-- --nostringval-- --nostringval-- --nostringval-- %array_continue --nostringval-- --nostringval-- --nostringval-- --nostringval-- Dictionary stack: --dict:1060/1123(ro)(G)-- --dict:0/20(G)-- --dict:88/200(L)-- --dict:17/17(ro)(G)-- --dict:1060/1123(ro)(G)-- --dict:28/50(ro)(G)-- --dict:12/40(L)-- Current allocation mode is local Current file position is 20 (4) for ukai-v0.1-pre2.ttf in gs7: GS<3>/Ukai-pre findfont Loading Ukai-pre font from /data/Exer/cvsTest/fonts-chinese/devel/ukai-v0.1-pre2.ttf... Error: /rangecheck in --string-- Operand stack: Uming Ukai Uming-pre Ukai-pre Font Ukai-pre 713801 Ukai-pre --nostringval-- Ukai-pre (/data/Exer/cvsTest/fonts-chinese/devel/ukai-v0.1-pre2.ttf) false --nostringval-- 103524 103524 Execution stack: %interp_exit .runexec2 --nostringval-- --nostringval-- --nostringval-- 2 %stopped_push --nostringval-- --nostringval-- %loop_continue 5 3 %oparray_pop --nostringval-- --nostringval-- false 1 %stopped_push .runexec2 --nostringval-- --nostringval-- --nostringval-- 2 %stopped_push --nostringval-- 4 3 %oparray_pop 5 3 %oparray_pop --nostringval-- --nostringval-- --nostringval-- --nostringval-- --nostringval-- false 1 %stopped_push 8 4 %oparray_pop --nostringval-- --nostringval-- --nostringval-- --nostringval-- --nostringval-- %array_continue --nostringval-- --nostringval-- --nostringval-- %loop_continue --nostringval-- --nostringval-- --nostringval-- 13 --nostringval-- --nostringval-- false 1 %stopped_push --nostringval-- --nostringval-- --nostringval-- --nostringval-- --nostringval-- %array_continue --nostringval-- --nostringval-- --nostringval-- --nostringval-- Dictionary stack: --dict:1060/1123(ro)(G)-- --dict:0/20(G)-- --dict:88/200(L)-- --dict:17/17(ro)(G)-- --dict:1060/1123(ro)(G)-- --dict:28/50(ro)(G)-- --dict:12/40(L)-- Current allocation mode is local Current file position is 19 There is the same bug in ghostscript upstream. http://bugs.ghostscript.com/show_bug.cgi?id=687889 And the bug had been fixed, but I downloaded the newest gs and test, I found that it is not fixed. I use -dTTFDEBUG -dOSTACKPRINT -dESTACKPRINT to test, and get a lot of debuging information. [haae@localhost bin]$ ./gs -dTTFDEBUG -dOSTACKPRINT -dESTACKPRINT AFPL Ghostscript CVS PRE-RELEASE 8.54 (2005-10-20) Copyright (C) 2005 artofcode LLC, Benicia, CA. All rights reserved. This software comes with NO WARRANTY: see the file PUBLIC for details. GS>/Uming findfont Loading Uming font from /home/haae/Work/uming.ttf... EBDT 16894492 2454909 EBLC 19349404 554768 GDEF 16890024 258 GPOS 16893492 1000 GSUB 16890284 3208 OS/2 456 86 VORG 19904172 8 cmap 98208 106942 cvt 205152 4 gasp 16890016 8 glyf 302928 16306274 head 332 54 hhea 388 36 hmtx 544 97662 loca 205156 97772 maxp 424 32 name 16609204 42403 post 16651608 238408 vhea 19904180 36 vmtx 19904216 97662 Error: /rangecheck in --string-- Operand stack: /Uming /Font /Uming 171777 /Uming -mark- /Uming (/home/haae/Work/uming.ttf) false -file- 106942 106942 Execution stack: --%interp_exit-- .runexec2 -file- {--dup-- null --ne-- {--exec-- true} {--pop-- false} --ifelse--} null 2 --%stopped_push-- -file- {prompt {(%statementedit) (r) --file--} --stopped-- {--pop-- --pop-- $error /errorname --get-- /undefinedfilename --eq-- {.clearerror --exit--} --if-- /handleerror --.systemvar-- --exec-- null} --if-- --cvx-- {.runexec} execute} --%loop_continue-- 2 3 --%oparray_pop-- {--pop--} {$error /newerror --get-- --and-- {/handleerror --.systemvar-- --exec-- --flush-- true} {false} --ifelse--} false 1 --%stopped_push-- .runexec2 -file- {--dup-- null --ne-- {--exec-- true} {--pop-- false} --ifelse--} null 2 --%stopped_push-- -file- 1 3 --%oparray_pop-- 2 3 --%oparray_pop-- {--exch-- --pop-- --exch-- --pop--} {--end--} {--exch-- --vmstatus-- --pop-- --exch-- --pop-- --exch-- --sub-- 2 --index-- .getvminstance {--dup-- 1 1 --put-- 2 3 -1 --roll-- --put--} {--pop--} --ifelse-- --exch-- --pop--} {--.userdict-- /.currentresourcefile 3 -1 --roll-- --put-- {--stop--} --if--} null false 1 --%stopped_push-- 5 4 --%oparray_pop-- {--counttomark-- 1 --sub-- {--.aliasfont--} --repeat-- --end-- --exch-- --pop-- --exch-- --pop--} {--not-- {.scannextfontdir {--counttomark-- 1 --sub-- {--pop--} --repeat-- .dofindfont} {systemdict /.nativefontmapbuilt --get-- --not-- {.buildnativefontmap} {false} --ifelse-- {.dofindfont} {QUIET --not-- {(Didn't find this font on the system!\n) --print--} --if-- --dup-- defaultfontname --eq-- {QUIET --not-- {(Unable to load default font ) --print-- --dup-- =only (! Giving up.) = --flush--} --if-- /findfont --cvx-- /invalidfont signalerror} --if-- $error /SubstituteFont --get-- --exec-- .stdsubstfont} --ifelse--} --ifelse--} --if--} {{true} {.tryloadfont} --ifelse--} [] {--exch-- --pop-- --dup-- --type-- /nametype --eq-- {.checkalias .tryfindfont --exit--} {--dup-- --dup-- --type-- --dup-- /arraytype --eq-- --exch-- /packedarraytype --eq-- --or-- --exch-- --xcheck-- --and-- {--exec-- --.FontDirectory-- 1 --index-- --.knownget-- {--exch-- --pop-- true --exit--} --if--} {.loadfontloop {true --exit--} --if--} --ifelse--} --ifelse-- false} --%array_continue-- {false} {{true --exit--} --if--} {--dup-- --type-- /stringtype --ne-- {QUIET --not-- {(Can't find font with non-string name: ) --print-- --dup-- =only (.) = --flush--} --if-- --pop-- false --exit--} --if-- --findlibfile-- --not-- {QUIET --not-- {(Can't find \(or can't open\) font file ) --print-- --dup-- --print-- (.) = --flush--} --if-- --pop-- false --exit--} --if-- DISKFONTS {--.currentglobal-- true --.setglobal-- 2 --index-- (r) --file-- FontFileDirectory --exch-- 5 --index-- --exch-- .growput --.setglobal--} --if-- QUIET --not-- {(Loading ) --print-- 2 --index-- =only ( font from ) --print-- 1 --index-- --print-- (... ) --print-- --flush--} --if-- LOCALFONTS {false} {/setglobal --where--} --ifelse-- {--pop-- /FontType .findfontvalue {1 --eq--} {false} --ifelse-- --.currentglobal-- --exch-- /.setglobal --.systemvar-- --exec-- --.FontDirectory-- 3 --index-- --.undef-- 1 --index-- (r) --file-- .loadfont --.FontDirectory-- --exch-- /.setglobal --.systemvar-- --exec--} {.loadfont --.FontDirectory--} --ifelse-- QUIET --not-- {-dict- /level2dict --known-- {--.currentglobal-- false --.setglobal-- --vmstatus-- true --.setglobal-- --vmstatus-- 3 -1 --roll-- --pop-- 6 -1 --roll-- --.setglobal-- 5} {--vmstatus-- 3} --ifelse-- {=only ( ) --print--} --repeat-- (done.) = --flush--} --if-- --dup-- 3 --index-- .fontknownget {--dup-- /PathLoad 4 --index-- --.putgstringcopy-- --exec-- 4 1 --roll-- --pop-- --pop-- --pop-- true --exit--} --if-- --exch-- --dup-- (r) --file-- .findfontname {2 --index-- 1 --index-- .fontknownget {--dup-- 4 -1 --roll-- /PathLoad --exch-- --.putgstringcopy-- --exec-- 3 -1 --roll-- --pop-- --exch-- QUIET {--pop--} {(Using ) --print-- =only ( font for ) --print-- 1 --index-- =only (.) = --flush--} --ifelse-- --exch-- --pop-- true --exit--} --if-- --pop--} --if-- --pop-- --pop-- QUIET --not-- {(Loading ) --print-- --dup-- =only ( font failed.) = --flush--} --if-- false --exit--} --%loop_continue-- {QUIET --not-- {-dict- /level2dict --known-- {--.currentglobal-- false --.setglobal-- --vmstatus-- true --.setglobal-- --vmstatus-- 3 -1 --roll-- --pop-- 6 -1 --roll-- --.setglobal-- 5} {--vmstatus-- 3} --ifelse-- {=only ( ) --print--} --repeat-- (done.) = --flush--} --if-- --dup-- 3 --index-- .fontknownget {--dup-- /PathLoad 4 --index-- --.putgstringcopy-- --exec-- 4 1 --roll-- --pop-- --pop-- --pop-- true --exit--} --if-- --exch-- --dup-- (r) --file-- .findfontname {2 --index-- 1 --index-- .fontknownget {--dup-- 4 -1 --roll-- /PathLoad --exch-- --.putgstringcopy-- --exec-- 3 -1 --roll-- --pop-- --exch-- QUIET {--pop--} {(Using ) --print-- =only ( font for ) --print-- 1 --index-- =only (.) = --flush--} --ifelse-- --exch-- --pop-- true --exit--} --if-- --pop--} --if-- --pop-- --pop-- QUIET --not-- {(Loading ) --print-- --dup-- =only ( font failed.) = --flush--} --if-- false --exit--} {--.FontDirectory-- --exch-- /.setglobal --.systemvar-- --exec--} {false --.setloadingfont--} {/FAPI_hook_disable --pop-- {{.loadfontfile} .execasresource} --count-- 1 --sub-- 2 --.execn-- --count-- --exch-- --sub-- {--pop--} --repeat-- --exit--} --%loop_continue-- {--count-- --exch-- --sub-- {--pop--} --repeat-- --exit--} 10 {--.userdict-- /.currentresourcefile 3 -1 --roll-- --put-- {--stop--} --if--} -file- false 1 --%stopped_push-- {--pop--} {.getpost .pickcmap --mark-- .charkeys .ttkeys .definettfont} {/head tabdict /head --get-- --def-- /post tabdict /post --.knownget-- {--dup-- 0 --get-- /post_first_part --exch-- --def--} {null} --ifelse-- --def-- load_stripped --not-- {/locatable tabdict /loca --get-- --def-- /numloca locatable --dup-- --type-- /stringtype --eq-- {--length--} {0 --exch-- {--length-- --add--} --forall--} --ifelse-- locatable --type-- /stringtype --eq-- {/.indexloca {} --def--} {/.indexloca /.findseg --load-- --def--} --ifelse-- head 50 getu16 0 --ne-- {/getloca {2 --bitshift-- locatable --exch-- .indexloca getu32} --def-- 4 --idiv-- 1 --sub--} {/getloca {--dup-- --add-- locatable --exch-- .indexloca getu16 --dup-- --add--} --def-- 2 --idiv-- 1 --sub--} --ifelse-- --def-- tabdict /glyf --get-- --dup-- --type-- /stringtype --ne-- {.dividesfnts tabdict /glyf 3 -1 --roll-- --put--} {--pop--} --ifelse--} {/numloca tabdict /maxp --get-- 4 getu16 --def--} --ifelse-- /sfnts --mark-- offsets tabs {concatstrings} --forall-- tabs {0 4 --getinterval-- tabdict --exch-- --get-- --dup-- --type-- /stringtype --ne-- {--aload-- --pop--} --if--} --forall-- --]-- --def--} [(cvt \000D\005\021\000\003!`\000\000\000\004) (loca\305\017\217|\000\003!d\000\001}\354) (glyfJ\343\233\327\000\004\237P\000\370\320b) (name#.0W\000\375o\264\000\000\245\243) (post\312H\376\(\000\376\025X\000\003\243H) (vhea\016Pk\356\001/\266\264\000\000\000$) (vmtxd\373\017a\001/\266\330\000\001}~)] {--dup-- 0 4 --getinterval-- /tname --exch-- --def-- --dup-- 8 getu32 /tpos --exch-- --def-- --dup-- 12 getu32 /tlen --exch-- --def-- load_stripped -dict- tname --known-- --and-- {--pop-- file_table_pos tname --mark-- tpos tlen --]-- --put-- tabdict tname () --put--} {8 sfpos putu32 tpos fpos --gt-- {load_stripped {f tpos --setfileposition--} {f tpos fpos --sub-- () /SubFileDecode --filter-- --dup-- --flushfile-- --closefile-- /fpos tpos --def--} --ifelse--} --if-- f tlen readtables_ tname --get-- --exec-- tabdict tname 3 -1 --roll-- --put-- /sfpos sfpos tlen --dup-- 1 --and-- --add-- --add-- --def--} --ifelse-- /fpos fpos tlen --add-- --def--} --%array_continue-- {/fpos fpos tlen --add-- --def--} {tabdict tname 3 -1 --roll-- --put-- /sfpos sfpos tlen --dup-- 1 --and-- --add-- --add-- --def--} {--dup-- 0 4 -1 --roll-- --getinterval-- 3 -1 --roll-- --exch-- --dup-- () --ne-- {--readstring--} --if-- --pop-- --pop--} Dictionary stack: --dict:1116/1686(ro)(G)-- --dict:0/20(G)-- --dict:70/200(L)-- --dict:17/17(ro)(G)-- --dict:1116/1686(ro)(G)-- --dict:33/50(ro)(G)-- --dict:15/40(L)-- Current allocation mode is local Current file position is 16 [haae@localhost bin]$ the problem is that gs don't handle 'cmap' of more than 65535 length, and cmap length of uming.ttf (or ukai.ttf) is >100000. It's because of PostScript Language limitation. Array/Dict can't be created with more than 65535 in PostScript. that's why I said it's difficulty in the weekly meeting. FYI. I talked with gs-cjk guy about this problem and he have an idea to fix this problem. I'll investigate this with him. reassigning to ghostscript. Created attachment 123708 [details]
a patch that supports to read a big cmap/post table from TrueType font.
This patch is necessary to read a big cmap/post table from TrueType font if the
fonts has. it fixes this problem also.
|
Created attachment 120043 [details] a proposal patch to fix this issue