IRC Logs

Log of #ghostscript at irc.freenode.net.

Search:
 <<<Back 1 day (to 2014/02/06)2014/02/07 
sa_ ghost08:40.25 
  t08:40.27 
  \\192.168.7.1708:40.46 
  g08:40.48 
  ggar08:40.50 
  exit08:40.53 
  tor808:40.59 
kens janmoesen : here is a PostScript program to do 2-up imposition of PDF files10:43.53 
  http://pastebin.com/TQjF6R4n10:43.55 
janmoesen yeah, i would definitely not have gotten that far --- thanks, kens!11:36.12 
kens Ï make no guarantees, but it worked on my 31 page test file11:36.32 
  It uses the 'current' page size to impos onto, so if you want a landscape 2x2 you need to set up the page size as well eg -g842x595 for landscape A411:37.06 
jad_jay Hi everyone11:38.22 
  I don't know where to find such issue, but I want to do that http://pastebin.com/g0aDxbg1 with a presentation PDF, is it possible with ghostscript ?11:43.53 
kens Ghostscript doesn't handle text as an input, only PostScript or PDF11:44.36 
  You could do something similar, suing tghe code I posted above for janmoesen to do 2-up imposition of PDF files11:45.53 
jad_jay kens It's pdf file11:46.18 
  kens: I'm here from 10 min I can't see your code11:46.50 
janmoesen 11:43 < kens> janmoesen : here is a PostScript program to do 2-up imposition of PDF files11:47.12 
kens It was just before you joined, I suggest the channel logs11:47.14 
janmoesen jad_jay: ^11:47.17 
  oops, sorry11:47.22 
jad_jay Hum okay how to avoid one on two ?11:48.29 
  Erf no! 11:48.42 
  I mean how to have only the first on top11:48.56 
kens You will have to modify the PostScript program, it doesn't do precisly what you want but its a step towards it11:48.58 
jad_jay kens: okay11:49.10 
  kens: I'm really sorry but i'm pretty new to gs code, I name your file 2-up.gs and use it like usage say ?11:52.59 
kens jad_jay : Its PostScript, not gs code. You can use it as the comment says, it draws 2 PDF pages side by side.11:53.41 
  The comments explain more or less what its doing11:53.52 
jad_jay yes okay but How do I name the file ?11:54.10 
kens Your case is simpler, but you need a similar approach11:54.10 
  It doesn't matter11:54.19 
  call it fred if you like11:54.25 
jad_jay Okay let say i call it fred could you show me the command line then ?11:54.49 
kens replace 2-up.ps with fred11:55.10 
jad_jay Okay so I have get this right11:55.27 
kens otherwise as per the comment11:55.29 
jad_jay this command line : gs -dNODISPLAY -sFile=AXEL.pdf fred11:56.13 
  destroy the original AXEL.pdf11:56.24 
kens No11:56.28 
jad_jay this command line : gs -dNODISPLAY -sFile=AXEL.pdf fred > Axel2-UP.pdf11:56.43 
  work11:56.49 
kens won't do anything11:56.52 
  dsYou need to specify a device and output file11:57.11 
jad_jay ok how11:57.24 
kens -sDEVICE=pdfwrite -sOutputFile=out.pdf11:57.56 
  This much is described in the documentation, I suggest you read it11:58.13 
jad_jay Okay now we getting somewhere thanks a lot11:58.16 
fontissue hello12:12.40 
ghostbot bonjour12:12.40 
fontissue bonjour12:12.45 
jad_jay bonjour12:12.52 
fontissue j'ai téléchargé Ghostscript (gs910w64.exe) pour Windows 7 64 bits et l'ai installé. J'ai téléchargé le pack de polices Ghostscript standard fonts (http://sourceforge.net/projects/gs-fonts/) mais je n'arrive pas à installer les polices qu'il contient 12:13.58 
  Windows me dit que les polices ne sont pas valides12:14.24 
jad_jay kens: there is a mistake in your script line 21512:15.10 
Robin_Watts chrisl, kens: I'm sure I'm just being blind, but I can't see where the linespacing is set is fontforge.12:16.10 
  (I don't even know what the right term for linespacing is - vertical advance?)12:16.29 
  and where is the font bbox etc set?12:16.44 
fontissue I would like to install Ghostscript standard fonts of the package gs-fonts (http://sourceforge.net/projects/gs-fonts/) but Windows 7 won't let me. 12:17.40 
  I have installed Ghostscript v9.10 12:18.16 
jad_jay kens: the script tell me that OriginYTx is not defined12:18.23 
chrisl Robin_Watts: I believe everything on fontforge is set in the glyph design window12:22.18 
  fontissue: the fonts are built into ghostscript now, you don't need them separately12:23.03 
jad_jay kens: iN FACT YOUR MISTAKE IS AT LINE 24412:24.26 
  Sorry for the shout12:24.34 
jad_jay slaping himself12:24.45 
fontissue chrisl: does that mean I don't have to install the fonts I am trying to install, since they have been installed when I installed Ghostscript? (sorry for my misunderstanding)12:25.36 
jad_jay kens: It's the line 283 that I need to change 12:26.17 
chrisl fontissue: the fonts are actually built into the Ghostscript binary. So if you are using them with Ghostscript, you do not need to install them separately12:26.29 
fontissue OK. But now if I want to use such fonts in, say, Adobe Illustrator, which uses the font installed in the system, what can I do?12:27.13 
chrisl Then you would need to install them. *But* the Ghostscript fonts are equivalents of the Adobe PS/PDF font set which I would expect to be available to Illustrator already12:28.22 
  fontissue: FWIW, I'm not sure if Windows supports Postscript Type 1 fonts now - it certainly didn't previously12:29.24 
jad_jay I really need a hint on the kens script... The script is okay but I want only one slide per page12:44.46 
  I know the solution is between the lines 283 and 31712:45.34 
  but i can't figure out the ps script style :)12:45.49 
  It's a shame because it's well commented12:46.10 
tor8 Robin_Watts: Element -> Font Info -> OS/212:46.19 
  Robin_Watts: Element -> Font Info -> General for non-ttf fonts12:46.44 
Robin_Watts tor8: yeah, I just found that thanks.12:47.24 
  I've altered the values to be the same... and now bits are chopped off :(12:47.41 
tor8 Robin_Watts: could you put the EFF archive on casper? (or add my .ssh keys to peeved)12:47.51 
Robin_Watts Let me add you to casper.12:48.03 
  add you to peeved, even.12:48.13 
  oh, eck, no user on peeved.12:48.45 
  ok, I've made a tor user. Just let me copy the keys.12:50.59 
chrisl jad_jay: can you share the PDF you're using?12:51.43 
jad_jay a part yes12:52.09 
chrisl Or any one that shows the error - the couple I've tried here work fine with kens's code12:53.29 
jad_jay chrisl: I correct the code It works OK but I don't want 2 slides on each page I want Only 1, and I can't figure out how to modify the script to get this 12:54.37 
  chrisl: I was something about OriginYTy wich has to be OriginYTx12:55.14 
Robin_Watts tor8: Try ssh to peeved now ?12:56.11 
jad_jay By the way sorry for my english it may burn out your eyes...12:56.12 
chrisl jad_jay: we've seen *much* worse - no need to apologise12:56.31 
Robin_Watts jad_jay: Yeah. There are /americans/ here :)12:56.47 
jad_jay :) thank you12:56.58 
kens jad_jay : I wrote that program this morning, I can't say it well tested12:57.21 
jad_jay kens: no need to apologize, it's perfect12:57.40 
kens In your case you just need to do the positioning and draw one page, not 212:57.58 
jad_jay kens: :D I get that but I can't figure out ... 12:58.26 
kens So the loop counter needs to change, at the moment its doing increments of 2, because it draws 2 pages at a time.12:58.45 
jad_jay In fact I don't need the loop ?12:58.46 
  Okay12:58.57 
kens Well, do you have more than 1 page in the PDF file ?12:59.02 
jad_jay Yes12:59.08 
kens THen you need a loop12:59.16 
jad_jay 0 1 PDFPageCount 1 sub PDFPageCount 2 mod add {12:59.23 
  is okay ?12:59.31 
kens The loop goes 0 to < Number of Pages, step 212:59.32 
  Yes, but you don't need the PDFPageCOunt 2 mod add either12:59.56 
  That checks for an odd number of pages13:00.05 
  Because we want pairs of pages in the output13:00.22 
  SO you want 0 1 PDFPageCOunt 1 sub {...}13:00.34 
jad_jay okay13:00.43 
kens With correct capitalisation....13:00.48 
jad_jay okay, now i work but still 2 page on one13:01.27 
kens You can throw away all the page size stuff too, unless you want to do the calculations for variable pages, I was assuming you had fixed change syou needed13:01.34 
  RIght so the loop has 2 calls to 'drawpagecontent'13:02.02 
jad_jay Okay :)13:02.12 
kens ANd increments the loop counter in between so that it accesses the 'next' page13:02.17 
  You want something like:13:02.36 
  save13:03.27 
  X Y translate13:03.27 
  pdfgetpage13:03.27 
  dup /Page exch store13:03.27 
  pdfshowpage_init13:03.27 
  draw_page_content13:03.28 
  restore13:03.28 
  X and Y you have to know, to move the page13:03.38 
  In PostScript the origin is bottom left, and the axes increase to the top and right13:04.13 
Robin_Watts tor8: any luck?13:04.19 
jad_jay I could keep the transform13:04.49 
kens Up to you, I don't really know what your requirement is13:05.12 
  THe scaling, ortation and offsets are calculated to do 2-up on a single sheet13:05.39 
jad_jay And I just need the first13:05.55 
kens Taking into account the size of teh final media, and the size of the first page13:05.58 
  There's nothign clever in the calculation code, the fact that PostScript is stack based makes it odd to look at for people unused to they syntax that's all. You can rework teh calculations for your own needs13:07.13 
  Note that the code in that program expects that all the pages in the PDF file wil be the same size. Its obviously possible to resize each page individually, but that was more work than I felt like doing.13:08.16 
jad_jay kens: Okay look for your code http://pastebin.com/TQjF6R4n 13:09.04 
  If I cut from 299 to 31213:09.15 
kens DOn't remove 312 because you will end up with mismatches on teh stack, You are removing a 'restore' without removing its matchin 'save'13:10.19 
jad_jay OK13:10.35 
  I got Error: /typecheck in --restore--13:11.34 
kens So the top object on the stack is not a save object13:11.56 
  Welcome to the joy of PostScript programming :-)13:12.06 
jad_jay hum removing 300 to 31113:12.20 
kens This is because the pdfgetpage removes a dictionary from the stack, since you haven't called that, it leaves the dictionary behind. A dict is not a save object, so you get a type check error13:13.04 
  Hmm actgually I htink tha'ts rubbish, ignore it13:13.23 
jad_jay the pdfgetpage ?13:13.47 
kens But clearly something is being left on the stack that shouldn't be13:13.56 
  Oh of course, its the copy of the loop counter, which is used for the second page13:14.19 
Robin_Watts kens, chrisl, tor8: OK, now I'm confused. I've set all the values I can find in the two fonts to be the same.13:14.28 
kens replace the 'dup 1 add' in line 290 with '1 add'13:14.36 
jad_jay after removed pdfget I got /typecheck in --.knownget--13:14.45 
Robin_Watts and I'm now showing bits of glyphs being chopped off.13:14.46 
  and indeed, when I ttfdump, the xmin/xmax/ymin/ymax values are different for the two fonts.13:15.07 
kens Robin_Watts : sounds like some of the metrics are incorrect for the font in question13:15.08 
Robin_Watts (as given in the 'head' table of the font)13:15.27 
kens Is that HHEA?13:15.44 
Robin_Watts how can I set those values within fontforge? (or by any other means, for that matter)13:15.47 
kens Just a moment while I dig out my TT spec13:15.52 
jad_jay Drawing page 113:15.58 
  Error: /typecheck in --.knownget--13:15.59 
chrisl Robin_Watts: you can't just change the metrics without reference to the outlines13:16.07 
kens jad_jay : did you modify line 290 ?13:16.14 
jad_jay kens yep13:16.27 
kens chrisl well you can, but then bits go missing13:16.31 
Robin_Watts chrisl: The outlines are REALLY close to being identical.13:16.33 
chrisl jad_jay: so you just want the same layout as kens's code, just without the page combining?13:16.50 
kens jad_jay : well, I'm afraid you're on your own, you need to figure out what's elft on the stack (try a pstack) then figure out why its there and remove it13:17.01 
jad_jay chrisl: yes13:17.12 
  kens: thanks13:17.27 
chrisl jad_jay: try this: http://pastebin.com/jJyAWWTm13:17.36 
  Note that I've hacked out a bunch of kens's comments as I can't be bothered editing them to match the revised code13:18.40 
jad_jay chrisl: MARVELLOUS !13:19.18 
chrisl It works then?13:19.30 
kens Robin_Watts : xMin yMin xMax and yMax shouldn't have much effect13:19.36 
  THey are in essence teh font bounding box13:19.53 
  I doubt fontforge will let you modify them13:20.08 
jad_jay chrisl: You still have the mistake with OriginYTy line 239 :)13:20.08 
Robin_Watts kens: which would explain why I'm getting descenders cut off.13:20.13 
kens But you can use a binary editor13:20.15 
jad_jay chrisl: It work yes !13:20.23 
Robin_Watts but that will break the checksum, right?13:20.26 
kens Robin_Watts : nobody cares13:20.34 
chrisl jad_jay: I just edited kens's code, so.....13:20.49 
jad_jay kens: chrisl : Thanks a lot !!!13:20.57 
  ps scripting seems difficult but I will give it a try :)13:21.46 
  looks better than crosswords :)13:21.59 
kens Robin_Watts : I modify TT fonts frequently, and nothing cares about checksums, though the MS tools will check them13:22.03 
Robin_Watts kens: Ok. The hhea values look different too :(13:22.23 
kens I can't say I'm terribly surprised13:22.36 
  I would suggest they are less likely to cause a problem13:23.10 
  THough the Descender might be relevant, maybe13:23.21 
fontissue thank you, bye13:23.33 
Robin_Watts kens: Can I edit them in fontforge?13:23.53 
kens I have no idea13:24.01 
Robin_Watts It would seem like a pretty major omission if I can't :(13:24.04 
kens I never use FontForge13:24.08 
Robin_Watts What do you use?13:24.19 
kens Robin_Watts : you shouldn't need to, as they are (supposedly) derived from the glyph contours13:24.26 
chrisl fontforge *may* generate certain metrics "on the fly"13:24.30 
kens Robin_Watts : I use a binary editor13:24.35 
  I don't care about the contours, so I hack tables direclty as required13:24.49 
Robin_Watts And your preferred binary editor is?13:25.05 
kens Visual Studio :-)13:25.11 
Robin_Watts ok :)13:25.19 
kens is a man with a hammer13:25.20 
  FWIW I just ran the MS FOnt Validator on a font I have here and one of the problems it flagged is that the minLeftSideBearing does not equal the calculated value..... actual -415 calc 1213:28.46 
Robin_Watts kens: yeah.13:29.08 
kens I should send that tool to Robin too13:29.14 
  Unless you have it ?13:29.22 
chrisl Robin_Watts: this might be a useful thing to read (unless you already have): http://fontforge.org/editexample5.html13:32.01 
jad_jay Thanks again bye bye13:32.26 
chrisl too slow....13:32.44 
  Hmm, I don't see a way to replace metrics "wholesale" in fontforge......13:36.18 
Robin_Watts grabs lunch.13:37.17 
  kens I have it I think.13:37.21 
  chrisl: I can see a tool being written :(13:37.36 
chrisl reboots and lunches.....13:40.27 
kens Robin_Watts : I knew you'd give in eventually :-)13:40.39 
Robin_Watts kens: well, you kind of think that such a tool would have been written before...14:14.54 
kens Mangling fonts isn't generally a good idea14:16.05 
Robin_Watts chrisl: Yes, I've read (parts of) that before, thanks.14:18.00 
tor8 Robin_Watts: use the fontforge scripting interface, or just hack the .sfd files (they're plain text)14:46.36 
Robin_Watts tor8: From what I could see the scripting interface doesn't get me to this data.14:48.59 
  specifically the scripting interface can't change any values that can't be changed by the UI.14:49.22 
  What are .sfd files?14:49.26 
  oh, it's own format.14:50.05 
  I suspect the values in the header are generated from the glyphs automatically.14:50.30 
  so they won't be in the .sfd files.14:50.37 
  and so I can't edit them.14:50.43 
chrisl Presumably, you're only changing the advance width?14:51.31 
Robin_Watts chrisl: No.14:51.50 
  The fonts already exactly match advance width.14:52.00 
chrisl So, just the kerning pairs, then?14:52.23 
Robin_Watts No.14:52.29 
  kerning pairs are off a bit, but I can fix those in the GUI.14:52.41 
  The problem is that I still get massive differences in the spacing of the fonts.14:53.23 
chrisl horizontal or vertical?14:54.00 
Robin_Watts both, but most prominently vertical.14:54.12 
  Essentially, I believe that the outlines are close enough that the metrics should be entirely compatible.14:55.30 
  but I cannot set some of the metrics from the GUI.14:55.43 
  (i.e. it's font metrics, rather than glyph metrics that are the problem)14:55.58 
  hence I'm going to try copying the metrics across manually and we'll see what we get.14:56.27 
chrisl Hmm, well, horizontal spacing should be advance width and kerning - if those match, then horizontal spacing should match. Vertical spacing will depend on what metric the app chooses to use (and what's available)14:56.44 
kens TBH it seems like grabbing the tables from one file and replacing tehm in another with those would tell you quickly whether this is likely to work. Of coure you would need to update the table pointers if (as is likely) they are different sizes14:56.48 
  Can't you just knowck up a quick tool to do this in C ?14:57.33 
Robin_Watts I am writing a C tool now.14:57.50 
kens give it two fonts and copy the tables from one to another, creating a third 'merged' font14:57.52 
  aha ok14:57.55 
chrisl Robin_Watts: do you know what the picsel code uses to calculate the line spacing?15:01.00 
Robin_Watts chrisl: Not a clue.15:02.11 
chrisl Perhaps that would be a good thing to find out?15:02.26 
Robin_Watts In windows, if you click on a font, it opens a window with some text in in that font in different sizes.15:02.52 
  If I do that for both fonts and overlay the two I can see that the spacings are different etc.15:03.16 
  My plan is to get it so that the fonts look the same in that to start with.15:03.34 
  I like to think that the Picsel code must be behaving 'sanely'.15:03.52 
chrisl But I don't know, and we've no way to find out what that tool uses for line spacing either15:04.02 
kens getting WIndows to display the same seems like a reasonable target15:04.19 
Robin_Watts chrisl: True, but it's probably going to be "the standard thing".15:04.34 
chrisl Robin_Watts: unfortunately, many applications completely ignore the "standard thing"15:05.08 
kens I suspect bopth probably use something like GetEmHeight() or GetCellDescent15:05.33 
chrisl The "standard thing" should be the linegap value in the hhea table......15:05.41 
kens There's a GetLineSpacing() maybe they use that15:06.02 
Robin_Watts chrisl: Right. so by cloning the values, we should get consistency.15:06.08 
kens I ouwld like to think so15:06.20 
Robin_Watts likewise. If this fails, I will swear some more and move on, but this has to be a reasonable first try.15:06.43 
chrisl Robin_Watts: a lot of apps actually use the ascender/descender values, or the font BBox, and ignore the linegap value :-(15:07.08 
Robin_Watts chrisl: Right, so if I copy the whole damn lot, we should still be fine.15:07.24 
chrisl No, you can't just copy the font BBox, that really needs to be correct15:07.47 
henrys chrisl: I do think we should get the open office specification, certainly it must have something about that.15:07.48 
chrisl henrys: the file spec? It may just reference the TTF spec15:08.31 
  Robin_Watts: does changing the linegap value affect the display?15:09.25 
henrys Robin_Watts: sorry I was supposed to look at this yesterday and didn't get anything done with it.15:10.00 
kens chrisl looking at the win32 API I suspect that the TEXTMETRICS structure is the relevant thing15:10.01 
chrisl kens: that may not be relevant to the picsel code, though15:10.58 
henrys I'm going to buy the spec anyway it can't hurt to have it.15:11.13 
kens chrisl possibly not, but if they want to replicate the Office code they may have to come up with teh same info15:11.21 
  Fundamentally there are three important values, ascent, descent and leading15:11.47 
  Height is ascent+descent, leading is the linegap advance - Height AFAICT15:12.11 
Robin_Watts henrys: Indeed, the spec can't hurt.15:12.11 
chrisl kens: linegap is *usually* HEIGHT, but not necessarily.15:13.01 
henrys chrisl, kens: with pcl which does many things like windows it isn't just metrics - but metrics + some crazy rounding gyrations. You wouldn't be able to figure it out without documentation.15:13.07 
kens chrisl yes, but it need not be as you say15:13.17 
  henrys applicatiosn don't *have* to follow the TEXTMETRIC, just like PostScript you can draw the text as you want it. But I strongly suspect the viewer tool just uses the Height+leading, and in general I would expect Word to do the same (you cna of course change the leading and stuff in Word)15:14.31 
chrisl henrys: I assumed that the weird fiddling that PCL does was an attempt to match Windows, but not necessarily a direct copy of what Windows implements.....15:14.31 
  kens: I just figured since the linegap is trivial to change, it would be easy to change it, and see if it had an influence.15:15.40 
kens I guess, but Robin seemed to be having other problems15:16.02 
chrisl Yeh, changing the linegap should not result in clipped glyphs :-(15:17.00 
ray_laptop kens: I understand why the CET file only produces Black separations with the tiffsep device. The last page that works has SeparationOrder [ /Black ] but when it fails with Gray, the file doesn't reset back to all colors15:17.37 
kens ray_laptop : ah, so that's why you get all the pages out.15:17.57 
  all the subsequent pages...15:18.21 
ray_laptop kens: right -- but all with just the Black separation15:18.57 
kens Yes, I unerstand.15:19.07 
chrisl Are the ECMA OOXML standards up to date with the ISO ones?15:23.18 
  The ECMA ones are free, 4th edition Dec 2012: http://www.ecma-international.org/publications/standards/Ecma-376.htm15:24.23 
ray_laptop but even though we return a rangecheck from devn_put_params (line 484) it doesn't bubble the error up as a configurationerror. Looking into that now.15:27.37 
kens AH, that's odd, but its probably the source of the problem15:28.24 
henrys chrisl: ah nice15:29.26 
  chrisl: the dates seem right15:29.35 
chrisl henrys: It'll make things a bit easier - the ISO specs you have to buy seem to come with crazy restrictions15:30.54 
  henrys: also, given the age of the code, it might be handy having easy access to the earlier editions.15:32.19 
ray_laptop I *HATE* the setpagedevice code. I can15:55.55 
kens I just spent best part of 2 days ther convincing myself that Till's bug report wasn't a bug15:57.39 
ray_laptop I can't get it to throw a configurationerror at all, even from: << /Garbage /X >> setpagedevice The -dSETPDDEBUG shows it processing with /undefined /Garbage on the stack15:57.44 
  but no error :-(15:58.05 
kens I thought unrecognised keys in the dictionary weren't illegal15:58.23 
  Try setting <</PageSize /Broken>> setpagedevice15:58.41 
  That'll be a typecheck of course, not a configurationerror15:59.17 
chrisl Er, unknown keys are ignored, aren't they?15:59.52 
ray_laptop kens: that also doesn't give an error :-(16:00.12 
kens Yes but that'sd what I mean, not illegal16:00.15 
  Oooh, I feel that really should....16:00.26 
ray_laptop kens: I guess I have to dive into the muck16:00.48 
kens Yo have my sympathy....16:01.05 
ray_laptop kens: unless you want to ???16:01.29 
ray_laptop says hopefully16:01.34 
kens Not unless you really want me to :-(16:01.40 
ray_laptop kens: no, but I hope my screams of frustration don't wake you16:02.54 
kens I'll take a poke at it if you get stuck, but I'm sure you can do at least as well as me16:04.11 
chrisl Robin_Watts: just a thought the demo purposes: IIRC, the newer formats allow you to embed fonts used in the document - that *should* give results consistent across platforms16:05.10 
ray_laptop chrisl: does the newer office embed the fonts automatically? If not, it doesn't seem like it would be used often. Also, what about 'protected' fonts ? Does it ever embed them (in violation of the DMCA) ?16:10.37 
marcosw ray_laptop: I'm looking into how to embed fonts in word docments. Microsoft says it can be done (subject to licensing restrictions): http://support.microsoft.com/kb/29095216:23.30 
ray_laptop marcosw: well, unless it's automatic, we probably won't be finding files in the wild, so somebody wanting our viewer to display a document will still have the problem of not having the correct font (or any reasonable substitute)16:26.35 
  it seems like our GhostDocs converter/viewer needs to have the ability for users to add fonts (probably by sticking them in a folder that we check). At least that way they can handle docs by getting the font somewhere16:29.16 
  this isn't a lot different to PDF's that don't embed fonts. GS has the capability for users to add fonts and/or search font paths16:30.09 
marcosw ray_laptop: I agree, I didn't even realize this was an option chrisl mentioned it. I found the well-hidden option in word 2013 and have generated a test document. I'll run it through GhostDocs and see what it looks like.16:30.12 
ray_laptop does GhostDocs even look at embedded fonts ?16:30.39 
  (a question for paulgardiner and Robin_Watts )16:30.56 
paulgardiner Hi ray_laptop 16:31.11 
ray_laptop hi, paulgardiner. Sorry to wake you ;-)16:31.27 
Robin_Watts ray_laptop: GhostDocs is capable of using embedded fonts, yes.16:31.50 
  at least in PDF files.16:31.53 
  no idea if it knows how to get them from word files.16:32.03 
paulgardiner ray_laptop: My IRC client plays a jingle when my name shows up, so waking me up is literally a possibility.16:32.29 
ray_laptop if the ability to embed fonts only appeared in 2013 office, it's not likely to16:32.33 
  paulgardiner: that's why I turned off my sound highlighting. It disturbs my beauty sleep ;-)16:33.05 
paulgardiner ray_laptop: yeah, I can't help. The word agents weren't the parts of the code we worked on.16:33.19 
ray_laptop lucky for you guys :-)16:33.38 
paulgardiner Interesting point though. If it doesn't and many of these files have embedded fonts it would be another explanation for layout mismatches16:34.37 
  Oh just read the 2013 comment. Almost certainly not then16:35.16 
ray_laptop paulgardiner: if this is a well hidden feature (as marcos says), then it's not at all likely that the fonts are embedded16:35.25 
marcosw ray_laptop, et.al.: the embedded font .docx file still has different line spacing in GhostDocs than in pdf output from word. of course I don't know if the fonts are really being embedded, since the font licensing may be restricting their inclusion (also, as Robin_Watts points out, we don't know if GhostDocs makes use of embedded fonts).16:37.10 
  running unzip on the .docx file shows that the fonts are being embedded:16:38.08 
  56528 Defl:S 36600 35% 1980-01-01 00:00 4b351f8d word/fonts/font6.odttf16:38.13 
  778552 Defl:S 431712 45% 1980-01-01 00:00 cfa18888 word/fonts/font5.odttf16:38.13 
  110436 Defl:S 68239 38% 1980-01-01 00:00 2cb635de word/fonts/font4.odttf16:38.13 
  222356 Defl:S 132089 41% 1980-01-01 00:00 6376c914 word/fonts/font3.odttf16:38.13 
  834240 Defl:S 477787 43% 1980-01-01 00:00 cce460c7 word/fonts/font2.odttf16:38.13 
  811412 Defl:S 414562 49% 1980-01-01 00:00 540e8aa1 word/fonts/font1.odttf16:38.13 
  758196 Defl:S 401367 47% 1980-01-01 00:00 c24b1216 word/fonts/font7.odttf16:38.14 
  Though I didn't think I used tha many fonts?16:38.31 
ray_laptop marcosw: it looks like it is just stuffing the whole font in -- no attempt at substitution16:40.06 
marcosw there is an option to subset the font but it defaults to off. You can also not embed "common" windows fonts, but I disabled that so all fonts are embedded.16:40.57 
Robin_Watts So, something I have learned today... fonts contain details of where and how big strikeouts for them should be.16:41.43 
ray_laptop that would make it easy for a user to export fonts to an app (ours?) by making a doc that used all the fonts they need and sending it with the app using an option to save them for use later on other docs16:41.46 
Robin_Watts also where and how big sub and superscripts should be.16:41.59 
kens Robin_Watts : only for T fonts16:42.11 
  TrueType^^16:42.17 
Robin_Watts yes, sorry.16:42.27 
marcosw presumably a way to test GhostDocs making use of the fonts is to use a strange font (i.e. one of these <http://www.dafont.com/theme.php?cat=710>) and then see how it converts with GhostDocs.16:43.55 
  the answer is no. GhostDocs does not appear to make use of embedded fonts. I've uploaded abcd.docx to my directory on casper that includes an embedded font which clearly renders differently in GhostDocs than when opened in Word. I confirmed that that the embedding worked by opening the document in a different virtual machine with word 2007, it displayed the document correctly though the font is not installed in windows on that 16:52.20 
  I figured out where the "extra" embedded fonts are coming from. They are "theme" fonts, apparently the default "blank document" has a default theme.16:55.56 
paulgardiner marcosw: I'm probably missing something obvious, but I don't see how that confirms the non-use of embeded fonts in GhostDocs, just that if it does use them, doing so doesn't help with the layout.16:56.42 
marcosw paulgardiner: sorry, I didn't explain myself very well. The abcd.docx uses a symbol font that ghostdocs renders as ABCD instead of the symbols that word displays, even on a different virtual machine that doesn't have the symbol font installed.16:59.51 
paulgardiner Ah got you17:00.07 
marcosw add "plus times roman" to my comment about theme fonts. it appears to be embedded even if not used in the document nor in the theme.17:03.05 
  ^times roman^times new roman17:03.26 
henrys there are 4 parts to the spec, part 1 is 5000 pages, I'm glad we didn't pay for it. 17:11.42 
Robin_Watts gaaah.17:15.23 
  I have now copied all the relevant fields from arial to my new font. ttfdump shows that all the fields that could conceivably matter are now the same.17:16.07 
  and STILL I get vertical differences.17:16.18 
henrys Robin_Watts: based on the docs the file can explicitly set the spacing in 40 some-odd ways, naturarlly17:18.22 
Robin_Watts henrys: At the moment, I've put the whole ghostdocs problem to one side.17:18.46 
  I just want to get our 'clone' font to preview in windows like arial does.17:19.00 
henrys Robin_Watts: did you change the os/2 table. I thought windows used that.17:19.35 
Robin_Watts oh yes.17:19.55 
henrys i'm foggy on that 17:19.57 
Robin_Watts yes, I've changed the head, hhea and OS/2 tables.17:20.10 
  I've just found some metrics that don't match.17:20.18 
  but that only explains X differences.17:20.26 
henrys Robin_Watts: is the windows preview changing at all?17:21.56 
Robin_Watts yes.17:22.02 
henrys I was worried a substitution was occurring17:22.19 
ray_laptop kens: It's been too long since I messed with this. Now I understand why we don't throw an error -- the default PolicyNotFound is 1 (ignore the request)17:22.28 
Robin_Watts henrys: Actually, looking at it now, the clone font is much closer than before.17:23.00 
ray_laptop kens: Now I have to see why we are getting the /undefined error with << /SeparationOrder [ /Purple ] >> setpagedevice17:23.50 
kens well that seems like the right behaviour17:24.20 
ray_laptop setpagedevice is supposed to either return a configurationerror or just ignore it17:24.21 
henrys chrisl: ah I discovered gs_malloc_release() does get rid of the chunk stuff - in hindsight it would have to. Didn't think about it when norbert brought it up. 17:38.29 
ray_laptop kens: I understand why << /PageSize /X >> setpagedevice doesn't throw an error. There's a hack in gs_setpd.ps line 779-787 that ignores the request. This _does_ fail: << /PageSize /xx >> setpagedevice.17:59.26 
kens boggles17:59.43 
ray_laptop kens: yeah, me too17:59.59 
kens goodnighht all18:00.37 
ray_laptop I guess we could check for arraytype18:00.41 
  oops. I chased kens away ;-)18:01.02 
  screwier and screwier. The first .putdeviceparams with an invalid Separation name in the SeparationOrder request succeeds. The second time returns an invalid stack. At least that is done in C18:48.50 
  Found out why that's happening. It's a questionable assumption in devn_get_color_comp_index line 258. I probably need to consult with mvrhel about this. It effectively only allows separations to be added all at once.19:32.45 
Robin_Watts My brain is incapable of letting my hands type "hmtx". It insists on doing "htmx"20:11.04 
ray_laptop another problem. tiffsep has ENABLE_AUTO_SPOT_COLORS which adds a separation if one is in the SeparationOrder list and is not known (that's by design) but the num_separations is reset in devn_put_params line 545.20:19.30 
  I've fixed that one, now fixing the problem the other problem with the PS stack not being as expected when an error occurs20:20.20 
  Robin_Watts: at least it's not as bad as mis-typing "clist"20:21.08 
Robin_Watts ok, so I've tried another technique... taking arial and knocking tables out...20:34.57 
  it seems that LTSH and VDMX make a difference.20:35.09 
  and hdmx, but only a tiny difference.20:35.50 
  I'd be prepared to bet that the epage code doesn't look at LTSH, so we have no hope of matching layouts exactly :(20:37.31 
ray_laptop Robin_Watts: this appears to be for low resolution glyph positioning. When going to PDF, isn't the resolution high enough that linear scaling ?20:55.18 
  that linear scaling would be used ?20:56.05 
ray_laptop speaks from almost total ignorance of font issues20:57.00 
mvrhel_laptop bbiaw22:09.51 
ray_laptop The SeparationOrder param handling is better (with my changes), but still strange. With the tiffsep device, if I set for just /Black, then try changing it to [ /Black /Cyan /Magenta /Yellow ] I end up with all components being /Black22:57.04 
  I think it may be mapping with the separation_order_map too many times22:57.53 
 Forward 1 day (to 2014/02/08)>>> 
ghostscript.com
Search: