Log of #ghostscript at irc.freenode.net.

Search:
 <<<Back 1 day (to 2018/01/31)20180201 
Thomas___ Hi14:07.21 
ghostbot Welcome to #ghostscript. If you have a question, please ask it, don't ask to ask it. Do be prepared to wait for a reply as devs will check the logs and reply when they come on line. If you are looking for help or infomation about MuPDF, try the new #mupdf channel.14:07.21 
Thomas___ i'm trying to convert an eps file into a svg one (with ghostscript oc and inkscape)14:07.52 
  in my eps file, i've got a '\306' character code, which stand for a U+0306 unicode character.14:08.24 
kens Let me guess, you are THomas Grockowiak ?14:09.06 
  ASked the same question on Stack Overflow, and I answered it there14:09.16 
Thomas___ Oh14:09.16 
  yes, that's true14:09.27 
  and you answer was more or less correct14:09.34 
  No probleme with the font here, juste that Ghostscript take it as an ISO-8859-1 and not as an unicode14:10.22 
kens Nothing to do with Ghostscript14:10.47 
  As I said in my answer, using a TrueType font as a substitute for a missing font is essentially an exercise in guesswork.14:11.10 
  The character code is not 'Unicode', its just a character code14:11.23 
  Grr stupid underlin...14:11.31 
  Anyway, PostScript has no concept of code pages, or Unicode, or anythign else.14:11.47 
  Character codes are mapped to glyph names using internal PostScript machinery, the Encoding array.14:12.07 
  In the absence of a font, we cannot reliably know what glyph name the character code maps to (unless there is an Encoding, even though the font is missing)14:12.35 
  The situation is even worse when the font is a TrueType font, as many TrueType fonts lack a POST table, which is used to map PostScript glyph names to TrueType GIDs14:13.19 
  So in the absence of all this information, Ghostscript tries its best.14:13.31 
  But its essentially guessing, so as I said, Your Mileage My Vary14:13.45 
  The correct way to deal with this situation is to embed the font in the original EPS14:14.02 
  If you want to post the EPS somewhere that we can look at it I'll take a quick look, but I strongly suspect all I'll be able to say is 'yep, that's what happens when you don't embed fonts'14:15.35 
Thomas___ the font isn't embed as expected14:17.07 
  We use an external soft call Mathtype to write math formula into eps14:17.22 
  We unfortinatly cannot tell MathType to embed font in eps files14:17.45 
kens Then I suggest you complain to the people behind MathType, because that's just pants14:18.04 
  It practically guarantees the wrong answer in many cases.14:18.19 
  According to a quickj Google search, MathType can embed fonts14:18.58 
  Hmm, but that appears to be for Office documents14:19.53 
Thomas___ Yes, I've read the mathtype tutorial for that but was unable to achieve font embeding14:22.05 
kens It seems that MathType doesn't ever embed fonts14:22.18 
  It just expects you to configure the consumer.14:22.37 
  And that, frankly, is just poor14:22.43 
  I'd complain personally14:23.06 
  If you paid for it14:23.12 
  As I mentioned before, if you post the EPS somerwhere I'll take a look but I can't promise anything at all.14:24.31 
  The problem occurs at the point the EPS is created without the fotns, especially if the fonts are TrueType fonts.14:24.55 
chrisl This is using a *font*? Not a CIDFont?14:28.34 
kens I believe so, but in the absence of a file to look at, hard to say14:28.59 
chrisl Hard to see how character code 0x306 is ever going to work....14:29.39 
kens That's octal 30614:30.07 
  0xC614:30.26 
chrisl Oh, doh14:30.37 
Thomas___ the niput file is here14:33.11 
  https://pastebin.com/ZFyWnq6Z14:33.11 
  wrong file14:33.24 
kens That file doesn't seem to use Arial14:34.07 
  Cambria and SymbolMT14:34.17 
Thomas___ https://pastebin.com/zwDNFs0N14:34.33 
  Yes, Cambria and symbol here14:34.40 
  Isn't embed14:34.49 
kens It would help keep things sensible if we could always discuss the same problem.14:35.08 
  Even if we can tell you how to make Cambria work, it may well not be applicable to Arial.14:35.27 
  The bottom line is you can't just use TrueType fonts willy nilly and hope they will work in PostScript, because PostScript only supports TrueType when the font is a type 42 font.14:36.03 
  Which is all the data from a TrueType font *PLUS* the extra information needed to make it work in PostScript.14:36.24 
  When you use a TrueType font without that extra information then we need to try and guess, and that's where things go wrong.14:36.46 
Thomas___ ok14:37.14 
kens First thing to point out is that in PostScript (\306) isn't a hex number, as I just said a minute ago, its an octal number14:37.19 
Thomas___ I'm gonna look to translate my ttf to type 42 then14:37.25 
kens That's not really a viable option14:38.00 
  Type 42 is only really usable in PostScript.14:38.14 
  I don't know what glyph the charactre code (\306) is meant to be. I'm in the same position as Ghostscript here, there is no way to tell14:39.37 
Thomas___ As I look further, I think I have multiple problems. One with ghostscript(With my font), and one with mathtype14:40.53 
kens Personally I'd say the font problem is also a MatyType problem14:41.28 
  What is this glyph *expected* to be ?14:41.37 
Thomas___ I will take one at a time, asking MathType support for their help to embed fnot in the eps14:41.41 
  I think that will also help ghostscript work in a better way14:41.55 
kens I expect MathType will tell you to use Adobe Acrobat Distiller :-)14:42.04 
Thomas___ That should be ^14:42.10 
kens But yes, if you can get them to embed the font as a type 42, that will work14:42.17 
  caret, hmmm.14:42.27 
  Crazy scale factors in the file14:43.46 
  I can''t immediately see any way for Ghostscript to know that 0xC6 (\306) is supposed to be a caret. In ISOLatin1 its an AE, Cacute in CE and breve in StandardEncoding, which is what it looks like we are using. I think using StandardEncoding is reasonable.14:48.18 
chrisl IIRC, the base encoding we use when loading a TTF depends on the contents of the TTF....14:49.03 
kens I'm just dumping the TTF now14:49.14 
  I need to find it first....14:49.20 
Thomas___ yes, that's why I said I think MathType also has a problem14:49.29 
chrisl That might be only for PDF, though14:49.32 
kens Oh its a TrueType collection14:49.43 
  Just to confuse the issue further14:49.58 
Thomas___ But, when Cambria wasn't installed on unix, Ghostscript print U+0306 (aka Breve)14:50.01 
kens Yes a breve is what I'm seeing, since I don't have the font installed in Ghostscript14:50.23 
  As chrisl just said, what you actually get depends on the content of the font, which I'm wrking on now14:50.44 
  But its actually a TrueType Collection, so it includes *2* fonts14:50.59 
Thomas___ Cambria and Cambria Math, right14:51.15 
  I've found a standalone Cambria but it didn't change anything14:51.28 
kens I suspect Ghostscript is only using index 1 for the font, threfore Cambria-Regular14:51.50 
  Format 3 POST tabel, so no PostScript names for any of the glyphs14:52.28 
chrisl I'd forgotten how convoluted that Ghostscript code is!14:53.43 
kens Well its trying to do a non-trivial task14:54.06 
  Sigh the output from ttfdump is 30MB14:54.19 
  So 0xC6 maps to GID 4014:55.59 
  chrisl can you tell which GID Ghostscript is using ?14:56.45 
chrisl I'd have to debug through FAPI14:57.14 
kens I was hoping to avoid that14:57.27 
Thomas___ Don't worry14:57.43 
  I will look with mathtype support, With some luck, they will be able to help me embed the font in the eps, resolving my problems14:58.10 
  don't lost too much time with my problem14:58.28 
kens I just used Adobe Acrobat Distiller to create a PDF fiel, and it too shows the character as a Breve14:58.52 
  And Distiller has embedded the actual TrueType fotn from disk14:59.23 
chrisl I guess it doesn't consider it a substitute15:00.19 
kens Well Distiller knows hte font is on disk15:00.53 
  When we have the font in fotnmap.GS we produce an AE glyph instead of a breve15:01.09 
  So we think its ISOLatin1 not StandardEncoding15:01.34 
chrisl So, no post table, but a 3.1 cmap table?15:02.02 
kens At which point I'm going to give up and say 'yep, need to embed teh font really'15:02.04 
  yes thre's a 3,1 CMAP15:02.12 
  I think also a 3,0. There are 3 CMAP tables in all15:02.25 
chrisl If there's a 3.1 cmap we use (or at least, start with) ISOLatin1Encoding15:03.08 
kens Well I guess that would probably explain it. Like I said, when we start using TrueType fotns as substitutes for missing fonts, then its all guesswork15:03.36 
chrisl Thomas___: if you don't get any joy from mathtype, let us know, and if I have time, I'll look at it a bit more15:06.08 
  kens: Trivial commit, but unless I'm missing something...... http://git.ghostscript.com/?p=user/chrisl/ghostpdl.git;a=commitdiff;h=f52a7ccf96f1b9bb90194ba1dd6a50040dd6389615:06.59 
kens WEell that does seem a lot more sensible15:07.20 
chrisl I thought so!15:07.44 
kens Its probably historical, good to fix it15:07.58 
Thomas___ Ok, I will keep you in touch15:09.12 
  thanks for your time!15:09.16 
kens NP good luck with it15:09.51 
 Forward 1 day (to 2018/02/02)>>> 
ghostscript.com #mupdf
Search: