IRC Logs

Log of #ghostscript at irc.freenode.net.

Search:
 <<<Back 1 day (to 2016/01/26)20160127 
tor8 Robin_Watts: fallback font context on tor/master14:29.05 
Robin_Watts Thanks. Will look at that in a bit.14:29.24 
tor8 Robin_Watts: I tried to minimize the amount of rebase conflicts you'll need14:29.48 
  this code does away with the fallback font chain altogether14:30.02 
  fz_encode_glyph_with_fallback looks at the script and tries to find a font that can encode the glyph14:30.25 
  but I don't handle Common and Inherited; I'm not going to bother with that since your bidi code will do that anyway14:30.46 
Robin_Watts I never call fz_encode_glyph_with_fallback any more.14:31.10 
tor8 Robin_Watts: you could do it, to figure out where to split runs where the font changes14:31.41 
  as I was talking about yesterday14:31.53 
Robin_Watts No, that's all done before it gets to me.14:32.09 
tor8 to replace the best_font stuff14:32.22 
Robin_Watts The first thing I see are flow nodes. They are already split at fonts.14:32.33 
  so I am guaranteed never to have different fonts in a given node.14:32.47 
tor8 split at actual fonts used, or split on "user set" fonts?14:32.52 
Robin_Watts Split on user set fonts.14:33.08 
tor8 right. so you'll need to split (or iterate) over actual used font for passing to harfbuzz14:33.30 
  or harfbuzz will try to encode symbols using the surrounding script's font which will fail14:34.04 
Robin_Watts OK, so before I call shape, I'll want to try to encode each char with fz_encode_glyph_with_fallback.14:34.28 
  And in the event of a fallback, what does that give me ?14:34.53 
tor8 consider: "AB+CD" AB and CD are latin, but + is common. in the curious case where the user font (or fallback latin font) doesn't have +14:35.01 
  we'll need to feed harfbuzz "AB" then "+" then "CD"14:35.08 
  with different hb_fonts14:35.12 
Robin_Watts yes.14:35.14 
  fz_encode_glyph_with_fallback used to give me a replacement fz_font.14:35.46 
tor8 so if you iterate over "AB+CD" with fz_encode_glyph_with_fallback, "A" and "B" will return the latin script font, "+" will not find the + in the latin script font and will return the symbol font14:35.56 
Robin_Watts A replacement fz_font is a pain, cos flow nodes don't store fonts.14:36.20 
tor8 so when the returned font from fz_encode_glyph_with_fallback switches over, time to send the previous string to harfbuzz and start a new one14:37.02 
  where are you calling the shaping? in measure_word and draw_word?14:37.16 
Robin_Watts In a way, what I'd like would be for fz_encode_glyph_with_fallback to return me a fallback number (where 0 means 'use your normal font')14:37.19 
  yes.14:37.21 
  and a non zero value means "use the 'nth' fallback fz_font"14:37.40 
tor8 Robin_Watts: why do you want a per-node font?14:38.18 
  specifically, a per-node fallback font14:38.29 
Robin_Watts I don't want to have to call fz_encode_glyph_with_fallback on every char of every draw operation.14:38.59 
tor8 we call shaping on every draw call don't we?14:39.16 
Robin_Watts We do.14:39.34 
  OK, I shall code it that way, and we'll see how it goes.14:39.45 
tor8 then I don't think we need to worry, shaping is much much much more intensive than the glyph encoding14:39.57 
Robin_Watts Does fz_encode_glyph_with_fallback take a script argument ?14:40.14 
tor8 it does14:40.18 
Robin_Watts and a language argument ?14:40.30 
tor8 it does not (but you could add it)14:40.36 
Robin_Watts ok.14:40.44 
  OK, I'll look at that as soon as I've got this trapping stuff to a stopping point.14:41.03 
tor8 fab.14:41.11 
  I've also added some #ifdef macros to trim the set of fallback fonts used14:41.30 
  someone more knowledgeable might be able to make up a few more categories14:41.44 
simon91 tor8: Robin_Watts: Hi14:56.44 
Robin_Watts simon91: Hi.14:56.57 
simon91 uploaded the fast strtof: http://bugs.ghostscript.com/show_bug.cgi?id=69654614:57.00 
  many times faster than fz_strtod. I've already changed fz_ftoa to use it.14:57.36 
Robin_Watts simon91: Thanks. Will have a look. (Have put it on my post-it)14:58.40 
simon91 I've not yet touched pdf-lex.c14:59.42 
  So I guess we don't want to change the overflow handling to make it compatible with acrobat15:00.23 
Robin_Watts Urm...15:01.06 
simon91 what could be done: Call fz_strtof after encountering the decimal point. Thats function fast_atof.15:01.49 
  that would be more accurate then the present solution15:03.23 
Robin_Watts Oh, I see. The overflow handling for your new routine is 'correct', so it would no longer match acrobats.15:03.46 
simon91 yeah15:03.54 
Robin_Watts Where is your routine called if not from pdf-lex.c ?15:04.02 
simon91 the new fz_strtof?15:04.19 
  in my patch I changed fz_ftoa to call it. (Before fz_ftoa was calling the slow fz_strtod)15:04.53 
Robin_Watts And what calls fz_ftoa15:05.16 
simon91 Think mosly xps stuff15:05.33 
Robin_Watts I can't see anything that calls it. Boggle.15:05.50 
simon91 Really?15:05.57 
Robin_Watts fz_strtod is called by xps-path.c and fz_atof15:06.53 
  but fz_atof is never called, afaict15:07.41 
kens atof or ftoa ?15:08.02 
Robin_Watts No, sorry, fz_atof is called lots. Mostly by xps.15:08.09 
  simon91: Ah, sorry. Nothing calls fz_ftoa.15:08.48 
  But lots of xps calls fz_atof15:09.08 
simon91 Yeah sorry.15:09.25 
  Its atof not ftoa15:09.33 
Robin_Watts Ok, so I'd be tempted to make fast_atof call your new function. But I'd also be tempted to make fast_atof check for adobe type overflow first.15:11.03 
simon91 Btw how do you make sutch adobe experiments?15:11.44 
kens hand-hack a PDF file :-(15:11.59 
simon91 I've never jused adobe software in the last years15:12.15 
  ;-)15:12.21 
Robin_Watts simon91: I think I nobbled a PDF file that did: 0 0 100 100 re f to do 0 0 123450000000000100 100 re f15:12.36 
kens I'm afraid you are in a minority.....15:12.39 
Robin_Watts or something like that.15:12.46 
  and I found that they both rendered the same.15:13.14 
  In all probability it was a file that we had in our test repo already.15:13.26 
simon91 does acrobat have a command line?15:13.39 
Robin_Watts simon91: Not worth speaking of.15:13.54 
simon91 or do you have to open the file in the GUI and then what did you do with it?15:14.07 
Robin_Watts simon91: I created the file, using emacs and then opened it in the GUI.15:14.35 
kens I hacked a PDF file several differnt ways last weeek I thnk in order to look into what Acrobat does with invliad numbers (eg 123.abc)15:15.32 
simon91 And then you do "Save as"?15:16.24 
kens Not really, why would I need to ?15:16.44 
  I look at what Acrobat displays15:16.52 
Robin_Watts simon91: No, I don't use acrobat for editing. I literally look at what it displays.15:17.18 
simon91 ok thanks.15:31.47 
  does it make a difference if I look at files with adobe reader? Think I only have a ancient version of 'adobe acrobat pro'15:33.13 
  on my windows qemu machine15:33.29 
Robin_Watts simon91: Not at all.15:36.30 
  Honestly, to match this stuff I wouldn't expect you to go digging into Acrobat to do tests at all.15:37.06 
  Just take it from us that acrobat reads: 123400000000000000123 as 123.15:37.24 
  essentially it accumulates the bits before the decimal point in a 32bit int, and if that overflows, it ignores it and carries on.15:38.43 
  So 1230000000000456.789 is read as 456.78915:39.02 
  (or at least, that's how it looks in our tests)15:39.27 
owe I downloaded gs918w64 ghostscript and gsview50 from the ghostscript.com site and gsview does not work. Has win8.15:57.25 
  Anyone can help?15:57.30 
  Does not work means it gives an errormessage15:57.57 
kens and the message is ?15:58.23 
owe 2 seconds15:58.49 
  Ghostscript can not be found on your computer15:59.39 
  +++15:59.42 
kens Did you install the 64-bit version of gsview ?16:00.22 
owe It tells me to download it from http://www.cs.wisc.edu/~ghost/16:00.23 
  But it is already downloaded and installed16:00.26 
kens You need the two to match either both 32-vbit or both 64-bit16:00.49 
owe I will check. 2 sec16:00.50 
  GSVIEW32.EXE means no I guess16:01.28 
kens I'd assume not16:01.37 
owe From the about box16:01.37 
kens Chek whether installed in program files or program files (x86)16:01.51 
owe Path is C:\Program Files (x86)\Ghostgum\gsview\gsview32.exe16:02.46 
  I will get the 64 bit version then.16:03.15 
  Thx a lot16:03.22 
kens NP16:03.50 
  can also get the 32-bit version of ghostscript, as long as both match its OK16:04.08 
mvrhel_laptop owe: you could also use gsview 6.0 from gsview.com16:04.22 
owe Thanks for the tip. I will check it out.16:05.30 
  Is it possible to embed gsview in a .NET program?16:05.53 
kens I would thnk not no16:06.04 
  YOu would be better to use Ghostscript>NET I suspect16:06.17 
  If you are developing an application please be sure to check teh AGPL and make sure you adhere to the licencing terms. Otherwise you'll need commercial licences16:06.56 
mvrhel_laptop Is anyone able to run landscap.ps that is in the ./examples directory?18:31.48 
  I end up with throwing an error18:32.58 
  Noticed the issued playing around with gsview and verified the same error with gs18:33.15 
  HenryStiles: can you give it a try?18:33.31 
chrisl My examples directory doesn't have a landscap.ps18:33.36 
HenryStiles it's in lib18:33.48 
mvrhel_laptop sorry18:34.18 
  I meant waterfal.ps18:34.20 
  it throws an error that mentions landscape.ps18:34.36 
  it throws an error that mentions landscap.ps18:34.42 
  which has really confused me now18:35.08 
chrisl /undefinedfilename in (landscap.ps) ?18:35.37 
mvrhel_laptop yes18:35.41 
HenryStiles -I?18:35.50 
chrisl Yeh, it calls that file. if you add lib to your search path, it'll work18:36.10 
mvrhel_laptop ah so I need to include the lib18:36.12 
  ok. seems reasonable. not much I can do about that with gsview18:37.07 
chrisl We should fix waterfal.ps - it's pretty crap calling another file that way18:37.32 
HenryStiles a cheeky move for an example file I believe18:37.43 
mvrhel_laptop yes18:37.51 
chrisl Also, it's not how landscap.ps is supposed to be used18:38.04 
HenryStiles It works fine with the linux release because they include lib on the path I suppose18:39.30 
chrisl Yes18:39.38 
  Anyway objections to me putting the code from landscap.ps straight into waterfal.ps?18:40.02 
  It's five lines18:40.18 
Robin_Watts chrisl: Seems reasonable to me.18:40.28 
HenryStiles nope after a grep for lanscap.ps in the tree for other inclusions...18:40.45 
chrisl That's the only place18:41.09 
Robin_Watts How do I set a parameter on the command line to an int array?18:59.06 
chrisl I don't think you can directly19:00.39 
Robin_Watts Crap. I need to let users specify the dark->light ordering of inks.19:01.29 
chrisl I'm assuming this is gs19:02.04 
Robin_Watts chrisl: Yes.19:02.46 
chrisl Is it just two values?19:03.12 
Robin_Watts chrisl: No. Up to GS_CLIENT_COLOR_MAX_COMPOENTS values.19:03.35 
  For a 4 colour process (CMYK) it would normally be 3,1,0,2)19:04.06 
chrisl Okay, so you can you do it using Postscript, and passing the Postscript in using the -c..... -f syntax19:04.13 
Robin_Watts chrisl: Could I trouble you for an example please? My PS is not great.19:04.40 
chrisl Robin_Watts: so, creating the array is easy, but I'm not totally sure about pushing it down to the device world19:05.33 
  Something like -c "<< /DarkLightOrder [3 1 0 2] >> setpagedevice" -f input-file19:06.36 
Robin_Watts Hmm. If I use [3 3 1 0 2] it's failing to fall over in my test code, so I suspect that's not quite right.19:08.15 
HenryStiles -c nixes pcl...19:09.27 
  no big deal for now I guess...19:10.01 
chrisl With PCL you can use Ken's new code19:10.03 
  Robin_Watts: so, what's falling over??19:10.46 
Robin_Watts chrisl: I have code that checks the array it is passed to make sure that no components are repeated.19:11.13 
  If I run with your command, then everything completes as expected, but I suspect that's because it's not getting through.19:11.38 
  If I use an invalid one, I'd expect it to fall over, and it doesn't.19:11.55 
chrisl What's your device parameter?19:12.51 
Robin_Watts TrapOrder19:13.51 
chrisl And -c "<< /TrapOrder [ 3 3 0 2] >> setpagedevice showpage" doesn't trigger the error you expect?19:14.54 
Robin_Watts It does not. but then I'm not seeing get_params/put_params hit, so it might be me doing something stupid.19:15.25 
chrisl setpagedevice should trigger a put_params19:15.59 
Robin_Watts gswin32c.exe -c "<< /TrapOrder [3 3 3 3] >> setpagedevice" -sDEVICE=tiffscaled32 -o out.tif -f examples/tiger.eps19:20.56 
  That doesn't hit the get_params/set_params or the print page for that device. Exits without any error.19:21.25 
  gswin32c.exe -sDEVICE=tiffscaled32 -c "<< /TrapOrder [3 3 3 3] >> setpagedevice" -o out.tif -f examples/tiger.eps19:21.45 
  Thta hits the get_params/set_params (dunno with what values though), but still doesn't hit the print page. Exits without any error.19:22.09 
chrisl It *never* hits the put/get params methods?19:22.11 
Robin_Watts In the first one, the get_params/put_params for the tiffscaled device are NEVER hit.19:22.34 
chrisl Given that the initialisation code triggers them both a few times, that seems unlikely19:23.10 
Robin_Watts chrisl: The first command runs the -c before the device is put in.19:23.37 
  I don't think it's getting to that device, but I can't explain why.19:23.47 
chrisl You can't have -c in the middle of other parameters19:24.29 
  It has to come second last19:24.39 
Robin_Watts Ah,ok.19:24.43 
chrisl just before the -f - the -f "terminates" the -c19:25.00 
Robin_Watts oK, print page is called.19:26.04 
chrisl And the device on the command *is* in effect by the time the Postscript in -c gets executed19:27.55 
Robin_Watts Ok, I'm getting it in put_params/get_params now.19:28.09 
chrisl Phew!19:28.16 
  Robin_Watts: does that get you where you need to be? (I have to head out, so......)19:29.06 
Robin_Watts chrisl: DUnno yet, but please head out.19:29.22 
  I'll ask again tomorrow if I have problems.19:29.30 
  Thanks!19:29.32 
chrisl NP19:29.59 
Robin_Watts OK, so I'm a idiot. Fix the idiocy and it's looking good. Thanks.19:35.08 
  Ok. I have it working in tiffscaled.20:13.54 
  That's the chunky case.20:13.57 
  tiffscaled32, I should say.20:14.03 
  tiffsep isn't working. I get black output. Will fix tomorrow.20:36.12 
 Forward 1 day (to 2016/01/28)>>> 
ghostscript.com
Search: