IRC Logs

Log of #ghostscript at irc.freenode.net.

Search:
 <<<Back 1 day (to 2012/04/08)2012/04/09 
runa does andybody know if mupdf supports synctex or will?02:24.20 
jzmer how do substitute a truetype font with a postscript/opentype one?10:43.10 
  cidfnmap doesnt seem to work, and direct /foo1 /foo2 results in error10:43.27 
  direct /foo1 /foo2 in Fontmap.GS10:43.38 
kens Which application ? PostScript/PDF input ?10:43.39 
jzmer a postscript generated by firefox via cairo10:44.02 
kens WHy are you trying to replace a TrueType font with a PostScrtipt font ? What do you expect to achieve ?10:44.08 
jzmer just curious, nothing more10:44.19 
  as for what i expected to achieve, font substitution10:44.46 
kens Depending on the content of teh PostScript file, you may get an error if you try this, or nothign might happen at all (more liekly)10:44.54 
  wPostScript will use embedded fonts in preference to system fonts10:45.10 
jzmer i dont think so. since firefox, when generating ps' doenst seem to embed the font already10:45.45 
kens Are you sure you can tell ? Its not always easy. If the font is not embedded tehn tits not a TrueType font, its a font reference, so you still can't 'replace' a TT font with a PS one.10:46.38 
jzmer unless you want me to copy paste /foo by hand in the ps file ...10:47.00 
kens I don't particularly want you to do anything.10:47.26 
  But your quesation so far doesn't make sense to me10:47.37 
jzmer hmm10:48.19 
kens If you r PostScript file contains a TrueType font, then GS willl use that to render with.10:48.46 
  If it doesn't then it doesn't contain a TrueType font.10:48.58 
  SO either way you can't 'subsitute a TrueType font with a PostScript font'10:49.18 
jzmer i think i will check with #firefox in mozilla's irc to get an defintie answer on whether they embedded the font or not10:49.29 
  thanks.10:49.45 
kens Or you could share the PostScript file and we could tell whether the font is embedded10:49.48 
jzmer i think i figured out what the issue is now12:20.40 
  firefox did embed fonts in the ps file, which makes font substitution irrelevant12:21.08 
  and hence, i began to try removing the embedded fonts via http://stackoverflow.com/questions/2670809/how-to-get-ghostscript-to-use-embedded-fonts-in-pdf12:22.03 
  but that basically convert the file to vector graphics12:22.31 
  however, per http://partners.adobe.com/public/developer/en/font/5175.CID_ATM.pdf12:23.08 
kens I can't see that code doing anythign useful.12:23.10 
jzmer it is possible to preserve the font name yet still does not embed the font12:23.34 
kens It is always possible to embed a font reference.12:23.45 
  Which requests the font but does not embed it.12:23.56 
jzmer right, but then the problem is, how do you do this without hand-edit the ps file...12:24.05 
kens Fundamentally, you don't,12:24.19 
  The PostScript program is created by the application/driver software.12:24.37 
  Once it is created you are left with hand-editing it if you want to change it.12:24.54 
  BTW that document is specific to Adobe Type Manager, I wouldn't suggest using it for anything else.12:25.16 
jzmer im just saying that pdf is an example of embed only a font reference but not the font itself12:25.49 
kens What ?12:26.05 
  PDF files can contain fonts or not, just like PostScript12:26.23 
jzmer hmm, i just wanted to say how do you achieve "font reference" as in http://partners.adobe.com/public/developer/en/font/5175.CID_ATM.pdf12:27.12 
kens You could add the named fonts to the NeverEmbed list when creating the PDF file. But if the fonts are subset they will probably have 'surprising' names.12:27.25 
  jzmer that document is specific to Adobe Type Manager, you cna't use it for anythign else.12:27.47 
  Here is a PostScript program which does not icnlude an embedded font:12:27.58 
  %!12:28.33 
  10 10 moveto12:28.33 
  (Hello) show12:28.33 
  showpage12:28.33 
jzmer ok , i know that you can do something like /Times 20 selectfont <blahblahblah> (XYZ)12:28.35 
kens Well there you are then, that's how you do it.12:28.47 
  My example was missing a line due to IRC swallowing the font selection. Doesn't like '/'12:29.11 
  jzmer, so what *is* your question ?12:29.44 
jzmer the question "was" how do you preserve font reference in a existing ps/pdf file without embedding it, and without hand-editing it, but then you answered the question. so the only chance for me to remove the embedded font is, to hand-edit it ...12:31.27 
  unless i went back to #firefox in irc.mozilla.org to ask them for a way for firefox to not embed the font in the first place12:32.22 
kens Yes, once the PostScript program is created, only hand-editing, or a carefully written script will be able to do anything with it.12:32.27 
  jzmer I doubt they would be interested in that, what would be the point ?12:32.41 
  Systems where the font is missing would not be able to print the file properly12:33.01 
chrisl jzmer: so, why would you want to ignore the intended font, and force the use of some random other font?12:33.01 
jzmer chrisl: because STHeitiSC is truetype, and i wanna replace that with AdobeHeitiStd-Regular, which has postscript outline. however, since now you've asked, i think i can use firefox's inspect/debug to edit the css file to include AdobeHeitiStd-Regular12:35.43 
kens is unable to fathom why you would want to use a PostScript font in place of a TrueType font.12:36.33 
jzmer chrisl: and as for the font problem yesterday, it turns out to be a vendor-specific font12:36.37 
  vendor-rip-specific font12:36.50 
  distiller failed at that12:37.03 
chrisl jzmer: okay, so why do you want to replace a TTF with another font format - TTF outlines are supported in PS (Type 42)12:38.50 
kens Plus worries about Encodings, metrics....12:39.28 
jzmer ... because im stupid enough to forget i can "inspect" in firefox to force another font ...12:40.25 
chrisl Doesn't Firefox use the display font when printing, then - pretty sure it does...... I'm not being stroppy, here, I'm intrigued to know, is all12:41.38 
jzmer since the targeted website has a invalid css file, and my fontconfig configuration is choppy here12:42.58 
  one last question, which is irrelevant to the question above12:44.40 
  what does gsx adds to gs? log says gtk+, but what does that mean? ghostscript certainly does not have a widget system12:45.14 
kens Never heard of gsx12:45.25 
  Nothing to do with us12:45.36 
jzmer i think if you build ghostscript with --enable-gtk or --enable-gtk+ you will get it12:45.51 
chrisl Basically, gsx uses the display device to dump the rendered output into a gtk+ pixmap buffer - it's just an usage example, really12:46.07 
kens I'm thinking this won't work on Windows ;-)12:47.00 
jzmer hmm, sounds like what behdad's killed cairo device12:47.22 
  does12:47.27 
  could be useful if you wanna ditch platform-specific devices12:48.04 
chrisl The cairo device in GS? That did at least some "high level" things, but was very incomplete.12:48.22 
  kens: as you can get gtk+ on Windows, the basic code could be made to work without too much hassle, but not much point......12:48.57 
  jzmer: if we were to write the x11 devices, we'd almost certainly use the display device instead of how it's currently done.12:50.31 
  s/write/rewrite12:50.40 
marcosw_ morning13:17.57 
kens Morning marcosw_13:18.06 
  What is marcosw_bot ?13:18.16 
marcosw_ I was toying with the id of having the cluster send irc messages when clusterpush jobs are finished, so people wouldn't have to check their email.13:18.52 
  ^id^idea13:19.03 
kens Hmm, but I'd haev to check irc instead :-)13:19.07 
Robin_Watts marcosw: Isn't that what the dashboard is for ?13:19.39 
marcosw_ I could send a sms to your phone :-) Or have a modem call your house.13:19.51 
chrisl We could have bmpcmp fax us the results....... ;-)13:21.01 
marcosw_ Robin_Watts: belts and suspenders. dashboard, email, irc, carrier pigeon, ….13:21.37 
  Robin_Watts: btw, I was in the process of composing an email, but since I have you live I made a slight change to bmpcmp that might need a change in pngs2html (or whatever it's called).13:22.34 
Robin_Watts marcosw_: Go on...13:23.05 
marcosw_ If there are no differences found by bmpcmp the cluster now generates an empty filename.00000.meta file and uploads that to the cluster.13:23.24 
Robin_Watts oh.13:23.42 
marcosw_ previously it wouldn't upload anything and you wouldn't be able to tell if the file had even been run.13:24.01 
Robin_Watts I would prefer that we make it say "no differences found"13:25.12 
  to stdout/stderr, and then the cluster could catch that.13:25.22 
  meta files hold meta information 'per output image'.13:25.59 
  Not per run.13:26.07 
  i.e. the existence of filename.00000.meta implies that there should be filename.00000.bmp filename.00001.bmp and filename.00002.bmp too.13:28.02 
  Capturing stdout/stderr to filename.out would make sense, because then we could catch other error messages that bmpcmp produces too.13:28.43 
  (Such as 'refusing to diff image due to malloc failure' or 'refusing to diff images because width/height have changed')13:29.21 
marcosw_ the cluster does now catch stdout/stderr from bmpcmp and sends that email to the user. see ~regression/cluster/bmpcmpResults.txt on casper for an example.13:29.43 
Robin_Watts If you could make it capture each stdout stderr to a .out file, and upload that too, then I can include that in the pngs2html thing.13:30.39 
marcosw_ however, I feel it would be preferable to also show which files generated error or no differences on the bmpcmp generated web page.13:30.49 
Robin_Watts Right. So that's what I'm suggesting.13:31.42 
  Rather than creating 1 single 'stderr/stdout' file, create one for each run.13:32.09 
  and I'll update pngs2html to include it.13:32.30 
marcosw_ make sense. I'll continue to email out the list of errors but will also upload a file.out to the bmpcmp directory (an empty file indicating no error).13:34.45 
Robin_Watts cool. Let me know when that's in place and I'll tweak pngs 2html13:36.48 
kens Grrr, my code to free pattern memory works fine on Windows, seg faults on Linux on 'some' files :-(15:35.31 
mvrhel sounds like the kind of fun I had last week15:36.55 
  although mine was just a rendering problem and only with the release on linux15:37.10 
kens Been there before, I'll have to use gdb :-(15:37.13 
mvrhel kens: have you used ddd at all? it is crude but useful IDE15:38.14 
kens dd is what I use in fact15:38.26 
mvrhel ok15:38.33 
henrys kens:sounds like something you should valgrind before you even get to the debugger.15:57.39 
kens seg fault should be easy to find ;-)15:58.00 
Robin_Watts run under the debugger, and then see what the backtrace is when the SEGV happens. Much easier than valgrind :)16:01.59 
henrys I was speculating an odd problem that would crash long after the damage (valgrind detectable) was done... I guess we'll see.16:04.41 
Robin_Watts henrys: Ah, right, yes, possibly.16:05.09 
kens Nah, I can guess what the problem is, I just need to find where teh memory is getting freed before I get to freeing it again16:05.11 
henrys a pcl customer found a nice leak in the pattern code. It turns out any pattern from pcl results in bumping the target device reference count16:06.31 
kens I saw that16:06.43 
Robin_Watts oops.16:06.53 
  I think I've just spotted a memory overread in mupdfs image code.16:07.56 
  Fixing it may be 'interesting'.16:08.17 
mvrhel whew. got the tile clip stuff working now with the new color type16:16.45 
  making my way through the last 10 files that seem to show real diffs. I am hoping this fixes a few of them16:19.35 
kens OK time to go, night alll16:21.43 
henrys if the output matches and main's return code is non zero (error) does the cluster code report an issue?16:22.32 
mvrhel ok now I am down to 4 files, 3 of which appear to be a common issue with pattens and transparency16:30.18 
ray_laptop missed kens. I was going to mention that I usually resort to -ZA to see when a particular item is being freed. Sort of brute force, but that's where searching the output with an editor comes into play.16:31.53 
  mvrhel: sounds good.16:32.02 
mvrhel slow but sure.16:32.18 
Robin_Watts Memento should be good for spotting double frees too - it keeps blocks around deliberately to watch for it.16:32.40 
  </CompulsoryMementoPlug>16:32.51 
ray_laptop Robin_Watts: yeah, but if it's an object in a chunk, it doesn't help16:33.07 
Robin_Watts ray_laptop: Does too :)16:33.17 
  Memento nobbles the chunk memory manager to only have 1 object per chunk.16:33.34 
ray_laptop Robin_Watts: is memento configured as a gs_memory_t ?16:33.41 
Robin_Watts No.16:33.52 
ray_laptop Robin_Watts: does it also do that for the GC memory ?16:34.07 
Robin_Watts Pass.16:34.28 
  The chunk memory manager has a line in it that says "if this object is >= x bytes, then put it in a chunk of it's own"16:34.51 
  Memento sets 'x' to be 1.16:34.59 
mvrhel aha! found the issue. when the target is pdf14cmykspot, the pattern tile is not getting set as a planar type16:37.08 
Robin_Watts henrys: I can't answer your cluster question - you need marcosw_. My pidgin perl lets me down I'm afraid.16:37.29 
ray_laptop Robin_Watts: nm. I see in gsalloc.c and #ifdef MEMENTO iimem->large_size = 116:37.53 
  Robin_Watts: I just hadn't looked.16:38.08 
Robin_Watts ray_laptop: That's the puppy.16:38.16 
henrys Robin_Watts:np I thought you might happen to know.16:38.16 
mvrhel brb16:38.35 
Robin_Watts henrys: I suspect the cluster looks at return codes BEFORE comparing md5 sums.16:38.49 
ray_laptop mvrhel: isn't there a special op call to see if a device is planar ?16:39.03 
marcosw_ henrys: are you asking if the cluster detects the return code from main?16:39.13 
henrys marcosw_:more or less.16:39.57 
Robin_Watts marcosw_: henrys asked "if the output matches and main's return code is non zero (error) does the cluster code report an issue?"16:40.14 
marcosw_ I actually don't remember, let me check.16:40.17 
henrys when it's detected is more important - I expect the output to match but get an error code.16:40.36 
  for the test I imagine doing, can I do that?16:41.20 
marcosw_ the answer is no, if the md5sums match and no error message is printed out the error code is ignored. I presume you'd like that behavior to change?16:42.43 
henrys yes for my experiment, but it seems reasonable to always look at the error code, don't you think?16:44.36 
ray_laptop marcosw_: BTW, I just happened to scroll to the end of the 'aging' report and see a whole mess of "bugs that have been resolved but not closed" -- seems like this was to be a reminder to you to communicate back to the customer, then "CLOSE" it, but with such a long list, it probably isn't helping you.16:45.06 
marcosw_ ray_laptop: true, I don't really use that list. I keep telling myself I should either use the information or stop emailing it out, preferably the former :-)16:46.00 
ray_laptop mvrhel: avadhut sure is persistent :-(16:46.21 
mvrhel ray_laptop: yes there is. the pdf14 device was not planar in the sense that it was not using the planar device buffers but its own planar buffers 16:46.22 
  hehe. yes16:46.27 
  I am going to try to get to that this week16:46.49 
Robin_Watts henrys: Seems reasonable to me. A test file that always returns an empty bitmap and an error would never fail otherwise.16:46.51 
mvrhel I *really* want to get this tiffsep thing wrapped up16:47.09 
  if I step away from it it is too hard to get started back into again16:47.20 
marcosw_ henrys: I agree we should not be ignoring the error code. I'll make that change but I have to attend a presentation that starts in 15 minutes, so it will have to wait for a couple of hours.16:47.23 
henrys marcosw_:okay16:47.42 
ray_laptop mvrhel: I agree that wrapping up the planar spot color stuff is higher priority (although avadhut would probably disagree)16:48.00 
mvrhel shaving .02 secs of of his time vs. me getting something useful done16:48.46 
marcosw_ henrys: I believe the cluster now detects non-zero exit codes, independently of md5sum matches or error messages (or at least I think it's supposed to, I can't test this since I can't easily force a non-zero return value without also causing an error).17:08.11 
mvrhel oh my17:08.31 
  need to add copy_planes into the pdf14 device now...17:08.40 
  which will actually speed things up when drawing patterns into this device17:09.05 
  argh. things are a bit messed up though as the number of planes in the tile is 3 and we are going into a pdf14gray device. 17:11.05 
  oh actually in this case the pdf14gray device has changed itself to rgb due to a group push so all is well17:20.42 
  of course two of my final issues appear to be cairo files with a huge patterns18:32.48 
  this thing is insane18:33.12 
  hmm somehow I have broken the pdf14 device big time. off for lunch for a bit18:58.36 
  bbiaw21:00.36 
 Forward 1 day (to 2012/04/10)>>> 
ghostscript.com
Search: