IRC Logs

Log of #ghostscript at irc.freenode.net.

Search:
 <<<Back 1 day (to 2014/07/22)2014/07/23 
nidhin I have downloaded the MuPDF from github and its showing error in System.loadLibrary("mupdf")05:24.05 
  can any mesolving this issue05:24.23 
  *help me05:24.37 
rsc Does somebody have a pointer how to add a TTF file so that ghostscript can use it?12:39.00 
kens Depends if you want to use it as a font or a CIDFont, and what operating system you are using12:39.28 
  Or more precisely, how Ghostscript has been built12:39.48 
rsc Linux. And how do I figure out how Ghostscript was built?12:40.03 
kens Well, what OS are you using, did you build it form source yourself, and if not where did you get it ?12:40.26 
rsc CentOS 6, package from the distribution.12:40.43 
  But I guess you are looking for some specific output in --help or so?12:40.55 
kens OK so its Lunix, and a distro, so its almost certianly built using shared libraries and no ROMFS12:41.04 
  SO you can moduy fontmap for fonts and cidfmap for CIDFonts12:41.19 
  modify*12:41.22 
  look in gs/Resource/Init12:41.51 
rsc I created a cidfmap like this: "/MerriweatherSans « /FileType /TrueType /Path (/opt/fonts/MerriweatherSans-Regular.ttf) >> ;"12:42.20 
  hrmpf. 2x < of course12:42.37 
kens Ah, not just my IRC client you confused there then12:42.50 
  You should have had a cidfmap in the directory already, that one doesn't look right to me12:43.26 
  No SubfontID and ordering or supplement12:44.02 
rsc How do I figure out SubfontID?12:44.16 
kens You just need to know, try 012:44.24 
rsc haha, okay.12:44.28 
kens I think you can leave out the Ordering but if it was me I would set /Identity and supplement 012:45.08 
rsc another TTF seems to use "/SubFontID 0 /CSI [(Unicode) 0]"12:45.37 
kens You can try that12:45.59 
rsc Is "gs -sDEVICE=nullpage -dBATCH -c '(MerriweatherSans) findfont'" okay to check if the font gets loaded?12:46.48 
kens Well I'd use /MerriweatherSans findfont but its up to you12:47.27 
  Actually no, that won;'t work12:47.47 
  You need to compose the font with a CMap to use it as a CIDFont12:48.00 
  try "(*) {==} 256 string /CIDFont resourceforall"12:49.09 
rsc That doesn't list that font.12:51.50 
kens THen its not picking it up.12:52.09 
  Does it list anything ? You seem to imply that you have amodified cidfmap already12:52.36 
rsc Oh, can I have just one modified cidfmap?12:52.52 
kens Well yes12:53.03 
  GS uses the first one it finds12:53.15 
rsc I did the following: New cidfmap and added the directory containing it to $GS_FONTPATH12:53.19 
  eh $GS_LIB, not $GS_FONTPATH12:53.42 
kens I don't htink that will work, you should add it using -I, oh GS_LIN will probably work12:53.53 
  So when you did resourceforall, what result did you get ?12:54.13 
rsc GS_LIB works, but only one cidfmap. AH.12:54.22 
  Okay, that lists the fonts now.12:55.04 
kens OK12:55.09 
rsc "/MerriweatherSans findfont" leads now to "Loading NimbusMonL-Regu font from /usr/share/fonts/default/Type1/n022003l.pfb... 3042472 1671101 3207432 1905995 1 done."12:56.59 
kens Yes, you've defined a CIDFont called MerriweatherSans, not a Font12:57.23 
  If you want to use it as a Font you need to modify Fontmap.GS12:57.38 
rsc Okay, the application is using CIDFont, I think. At least the Fontmap.GS is not modified for any other *.ttf here.12:58.10 
kens That doens't prove much really. Why should Fontmap.GS be altered by some other application ?12:59.00 
rsc There is only Resource/Init/Fontmap.GS - and it does not contain e.g. DejaVuLGCSans12:59.59 
kens Like I said, no reaqson why it would really13:00.13 
  You need to add fonts to one of cidfmap or fontmap.GS before GS will use them, but it doesn't come with any 'pre-installed' (unless you run the post installer on Windows)13:00.51 
chrisl Some distributions add to the font mappings in their repackaging13:01.39 
kens Yes, that's a point13:01.51 
  Can't hold me responsible for what distros do though :-)13:02.17 
rsc Do I definately need Fontmap.GS? because I can not find any file that would have an entry for the DejaVuLGCSans (that came with the distribution)13:09.31 
kens You definitely need fontmap.GS, whether you need to modify it for your needs is another matter. Without knowing what you are doing its impossible to say13:10.06 
  It sounds like the distro has added some fonts and made them available as CIDFonts, but that likely doens't help you with whatever your problem is13:10.43 
rsc The *.ps that is used with ghostscript seems to be fine with CIDFonts. So what am I missing for the new font?13:13.26 
kens rsc I don't know,13:15.24 
  you haven't told me what yopur problem is13:15.29 
  A PostScript can't be 'fine with CIDFOnts' it either uses CIDFonts or it doesn't13:15.51 
rsc "/DejaVuLGCSans-Identity-H findfont" works for DejaVuLGCSans for example. What do I need for "MerriweatherSans"?13:16.33 
  And for DejaVuLGCSans all that exists is DejaVuLGCSans.ttf and a cidfmap.13:18.16 
kens The name you quote is a composed font, a composition of a CIDFOnt and a CMap. If Ghostscript can't find a named font one of the 'convenience' things it does is look to see if the name looks like a composed font (name + CMap). If it does Ghostscript will attempt to split up the name into a named CIDFont and a CMAp, and then attempt to compose the font from that information13:18.24 
  So /DejaVuLGCSans-Identity-H findfont will cause GS to look for a CIDFont named DejaVuLGCSans and a CMap called Identity-H and then execute composefont on those two.13:19.25 
  So it doesn't really make sense to ask "What do I need for MerriweatherSans".13:19.43 
  If you want to do "MerriWeatherSans findfont" then you need to define MerriweatherSans as a font.13:20.11 
rsc I need the equivalent of /DejaVuLGCSans-Identity-H for MerriweatherSans13:20.29 
kens The equivalent is MerriweatherSans-Identity-H13:20.51 
rsc But using that leads to an error.13:22.16 
kens Which leads me back to 'what is the problem you are actually trying to solve'13:22.39 
rsc There is an application that uses "DejaVuLGCSans-Identity-H" to create PDFs from some generated PostScript. And the goal is to replace DejaVuLGCSans by MerriweatherSans13:23.43 
  And that application calls ghostscript somewhere in the middle indeed.13:24.25 
kens Then you need to create a *substitution* in cidfmap, as well as a CIDFont13:24.29 
  All you've done so far is create a CIDFOnt called Merriweather, if you want to use that in place of DejaVuLGCSans, then you need an additional entry in cidfmap13:25.12 
rsc But I am able to change the string "DejaVuLGCSans-Identity-H" in that application to the new font.13:25.48 
kens As documented in the header you need to add "/substituted /original ;" where in your case /substituted is DejaVuLGCSans and /original is Merriweather13:26.10 
  rsc, I'm unable to keep up with you. You've just changed your requirement.13:26.45 
rsc Wait, I am able to change "DejaVuLGCSans-Identity-H" in that application. But putting in "MerriweatherSans-Identity-H" doesn't simply work.13:26.55 
kens 'Doesn't work' how ?13:27.21 
chrisl So, what error do you get when you do "/MerriweatherSans-Identity-H findfont"13:27.23 
rsc "Error: /undefinedresource in /findfont"13:28.03 
kens The whole error please, including the font names13:28.17 
rsc http://fpaste.org/120117/12217614/13:29.42 
kens OK so its not finding MerriweatherSans-Identity-H13:30.15 
  There could be many reasons, what happens if you do /MderriweatherSans-Identity-H findfont at the GS> prompt ?13:30.50 
  Good grief, why are you using 8.70 ?13:31.12 
rsc That's what CentOS 6 delivers.13:31.28 
kens You need to use a version of GS less than 5 years old13:31.29 
rsc "/MerriweatherSans-Identity-H findfont" returns the same from the fpaste above.13:32.44 
  No matter if it's -c or GS>13:32.53 
kens I though you said that worked ?13:32.57 
chrisl What about "/MerriweatherSans /CIDFont findresource" ?13:33.19 
kens To be honest, I can't even begin to guess what might be wrong in software that old, your best bet is to start with something more recent13:33.26 
rsc chrisl: same error13:33.51 
chrisl Can't be the same error13:34.03 
kens Could be similar13:34.19 
rsc http://fpaste.org/120119/61224781/13:34.47 
  Sorry, similar but not same.13:34.53 
chrisl So, your changes to cidfmap aren't being picked up13:35.23 
rsc Okay.13:36.37 
chrisl Can you try using -I to point gs to the directory containing your cidfmap, the try the findresource again?13:37.09 
rsc "/SubFontID 0 /CSI [(Unicode) 0]" -> "Loading a TT font from /opt/fonts/MerriweatherSans-Regular.ttf to emulate a CID font MerriweatherSans ... Done."13:37.15 
  But is "/SubFontID 0 /CSI [(Unicode) 0]" correct? before I was using "/SubFontID 0" only.13:37.29 
chrisl SubFontID should be redundant in this case13:37.56 
kens I thought we agreed you were going to try [(Unicode) 0]13:38.04 
chrisl I think you need ".../CSI [(Identity) 0]..."13:38.53 
rsc Okay. Let me try.13:41.33 
  kens, chrisl: Thank you very much - it works now.14:22.26 
kens That's nice.14:22.36 
rsc I also had to create a *.afm but that's outside of this.14:23.08 
kens Ah well that won't be for GS...14:23.19 
rsc Yes, but that was something which I knew before already (and got relevant when GS started working)14:25.06 
chrisl Hmm, most applications these days use metrics direct from the fonts, especially TTFs, rather than AFMs.....14:26.22 
rsc Believe me, I do not love that application.14:27.25 
  It's from the 1990s :(14:27.44 
kens Hey GS is from the 1980s :-)14:27.58 
rsc But maintained :)14:28.05 
kens True14:28.10 
rsc (in difference to our internal thing)14:28.11 
chrisl going to collect some mail - back in 20-30 mins......15:05.05 
jogux mattchz: interesting, in ios8b4, mupdf no longer crashes when I try to delete a file... but neither does the delete dialogue actually show.15:27.12 
mattchz nice15:27.22 
jogux the screen dims out like it's displaying it15:27.55 
 Forward 1 day (to 2014/07/24)>>> 
ghostscript.com
Search: