Log of #ghostscript at irc.freenode.net.

Search:
 <<<Back 1 day (to 2017/04/10)20170411 
kens chrisl ping08:47.12 
chrisl kens: pong08:50.12 
kens COuld you spare me some time to look at a problem ? I'm debugging my way through the FAPI code and it occurs to me you could probably do it faster08:50.33 
chrisl Sure08:50.48 
kens let me send you 2 files08:50.58 
  OK so this is the bug from yesterday. If I make a PDF file with the PostScirpt, then I get the glyph rednered, if I amek an EPS then I don't. But....08:51.48 
  If I don't subset the font, then the EPS works.08:51.57 
  I've checked the font in the PDF and the EPS and they are identical (byte comparison)08:52.17 
  I checked the subset font and the non-subset font and of coure they are different, but the relevant portions look the same to me08:52.38 
chrisl So, these files are the ps2write output?08:52.44 
kens Yes they are both output from eps2write08:52.52 
  I'm trying to figure out why one works and one doesn't08:53.01 
  THe only difference is that one file has a subset font, the other doesn't08:53.14 
  If you like I cna send you the original PDF (reduced to 1 glyph) that produced the files.08:53.36 
chrisl I'll poke at these for a bit. I'll let you know if I need the original08:54.22 
kens I then started debugging my way through GS to see where the difference in the 2 files occurs, and I was in the middle of the FAPI code when I realised its been a long time since I was here, and you can probably tell me the difference quite quickly08:54.34 
  Thanks chrisl08:54.37 
chrisl Hmmm, not sure about quickly.....08:54.57 
kens Well, more quickly than me probably08:55.07 
  I'm kind of puzzled at the moment. THere's no POST table in either font, the glyph in question is at the same GID, contains the same data and doesn't seem to be a composite glyph08:55.51 
  The CMAP tanle entry looks OK, and the currentpoints seem OK in both cases. Also the same font works when its a PDF file.08:56.31 
  I'll keep poking this in the meantime anyway08:57.10 
  I might get lucky :-)08:57.19 
avih tor8: hey :) any comments on moving mujs to ISC?09:01.34 
kens avih you might want to consider asking the question on the #mupdf channel09:01.53 
avih kens: how so?09:02.06 
chrisl So, we get a character code of 167, which we look up in the encoding array, and get the name /section1, which we then lookup in the CharStrings dictionary to find the GID, and we get a null object back - hence we end up using the .notdef09:02.47 
kens Well, now that MuPDF is so popular, we'd like people to move the conversation there, and leave this one for Ghostscript. Its partly an awareness thing, sepearating out the 2 products09:02.47 
  avih, also I see tor8 and Robin_Watts talking there :-)09:03.00 
  chrisl section1 ? I was exepcting (and thought it was) section09:03.16 
  I must have misread that in the string09:03.22 
avih kens: now you're teasing :)09:03.25 
kens :-P09:03.34 
avih thx though :)09:03.46 
chrisl kens: maybe the '1' is left over, let me check the string length....09:03.47 
kens It coudl be, I thought I saw the string being section with a length of 709:04.04 
  I know these are not null terminated09:04.17 
  avih you're welcome09:04.27 
  I can poke tor8 if needed to come here, if you can't get to that channel for some reason09:04.51 
avih kens: regardless though, was there anything specific to make MuPDF "so popular"? (i'm not following it closely)09:04.57 
chrisl Yes, /section - but we still end up finding a null object in the CharStrings dict09:05.20 
avih did a major distro decided to use it at default, or anything similar?09:05.23 
kens Not really, its just that we've noticed that most conversations here are now MuPDF-related, so it seemed reasonable to have its own channel.09:05.27 
avih gotcha. thx again.09:05.40 
kens chrisl give me a second to run the debugger, where are you seeing the ChartStrings lookup FAPI_do_char ?09:06.04 
  avih no problem09:06.13 
chrisl ps_get_glyphname_or_cid()09:06.21 
kens RIght give me a second to rerun the debugger.09:06.34 
chrisl About line 2086 in zfapi.c09:08.32 
kens Yeah I'm in there now, puzzling over it09:08.44 
  I guess I should run the working version for a comparison09:08.52 
  I see that the charstring is NULL on return for sure.09:09.32 
chrisl The nosubset.eps we get a valid value from the CharStrings dict - GID == 13409:09.52 
kens Which is what I'd expect, the GID for the glyph is indeed 13409:10.15 
  So fundamentall;y its a problem building the CharStrings dictionary I guess.09:10.33 
  I should probably modify the two files to dump the contents of Charstrings09:10.46 
  Must be somewhere in the support code for type 42 fonts.....09:11.09 
  Actually, I'm seeing a NULL charstring from the no subset font too09:11.52 
avih i'm off. i'll be at #mupdf . later.09:12.27 
kens Maybe I'm looking at the wrong code. Anyway, off to modify the EPS file09:12.31 
  avih I see you there, have fun :)09:12.38 
avih :)09:12.45 
kens Seems like tor8 is ignoring you :-(09:12.53 
chrisl kens: line 2089 in zfapi.c gets the glyph index09:13.26 
kens Hmm, OK. TO be honest the problem is most likely in the EPS file, since the Charstring dictionary appears to be incorrect.09:14.04 
  So I was focusing on that.09:14.13 
  OK I see hte difference now09:15.35 
  And it does run a different path. Back to the EPS09:15.44 
chrisl In the subsetted file, the CharStrings dict only has two entries09:15.44 
  "/germandbls 134" and "/.notdef 0"09:16.09 
kens Ah now germandbls will be the problem09:16.18 
  It should be section of course09:16.25 
  I wonder how that's happening....09:16.38 
  How are you dumping out the Charstrings ?09:16.57 
chrisl -dPDFR_DEBUG09:17.12 
kens D'oh09:17.21 
chrisl In the non-sbset file, /germandbls is 13709:17.44 
kens Interesting09:17.54 
chrisl And /section is 13409:18.05 
kens I guess I need to go see how that gets generated. OK thanks chrisl, back to me now I think, you've saved me a load of time09:18.24 
chrisl kens: I'd guess that the posttable is wrong - but oddly PDFR_DEBUG doesn't seem to dump the posttable info09:21.16 
  Actually, ignore that, it seem to be empty in both cases09:22.00 
kens Yeah the fonts in both cases have no POST09:22.30 
chrisl Ah!!09:24.37 
kens I'm going to guess you beat me to it09:24.46 
chrisl "Using the TT cmap encoding for Windows Unicode."09:24.49 
  "Using the TT cmap encoding for Macintosh Roman."09:24.56 
kens Oh, that's interesting09:25.26 
chrisl The non-subset one is using the Windows Unicode cmap09:25.36 
kens So the working one is using Windows09:25.43 
  RIght.09:25.48 
  So different CMAPs I guess09:26.02 
  Or different preferences perhaps09:26.15 
  Yeah it checks the CMAP in the header looking for a 3,1 CMAP09:26.49 
  the eps2write header that is09:26.59 
  Yeah the non-subset is a 3,1 table, the subset one is a 1,0 table09:27.59 
chrisl Then that affects how we build the encoding, and the CharStrings09:28.03 
kens Yep, it all boils down to us using a different CMAP, that's got to be in the C code in eps2write/pdfwrite. All part of the godawful mess which is our TrueType writer.09:28.44 
  I really need to maek the time to rewrite that09:28.53 
  chrisl thanks again, now I know where to go poke in the pdfwrite code09:29.47 
 Forward 1 day (to 2017/04/12)>>> 
ghostscript.com #mupdf
Search: