|
View:
New views
17 Messages
—
Rating Filter:
Alert me
|
|
|
ArabicTransparent and ArabicTransparent-Bold FontsI am using the following command to convert PDF images into CCITT4 TIFF images:
gswin32c.exe -dPrinted -dBATCH -dPDFFitPage -dUseCropBox -dNOPAUSE -dDITHERPPI=100 -sDEVICE=tiffg4 -r600x600 -sOutputFile="c:\temp\arabic.tif" "C:\temp\arabic.pdf"
The PDF contains ArabicTransparent and ArabicTransparent-Bold fonts (the PDF also lists for both of those the corresponding xxx-Identity-H fonts, but I'm guessing that just means it's a CID?). I really don't have a clue what I'm doing, but what I'm trying to do (if this is the proper approach) is to get ghostscript to emulate the TrueType fonts that I have. I have made the following entries into the cidfmap file:
/ArabicTransparent-Bold << /FileType /TrueType /Path (c:/windows/fonts/artrbdo.ttf) /CSI [(CNS1) 4] >> ; /ArabicTransparent << /FileType /TrueType /Path (c:/windows/fonts/artro.ttf) /CSI [(CNS1) 4] >> ;
Before adding those entries, I would get the following error: Substituting CID font resource/Adobe-Identity for /ArabicTransparent. Error: /undefinedresource in findresource
After adding those entries, the TIF is generated, but the fonts appear as blocks which means either you can't do it this way or I am using the wrong parameters for /CIS. Any help would be tremendously appreciated.
Thanks in advance, Levi _______________________________________________ gs-devel mailing list gs-devel@... http://www.ghostscript.com/mailman/listinfo/gs-devel |
|
|
Re: ArabicTransparent and ArabicTransparent-Bold FontsAt 12:16 14/10/2009 -0400, Levi wrote:
>The PDF contains ArabicTransparent and ArabicTransparent-Bold fonts (the >PDF also lists for both of those the corresponding xxx-Identity-H fonts, >but I'm guessing that just means it's a CID?). If the PDF file contains the fonts, then you don't need to add them to GS, it will use the ones in the PDF file. Containing both is not really ideal, it (probably, would need to see the file to be sure) means that you have a regular TrueType font and a CIDFont with TrueType outlines, with the same name (maybe, they might be subset). > I really don't have a clue what I'm doing, but what I'm trying to do > (if this is the proper approach) is to get ghostscript to emulate the > TrueType fonts that I have. I think you mean get GS to use the fonts you have, not emulate. > I have made the following entries into the cidfmap file: > >/ArabicTransparent-Bold << /FileType /TrueType /Path >(c:/windows/fonts/artrbdo.ttf) /CSI [(CNS1) 4] >> ; >/ArabicTransparent << /FileType /TrueType /Path >(c:/windows/fonts/artro.ttf) /CSI [(CNS1) 4] >> ; > >Before adding those entries, I would get the following error: > >Substituting CID font resource/Adobe-Identity for /ArabicTransparent. >Error: /undefinedresource in findresource Well, that tells you that at least one of the fonts, ArabicTransparent, is not in the PDF file. It isn't complaining about ArabicTransparent-Identity-H so its not apparently missing the CIDFont (or perhaps the document simply isn't using the CIDFont). >After adding those entries, the TIF is generated, but the fonts appear as >blocks which means either you can't do it this way or I am using the wrong >parameters for /CIS. Any help would be tremendously appreciated. If you've quoted the text properly, then its not a CIDFont which is missing, its a straight-forward TrueType font. Looks like GS is using the CIDFont as a replacement for the regular TrueType font, which will probably use 2 bytes per glyph, and quite likely won't produce a working glyph. This may mean you get the /.notdef instead, this is usually a hollow square but might be anything. You probably need to add the fonts as Fonts, not CIDFonts, at a guess. This will mean editing fontmap.GS (not cidfmap) in your gs/Resource/Init directory. Ken _______________________________________________ gs-devel mailing list gs-devel@... http://www.ghostscript.com/mailman/listinfo/gs-devel |
|
|
Re: ArabicTransparent and ArabicTransparent-Bold FontsOn Wed, Oct 14, 2009 at 12:43 PM, Ken Sharp <ken.sharp@...> wrote:
> > At 12:16 14/10/2009 -0400, Levi wrote: > >> The PDF contains ArabicTransparent and ArabicTransparent-Bold fonts (the PDF also lists for both of those the corresponding xxx-Identity-H fonts, but I'm guessing that just means it's a CID?). > > If the PDF file contains the fonts, then you don't need to add them to GS, it will use the ones in the PDF file. Containing both is not really ideal, it (probably, would need to see the file to be sure) means that you have a regular TrueType font and a CIDFont with TrueType outlines, with the same name (maybe, they might be subset). I apologize, I forgot to mention that the fonts are NOT embedded in the document. They are copyrighted. I have the fonts installed on my system in C:\windows\fonts. > > > >> I really don't have a clue what I'm doing, but what I'm trying to do (if this is the proper approach) is to get ghostscript to emulate the TrueType fonts that I have. > > I think you mean get GS to use the fonts you have, not emulate. I was having trouble getting GS to use the fonts that I have. I added the following entry into my gs\gs8.63\lib\Fontmap.GS file (I removed the entries I had made to cdifontmap before doing this): /ArabicTransparent-Bold (artrbdo.ttf) ; /ArabicTransparent (artro.ttf) ; After doing so, I get the following error / stack: Processing pages 1 through 1. Page 1 Substituting CID font resource/Adobe-Identity for /ArabicTransparent. Error: /undefinedresource in findresource Operand stack: --nostringval-- --dict:8/17(L)-- G1 1 --dict:5/5(L)-- --dict:5/5(L)-- ArabicTransparent-Identity-H --dict:10/12(ro)(G)-- --nostring val-- CIDFontObject --dict:7/7(L)-- --dict:7/7(L)-- Adobe-Identity CIDFont Adobe-Identity Execution stack: %interp_exit .runexec2 --nostringval-- --nostringval-- --nostringval-- 2 %stopped_push --nostringval-- --nostringval-- --nostring val-- false 1 %stopped_push 1905 1 3 %oparray_pop 1904 1 3 %oparray_pop 1888 1 3 %oparray_pop --nostringval-- --nost ringval-- 2 1 1 --nostringval-- %for_pos_int_continue --nostringval-- --nostringval-- --nostringval-- --nostringval-- %array_conti nue --nostringval-- false 1 %stopped_push --nostringval-- %loop_continue --nostringval-- --nostringval-- --nostringval-- --nostrin gval-- --nostringval-- --nostringval-- %array_continue --nostringval-- --nostringval-- --nostringval-- --nostringval-- --nostringval-- %loop_continue --nostringval-- 1856 14 10 %oparray_pop findresource %errorexec_pop --nostringval-- --nostringval-- --nostringva l-- Dictionary stack: --dict:1165/1684(ro)(G)-- --dict:1/20(G)-- --dict:75/200(L)-- --dict:75/200(L)-- --dict:106/127(ro)(G)-- --dict:275/300(ro)(G)-- --dict :21/25(L)-- --dict:4/6(L)-- --dict:22/40(L)-- --dict:10/13(L)-- --dict:20/26(ro)(G)-- Current allocation mode is local Last OS error: No such file or directory GPL Ghostscript 8.63: Unrecoverable error, exit code 1 > > You probably need to add the fonts as Fonts, not CIDFonts, at a guess. This will mean editing fontmap.GS (not cidfmap) in your gs/Resource/Init directory. > I should also mention that in my gs folder I do not have a /Resource/Init directory. In fact, I did not even have a Resource directory, but I created one by copying the Resource directory that was in c:\program files\Adobe\Reader 8.0\Resource to see if that would help with the CID font. Again, thanks for the quick response and it sounds like using the straight TTF is what I need but I am obviously doing it wrong. Thanks again, Levi _______________________________________________ gs-devel mailing list gs-devel@... http://www.ghostscript.com/mailman/listinfo/gs-devel |
|
|
Re: ArabicTransparent and ArabicTransparent-Bold FontsAre the gs8xxw32.exe files compiled with the ttfont option normally?
On Wed, Oct 14, 2009 at 1:00 PM, Levi <skankwilsonite@...> wrote: > On Wed, Oct 14, 2009 at 12:43 PM, Ken Sharp <ken.sharp@...> wrote: >> >> At 12:16 14/10/2009 -0400, Levi wrote: >> >>> The PDF contains ArabicTransparent and ArabicTransparent-Bold fonts (the PDF also lists for both of those the corresponding xxx-Identity-H fonts, but I'm guessing that just means it's a CID?). >> >> If the PDF file contains the fonts, then you don't need to add them to GS, it will use the ones in the PDF file. Containing both is not really ideal, it (probably, would need to see the file to be sure) means that you have a regular TrueType font and a CIDFont with TrueType outlines, with the same name (maybe, they might be subset). > > I apologize, I forgot to mention that the fonts are NOT embedded in > the document. They are copyrighted. I have the fonts installed on my > system in C:\windows\fonts. >> >> >> >>> I really don't have a clue what I'm doing, but what I'm trying to do (if this is the proper approach) is to get ghostscript to emulate the TrueType fonts that I have. >> >> I think you mean get GS to use the fonts you have, not emulate. > > I was having trouble getting GS to use the fonts that I have. I > added the following entry into my gs\gs8.63\lib\Fontmap.GS file (I > removed the entries I had made to cdifontmap before doing this): > /ArabicTransparent-Bold (artrbdo.ttf) ; > /ArabicTransparent (artro.ttf) ; > After doing so, I get the following error / stack: > > Processing pages 1 through 1. > Page 1 > Substituting CID font resource/Adobe-Identity for /ArabicTransparent. > Error: /undefinedresource in findresource > Operand stack: > --nostringval-- --dict:8/17(L)-- G1 1 --dict:5/5(L)-- > --dict:5/5(L)-- ArabicTransparent-Identity-H --dict:10/12(ro)(G)-- > --nostring > val-- CIDFontObject --dict:7/7(L)-- --dict:7/7(L)-- > Adobe-Identity CIDFont Adobe-Identity > Execution stack: > %interp_exit .runexec2 --nostringval-- --nostringval-- > --nostringval-- 2 %stopped_push --nostringval-- > --nostringval-- --nostring > val-- false 1 %stopped_push 1905 1 3 %oparray_pop 1904 > 1 3 %oparray_pop 1888 1 3 %oparray_pop --nostringval-- > --nost > ringval-- 2 1 1 --nostringval-- %for_pos_int_continue > --nostringval-- --nostringval-- --nostringval-- --nostringval-- > %array_conti > nue --nostringval-- false 1 %stopped_push --nostringval-- > %loop_continue --nostringval-- --nostringval-- --nostringval-- > --nostrin > gval-- --nostringval-- --nostringval-- %array_continue > --nostringval-- --nostringval-- --nostringval-- --nostringval-- > --nostringval-- > %loop_continue --nostringval-- 1856 14 10 %oparray_pop > findresource %errorexec_pop --nostringval-- --nostringval-- > --nostringva > l-- > Dictionary stack: > --dict:1165/1684(ro)(G)-- --dict:1/20(G)-- --dict:75/200(L)-- > --dict:75/200(L)-- --dict:106/127(ro)(G)-- --dict:275/300(ro)(G)-- > --dict > :21/25(L)-- --dict:4/6(L)-- --dict:22/40(L)-- --dict:10/13(L)-- > --dict:20/26(ro)(G)-- > Current allocation mode is local > Last OS error: No such file or directory > GPL Ghostscript 8.63: Unrecoverable error, exit code 1 > >> >> You probably need to add the fonts as Fonts, not CIDFonts, at a guess. This will mean editing fontmap.GS (not cidfmap) in your gs/Resource/Init directory. >> > > I should also mention that in my gs folder I do not have a > /Resource/Init directory. In fact, I did not even have a Resource > directory, but I created one by copying the Resource directory that > was in c:\program files\Adobe\Reader 8.0\Resource to see if that would > help with the CID font. Again, thanks for the quick response and it > sounds like using the straight TTF is what I need but I am obviously > doing it wrong. > > Thanks again, > > Levi > gs-devel mailing list gs-devel@... http://www.ghostscript.com/mailman/listinfo/gs-devel |
|
|
Re: ArabicTransparent and ArabicTransparent-Bold FontsHi Levi,
Yes, ttfont support is built in by default. Note that Ghostscript can search for fonts in a directory (such as c:/windows/fonts) automatically by using the GS_FONTPATH environment variable or the -sFONTPATH=___ command line option. For example: gswin32 -sFONTPATH=c:/windows/fonts mypdf.pdf Note that this will search your c:/windows/directory EVERY TIME ghostscript runs and encounters a font that is not found in Resource/Font (by an exact name match), or in a file on the LIBPATH as listed in the Fontmap. The 'toolbin/genfontmap.ps' can do the scan once and write out a Fontmap file with all of the fonts that it finds so that if this Fontmap is used for subsequent runs of gswin32 you won't need to specify -sFONTPATH and spend the time scanning. Another note is that the font name must match EXACTLY. For example ArialXX is NOT the same as Arial. If you want to use ArialXX when the document requests Arial then you can put this (alias) line in your Fontmap: /Arial /ArialXX ; The 'genfontmap.ps' program mentioned above can be used to see what the actual font names are in your c:/windows/fonts by running it and looking at the result, then add any aliases that you desire. I hope this helps. BTW, reading the documents might help clarify things. There is information in available at: http://www.artifex.com/gs870/Use.htm#Font_lookup Regards, Ray ________________________________________________________________ Levi wrote: > Are the gs8xxw32.exe files compiled with the ttfont option normally? > > On Wed, Oct 14, 2009 at 1:00 PM, Levi <skankwilsonite@...> wrote: >> On Wed, Oct 14, 2009 at 12:43 PM, Ken Sharp <ken.sharp@...> wrote: >>> At 12:16 14/10/2009 -0400, Levi wrote: >>> >>>> The PDF contains ArabicTransparent and ArabicTransparent-Bold fonts (the PDF also lists for both of those the corresponding xxx-Identity-H fonts, but I'm guessing that just means it's a CID?). >>> If the PDF file contains the fonts, then you don't need to add them to GS, it will use the ones in the PDF file. Containing both is not really ideal, it (probably, would need to see the file to be sure) means that you have a regular TrueType font and a CIDFont with TrueType outlines, with the same name (maybe, they might be subset). >> I apologize, I forgot to mention that the fonts are NOT embedded in >> the document. They are copyrighted. I have the fonts installed on my >> system in C:\windows\fonts. >>> >>> >>>> I really don't have a clue what I'm doing, but what I'm trying to do (if this is the proper approach) is to get ghostscript to emulate the TrueType fonts that I have. >>> I think you mean get GS to use the fonts you have, not emulate. >> I was having trouble getting GS to use the fonts that I have. I >> added the following entry into my gs\gs8.63\lib\Fontmap.GS file (I >> removed the entries I had made to cdifontmap before doing this): >> /ArabicTransparent-Bold (artrbdo.ttf) ; >> /ArabicTransparent (artro.ttf) ; >> After doing so, I get the following error / stack: >> >> Processing pages 1 through 1. >> Page 1 >> Substituting CID font resource/Adobe-Identity for /ArabicTransparent. >> Error: /undefinedresource in findresource >> Operand stack: >> --nostringval-- --dict:8/17(L)-- G1 1 --dict:5/5(L)-- >> --dict:5/5(L)-- ArabicTransparent-Identity-H --dict:10/12(ro)(G)-- >> --nostring >> val-- CIDFontObject --dict:7/7(L)-- --dict:7/7(L)-- >> Adobe-Identity CIDFont Adobe-Identity >> Execution stack: >> %interp_exit .runexec2 --nostringval-- --nostringval-- >> --nostringval-- 2 %stopped_push --nostringval-- >> --nostringval-- --nostring >> val-- false 1 %stopped_push 1905 1 3 %oparray_pop 1904 >> 1 3 %oparray_pop 1888 1 3 %oparray_pop --nostringval-- >> --nost >> ringval-- 2 1 1 --nostringval-- %for_pos_int_continue >> --nostringval-- --nostringval-- --nostringval-- --nostringval-- >> %array_conti >> nue --nostringval-- false 1 %stopped_push --nostringval-- >> %loop_continue --nostringval-- --nostringval-- --nostringval-- >> --nostrin >> gval-- --nostringval-- --nostringval-- %array_continue >> --nostringval-- --nostringval-- --nostringval-- --nostringval-- >> --nostringval-- >> %loop_continue --nostringval-- 1856 14 10 %oparray_pop >> findresource %errorexec_pop --nostringval-- --nostringval-- >> --nostringva >> l-- >> Dictionary stack: >> --dict:1165/1684(ro)(G)-- --dict:1/20(G)-- --dict:75/200(L)-- >> --dict:75/200(L)-- --dict:106/127(ro)(G)-- --dict:275/300(ro)(G)-- >> --dict >> :21/25(L)-- --dict:4/6(L)-- --dict:22/40(L)-- --dict:10/13(L)-- >> --dict:20/26(ro)(G)-- >> Current allocation mode is local >> Last OS error: No such file or directory >> GPL Ghostscript 8.63: Unrecoverable error, exit code 1 >> >>> You probably need to add the fonts as Fonts, not CIDFonts, at a guess. This will mean editing fontmap.GS (not cidfmap) in your gs/Resource/Init directory. >>> >> I should also mention that in my gs folder I do not have a >> /Resource/Init directory. In fact, I did not even have a Resource >> directory, but I created one by copying the Resource directory that >> was in c:\program files\Adobe\Reader 8.0\Resource to see if that would >> help with the CID font. Again, thanks for the quick response and it >> sounds like using the straight TTF is what I need but I am obviously >> doing it wrong. >> >> Thanks again, >> >> Levi >> > _______________________________________________ > gs-devel mailing list > gs-devel@... > http://www.ghostscript.com/mailman/listinfo/gs-devel > _______________________________________________ gs-devel mailing list gs-devel@... http://www.ghostscript.com/mailman/listinfo/gs-devel |
|
|
Re: ArabicTransparent and ArabicTransparent-Bold FontsRay,
I have ran the command with the -sFONTPATH included to no avail: >>gswin32c.exe -dPrinted -dBATCH -dPDFFitPage -dUseCropBox -dNOPAUSE -dDITHERPPI=100 -sDEVICE=tiffg4 -r72x72 -sFONTPATH=C:/windows/fonts -sOutputFile="c:\temp\arabic.tif" "C:\temp\arabic.pdf" This is with the following entries in my fontmap.GS: /ArabicTransparent-Bold (artrbdo.ttf) ; /ArabicTransparent (artro.ttf) ; On Wed, Oct 14, 2009 at 3:36 PM, Ray Johnston <Ray.Johnston@...> wrote: > Hi Levi, > > Yes, ttfont support is built in by default. > > Note that Ghostscript can search for fonts in a directory (such > as c:/windows/fonts) automatically by using the GS_FONTPATH > environment variable or the -sFONTPATH=___ command line option. > > For example: > > gswin32 -sFONTPATH=c:/windows/fonts mypdf.pdf > > Note that this will search your c:/windows/directory EVERY TIME > ghostscript runs and encounters a font that is not found in > Resource/Font (by an exact name match), or in a file on the > LIBPATH as listed in the Fontmap. > > The 'toolbin/genfontmap.ps' can do the scan once and write out > a Fontmap file with all of the fonts that it finds so that if > this Fontmap is used for subsequent runs of gswin32 you won't > need to specify -sFONTPATH and spend the time scanning. > > Another note is that the font name must match EXACTLY. For > example ArialXX is NOT the same as Arial. If you want to use > ArialXX when the document requests Arial then you can put this > (alias) line in your Fontmap: > > /Arial /ArialXX ; > > The 'genfontmap.ps' program mentioned above can be used to see > what the actual font names are in your c:/windows/fonts by > running it and looking at the result, then add any aliases > that you desire. > > I hope this helps. BTW, reading the documents might help > clarify things. There is information in available at: > > http://www.artifex.com/gs870/Use.htm#Font_lookup > > Regards, > Ray > ________________________________________________________________ > Levi wrote: >> >> Are the gs8xxw32.exe files compiled with the ttfont option normally? >> >> On Wed, Oct 14, 2009 at 1:00 PM, Levi <skankwilsonite@...> wrote: >>> >>> On Wed, Oct 14, 2009 at 12:43 PM, Ken Sharp <ken.sharp@...> >>> wrote: >>>> >>>> At 12:16 14/10/2009 -0400, Levi wrote: >>>> >>>>> The PDF contains ArabicTransparent and ArabicTransparent-Bold fonts >>>>> (the PDF also lists for both of those the corresponding xxx-Identity-H >>>>> fonts, but I'm guessing that just means it's a CID?). >>>> >>>> If the PDF file contains the fonts, then you don't need to add them to >>>> GS, it will use the ones in the PDF file. Containing both is not really >>>> ideal, it (probably, would need to see the file to be sure) means that you >>>> have a regular TrueType font and a CIDFont with TrueType outlines, with the >>>> same name (maybe, they might be subset). >>> >>> I apologize, I forgot to mention that the fonts are NOT embedded in >>> the document. They are copyrighted. I have the fonts installed on my >>> system in C:\windows\fonts. >>>> >>>> >>>>> I really don't have a clue what I'm doing, but what I'm trying to do >>>>> (if this is the proper approach) is to get ghostscript to emulate the >>>>> TrueType fonts that I have. >>>> >>>> I think you mean get GS to use the fonts you have, not emulate. >>> >>> I was having trouble getting GS to use the fonts that I have. I >>> added the following entry into my gs\gs8.63\lib\Fontmap.GS file (I >>> removed the entries I had made to cdifontmap before doing this): >>> /ArabicTransparent-Bold (artrbdo.ttf) ; >>> /ArabicTransparent (artro.ttf) ; >>> After doing so, I get the following error / stack: >>> >>> Processing pages 1 through 1. >>> Page 1 >>> Substituting CID font resource/Adobe-Identity for /ArabicTransparent. >>> Error: /undefinedresource in findresource >>> Operand stack: >>> --nostringval-- --dict:8/17(L)-- G1 1 --dict:5/5(L)-- >>> --dict:5/5(L)-- ArabicTransparent-Identity-H --dict:10/12(ro)(G)-- >>> --nostring >>> val-- CIDFontObject --dict:7/7(L)-- --dict:7/7(L)-- >>> Adobe-Identity CIDFont Adobe-Identity >>> Execution stack: >>> %interp_exit .runexec2 --nostringval-- --nostringval-- >>> --nostringval-- 2 %stopped_push --nostringval-- >>> --nostringval-- --nostring >>> val-- false 1 %stopped_push 1905 1 3 %oparray_pop 1904 >>> 1 3 %oparray_pop 1888 1 3 %oparray_pop --nostringval-- >>> --nost >>> ringval-- 2 1 1 --nostringval-- %for_pos_int_continue >>> --nostringval-- --nostringval-- --nostringval-- --nostringval-- >>> %array_conti >>> nue --nostringval-- false 1 %stopped_push --nostringval-- >>> %loop_continue --nostringval-- --nostringval-- --nostringval-- >>> --nostrin >>> gval-- --nostringval-- --nostringval-- %array_continue >>> --nostringval-- --nostringval-- --nostringval-- --nostringval-- >>> --nostringval-- >>> %loop_continue --nostringval-- 1856 14 10 %oparray_pop >>> findresource %errorexec_pop --nostringval-- --nostringval-- >>> --nostringva >>> l-- >>> Dictionary stack: >>> --dict:1165/1684(ro)(G)-- --dict:1/20(G)-- --dict:75/200(L)-- >>> --dict:75/200(L)-- --dict:106/127(ro)(G)-- --dict:275/300(ro)(G)-- >>> --dict >>> :21/25(L)-- --dict:4/6(L)-- --dict:22/40(L)-- --dict:10/13(L)-- >>> --dict:20/26(ro)(G)-- >>> Current allocation mode is local >>> Last OS error: No such file or directory >>> GPL Ghostscript 8.63: Unrecoverable error, exit code 1 >>> >>>> You probably need to add the fonts as Fonts, not CIDFonts, at a guess. >>>> This will mean editing fontmap.GS (not cidfmap) in your gs/Resource/Init >>>> directory. >>>> >>> I should also mention that in my gs folder I do not have a >>> /Resource/Init directory. In fact, I did not even have a Resource >>> directory, but I created one by copying the Resource directory that >>> was in c:\program files\Adobe\Reader 8.0\Resource to see if that would >>> help with the CID font. Again, thanks for the quick response and it >>> sounds like using the straight TTF is what I need but I am obviously >>> doing it wrong. >>> >>> Thanks again, >>> >>> Levi >>> >> _______________________________________________ >> gs-devel mailing list >> gs-devel@... >> http://www.ghostscript.com/mailman/listinfo/gs-devel >> > > gs-devel mailing list gs-devel@... http://www.ghostscript.com/mailman/listinfo/gs-devel |
|
|
Re: ArabicTransparent and ArabicTransparent-Bold FontsLevi,
Please send the stdout/stderr from Ghostscript. I apologize if that is what you already sent, but it wasn't clear what command line was used for the error report sent previously. Also, please send the PDF file (so we can look at it). Lastly, please send the output from: gswin32c -q -dNODISPLAY -sFONTPATH=c:/windows/fonts toolbin/genfontmap.ps > generated_Fontmap This will show if Ghostscript finds your Arabic fonts and what the 'real' font name is in the .ttf Regards, Ray __________________________________________________________________ Levi wrote: > Ray, > > I have ran the command with the -sFONTPATH included to no avail: > >>> gswin32c.exe -dPrinted -dBATCH -dPDFFitPage -dUseCropBox -dNOPAUSE -dDITHERPPI=100 -sDEVICE=tiffg4 -r72x72 -sFONTPATH=C:/windows/fonts -sOutputFile="c:\temp\arabic.tif" "C:\temp\arabic.pdf" > > This is with the following entries in my fontmap.GS: > > /ArabicTransparent-Bold (artrbdo.ttf) ; > /ArabicTransparent (artro.ttf) ; > > On Wed, Oct 14, 2009 at 3:36 PM, Ray Johnston <Ray.Johnston@...> wrote: >> Hi Levi, >> >> Yes, ttfont support is built in by default. >> >> Note that Ghostscript can search for fonts in a directory (such >> as c:/windows/fonts) automatically by using the GS_FONTPATH >> environment variable or the -sFONTPATH=___ command line option. >> >> For example: >> >> gswin32 -sFONTPATH=c:/windows/fonts mypdf.pdf >> >> Note that this will search your c:/windows/directory EVERY TIME >> ghostscript runs and encounters a font that is not found in >> Resource/Font (by an exact name match), or in a file on the >> LIBPATH as listed in the Fontmap. >> >> The 'toolbin/genfontmap.ps' can do the scan once and write out >> a Fontmap file with all of the fonts that it finds so that if >> this Fontmap is used for subsequent runs of gswin32 you won't >> need to specify -sFONTPATH and spend the time scanning. >> >> Another note is that the font name must match EXACTLY. For >> example ArialXX is NOT the same as Arial. If you want to use >> ArialXX when the document requests Arial then you can put this >> (alias) line in your Fontmap: >> >> /Arial /ArialXX ; >> >> The 'genfontmap.ps' program mentioned above can be used to see >> what the actual font names are in your c:/windows/fonts by >> running it and looking at the result, then add any aliases >> that you desire. >> >> I hope this helps. BTW, reading the documents might help >> clarify things. There is information in available at: >> >> http://www.artifex.com/gs870/Use.htm#Font_lookup >> >> Regards, >> Ray >> ________________________________________________________________ >> Levi wrote: >>> Are the gs8xxw32.exe files compiled with the ttfont option normally? >>> >>> On Wed, Oct 14, 2009 at 1:00 PM, Levi <skankwilsonite@...> wrote: >>>> On Wed, Oct 14, 2009 at 12:43 PM, Ken Sharp <ken.sharp@...> >>>> wrote: >>>>> At 12:16 14/10/2009 -0400, Levi wrote: >>>>> >>>>>> The PDF contains ArabicTransparent and ArabicTransparent-Bold fonts >>>>>> (the PDF also lists for both of those the corresponding xxx-Identity-H >>>>>> fonts, but I'm guessing that just means it's a CID?). >>>>> If the PDF file contains the fonts, then you don't need to add them to >>>>> GS, it will use the ones in the PDF file. Containing both is not really >>>>> ideal, it (probably, would need to see the file to be sure) means that you >>>>> have a regular TrueType font and a CIDFont with TrueType outlines, with the >>>>> same name (maybe, they might be subset). >>>> I apologize, I forgot to mention that the fonts are NOT embedded in >>>> the document. They are copyrighted. I have the fonts installed on my >>>> system in C:\windows\fonts. >>>>> >>>>>> I really don't have a clue what I'm doing, but what I'm trying to do >>>>>> (if this is the proper approach) is to get ghostscript to emulate the >>>>>> TrueType fonts that I have. >>>>> I think you mean get GS to use the fonts you have, not emulate. >>>> I was having trouble getting GS to use the fonts that I have. I >>>> added the following entry into my gs\gs8.63\lib\Fontmap.GS file (I >>>> removed the entries I had made to cdifontmap before doing this): >>>> /ArabicTransparent-Bold (artrbdo.ttf) ; >>>> /ArabicTransparent (artro.ttf) ; >>>> After doing so, I get the following error / stack: >>>> >>>> Processing pages 1 through 1. >>>> Page 1 >>>> Substituting CID font resource/Adobe-Identity for /ArabicTransparent. >>>> Error: /undefinedresource in findresource >>>> Operand stack: >>>> --nostringval-- --dict:8/17(L)-- G1 1 --dict:5/5(L)-- >>>> --dict:5/5(L)-- ArabicTransparent-Identity-H --dict:10/12(ro)(G)-- >>>> --nostring >>>> val-- CIDFontObject --dict:7/7(L)-- --dict:7/7(L)-- >>>> Adobe-Identity CIDFont Adobe-Identity >>>> Execution stack: >>>> %interp_exit .runexec2 --nostringval-- --nostringval-- >>>> --nostringval-- 2 %stopped_push --nostringval-- >>>> --nostringval-- --nostring >>>> val-- false 1 %stopped_push 1905 1 3 %oparray_pop 1904 >>>> 1 3 %oparray_pop 1888 1 3 %oparray_pop --nostringval-- >>>> --nost >>>> ringval-- 2 1 1 --nostringval-- %for_pos_int_continue >>>> --nostringval-- --nostringval-- --nostringval-- --nostringval-- >>>> %array_conti >>>> nue --nostringval-- false 1 %stopped_push --nostringval-- >>>> %loop_continue --nostringval-- --nostringval-- --nostringval-- >>>> --nostrin >>>> gval-- --nostringval-- --nostringval-- %array_continue >>>> --nostringval-- --nostringval-- --nostringval-- --nostringval-- >>>> --nostringval-- >>>> %loop_continue --nostringval-- 1856 14 10 %oparray_pop >>>> findresource %errorexec_pop --nostringval-- --nostringval-- >>>> --nostringva >>>> l-- >>>> Dictionary stack: >>>> --dict:1165/1684(ro)(G)-- --dict:1/20(G)-- --dict:75/200(L)-- >>>> --dict:75/200(L)-- --dict:106/127(ro)(G)-- --dict:275/300(ro)(G)-- >>>> --dict >>>> :21/25(L)-- --dict:4/6(L)-- --dict:22/40(L)-- --dict:10/13(L)-- >>>> --dict:20/26(ro)(G)-- >>>> Current allocation mode is local >>>> Last OS error: No such file or directory >>>> GPL Ghostscript 8.63: Unrecoverable error, exit code 1 >>>> >>>>> You probably need to add the fonts as Fonts, not CIDFonts, at a guess. >>>>> This will mean editing fontmap.GS (not cidfmap) in your gs/Resource/Init >>>>> directory. >>>>> >>>> I should also mention that in my gs folder I do not have a >>>> /Resource/Init directory. In fact, I did not even have a Resource >>>> directory, but I created one by copying the Resource directory that >>>> was in c:\program files\Adobe\Reader 8.0\Resource to see if that would >>>> help with the CID font. Again, thanks for the quick response and it >>>> sounds like using the straight TTF is what I need but I am obviously >>>> doing it wrong. >>>> >>>> Thanks again, >>>> >>>> Levi >>>> >>> _______________________________________________ >>> gs-devel mailing list >>> gs-devel@... >>> http://www.ghostscript.com/mailman/listinfo/gs-devel >>> >> > _______________________________________________ gs-devel mailing list gs-devel@... http://www.ghostscript.com/mailman/listinfo/gs-devel |
|
|
Re: ArabicTransparent and ArabicTransparent-Bold FontsOne thing to note is when I was trying to do this before this thread,
I never have had a "Resource" folder or a "toolbin" folder in my gs8.63 directory. I installed ghostscript using the EXE installer and it must not set those up. However, I have since downloaded the ZIP of gs and extracted those folders into my gs8.63 folder so I could run the toolbin/genfontmap.ps . Could this be part of my problem? Is this not setup correctly? On Wed, Oct 14, 2009 at 5:52 PM, Ray Johnston <Ray.Johnston@...> wrote: > Levi, > > Please send the stdout/stderr from Ghostscript. I apologize if > that is what you already sent, but it wasn't clear what command > line was used for the error report sent previously. Here is the command I ran to convert my PDF as well as the generated output: C: >>gswin32c.exe -dPrinted -dBATCH -dPDFFitPage -dUseCropBox -dNOPAUSE -dDITHERPPI=100 -sDEVICE=tiffg4 -r600x600 -sFONTPATH=C:/windows/fonts -sOutput File="c:\temp\arabic1.tif" "C:\temp\arabic.pdf" GPL Ghostscript 8.63 (2008-08-01) Copyright (C) 2008 Artifex Software, Inc. All rights reserved. This software comes with NO WARRANTY: see the file PUBLIC for details. Processing pages 1 through 1. Page 1 Substituting CID font resource/Adobe-Identity for /ArabicTransparent. Error: /undefinedresource in findresource Operand stack: --nostringval-- --dict:8/17(L)-- G1 1 --dict:5/5(L)-- --dict:5/5(L)-- ArabicTransparent-Identity-H --dict:11/12(ro)(G)-- --nostring val-- CIDFontObject --dict:7/7(L)-- --dict:7/7(L)-- Adobe-Identity CIDFont Adobe-Identity Execution stack: %interp_exit .runexec2 --nostringval-- --nostringval-- --nostringval-- 2 %stopped_push --nostringval-- --nostringval-- --nostring val-- false 1 %stopped_push 1905 1 3 %oparray_pop 1904 1 3 %oparray_pop 1888 1 3 %oparray_pop --nostringval-- --nost ringval-- 2 1 1 --nostringval-- %for_pos_int_continue --nostringval-- --nostringval-- --nostringval-- --nostringval-- %array_conti nue --nostringval-- false 1 %stopped_push --nostringval-- %loop_continue --nostringval-- --nostringval-- --nostringval-- --nostrin gval-- --nostringval-- --nostringval-- %array_continue --nostringval-- --nostringval-- --nostringval-- --nostringval-- --nostringval-- %loop_continue --nostringval-- 1856 14 10 %oparray_pop findresource %errorexec_pop --nostringval-- --nostringval-- --nostringva l-- Dictionary stack: --dict:1165/1684(ro)(G)-- --dict:1/20(G)-- --dict:75/200(L)-- --dict:75/200(L)-- --dict:106/127(ro)(G)-- --dict:275/300(ro)(G)-- --dict :21/25(L)-- --dict:4/6(L)-- --dict:22/40(L)-- --dict:10/13(L)-- --dict:20/26(ro)(G)-- Current allocation mode is local Last OS error: No such file or directory GPL Ghostscript 8.63: Unrecoverable error, exit code 1 Do I need to setup a resource path to point to the "Resource" directory? From the documentation it seems like it should automatically pick it up. I am running the gswin32 from a command prompt from the bin directory. > > Also, please send the PDF file (so we can look at it). > Unfortunately I cannot send the PDF file that I'm working with due to privacy restrictions. I have however attached the "Properties" dialog from FoxIt reader that lists the fonts it's trying to find. > Lastly, please send the output from: > > gswin32c -q -dNODISPLAY -sFONTPATH=c:/windows/fonts toolbin/genfontmap.ps > > generated_Fontmap > > This will show if Ghostscript finds your Arabic fonts and what > the 'real' font name is in the .ttf > I've attached the output from this command, and it looks like it's picking up the font names correctly. _______________________________________________ gs-devel mailing list gs-devel@... http://www.ghostscript.com/mailman/listinfo/gs-devel |
|
|
Re: ArabicTransparent and ArabicTransparent-Bold FontsRay,
I've copied some arabic text and put in another PDF. I cannot get this to convert either. I hope this helps. _______________________________________________ gs-devel mailing list gs-devel@... http://www.ghostscript.com/mailman/listinfo/gs-devel |
|
|
|
|
|
Re: ArabicTransparent and ArabicTransparent-Bold FontsThanks again, Ken. I will look into the cidfmap again to see if I can
get the right ordering and supplement. Is there a way to figure it out from the TTF? I attempted to load the font with fontforge, but wasn't sure where to locate that information or even if it was in it. I'm attaching the two fonts that enable me to see the PDFs in Adobe Reader as well as Foxit Reader. Note that they are copyrighted so they're not embeddable. Thanks to the both of you for your time and quick responses in helping me try to address this issue, and keep up the great work. On Thu, Oct 15, 2009 at 3:45 AM, Ken Sharp <ken.sharp@...> wrote: > At 23:07 14/10/2009 -0400, Levi wrote: > > >> gs and extracted those folders into my gs8.63 folder so I could run >> the toolbin/genfontmap.ps . Could this be part of my problem? Is >> this not setup correctly? > > Depends on the operating system and version of Ghostscript. GS uses a 'ROM' > file system (resources are compiled into the executable binary) for all > platforms today, but on Windows earlier versions used a disk file system. > > Its always possible to override the ROM file system and use the files from > disk. > > >> GPL Ghostscript 8.63 (2008-08-01) >> Copyright (C) 2008 Artifex Software, Inc. All rights reserved. >> This software comes with NO WARRANTY: see the file PUBLIC for details. >> Processing pages 1 through 1. >> Page 1 >> Substituting CID font resource/Adobe-Identity for /ArabicTransparent. >> Error: /undefinedresource in findresource > > OK, this tells us that the PDF file is indeed looking for a CIDFont named > ArabicTransparent. The PDF file you've sent in a different email contains > references to two fonts, one a CIDFont and one a regular Font, both called > ArabicTransparent. > > Its hard to tell if that's the problem, I doubt it but it might be related, > these ideally ought to have different names. > > >> Do I need to setup a resource path to point to the "Resource" >> directory? From the documentation it seems like it should >> automatically pick it up. I am running the gswin32 from a command >> prompt from the bin directory. > > If you don't want to use the ROM files (which you don't if you are modifying > the fonts, then you need to use the -I switch to add the directories > containing the Resource files to the GS search path. > > You may already have an environment variable doing this. > > Note that the GS_FONTPATH environment variable is probably already pointing > to your font location, where the ArabicTransport font is stored, this is why > you aren't getting an error on the regular font, just the CIDFont. > > (actually I see that the installer created a fontmap for you with this font > already present) > > > >> I've attached the output from this command, and it looks like it's >> picking up the font names correctly. >> Content-Type: application/octet-stream; name=generated_Fontmap >> Content-Disposition: attachment; filename=generated_Fontmap >> X-Attachment-Id: f_g0sx5lzu0 >> >> Content-Type: image/png; name="pdf_fonts.png" >> Content-Disposition: attachment; filename="pdf_fonts.png" >> X-Attachment-Id: f_g0sxe2ac1 > > There's something of a puzzle here. The Acrobat font information says that > both ArabicTransport and ArabicTransport-Identity-H have an actual Font Type > of Type1. However the fontmap indicates that ArabicTransport is a TrueType > font: > > (ArabicTransparent) (artro.ttf) ; > > Is it possible you have the same font in different formats ? The fact that > Acrobat is using a different font to Ghostscript might lead to problems. > > However, leaving that aside, I believe you will need to add ArabicTransport > as *both* a Font and a CIDFont for this to work. It seems that your > generated FontMap already contains an entry for ArabicTransport as a Font > (presumably as part of the installation process). > > So, all you need to do is add a CIDFont. Going back to your original mail I > see you already have done this, and had some success, but the result was not > what you expected. What you specified was: > > /ArabicTransparent << /FileType /TrueType /Path (c:/windows/fonts/artro.ttf) > /CSI [(CNS1) 4] >> ; > > You've chosen a Chinese Ordering using Supplement 4, and you haven't > specified a SubfontID. I would suggest that you try a different ordering and > supplement. Identity would seem the most likely based on the content of your > later PDF file, but you might also try Unicode. Assuming that the font is > not a TrueType collection you probably don't need to worry about the > Subfont. > > Eg: > > /ArabicTransparent << /FileType /TrueType /Path (c:/windows/fonts/artro.ttf) > /CSI [(Identity) 0] >> ; > > Or > > /ArabicTransparent << /FileType /TrueType /Path (c:/windows/fonts/artro.ttf) > /CSI [(Unicode) 0] >> ; > > Without seeing the font (and disassembling it to see what's inside) I can't > really help any further I'm afraid. Using a TrueType font to substitute for > a missing font is always somewhat difficult and prone to error. I would > suggest that if possible you embed the font (subset if required) in the PDF > file, its the only way to be certain that a PDF file will print correctly. > > > > Ken > _______________________________________________ gs-devel mailing list gs-devel@... http://www.ghostscript.com/mailman/listinfo/gs-devel |
|
|
|
|
|
|
|
|
Re: ArabicTransparent and ArabicTransparent-Bold Fonts> I can only use the PDF file you sent as a test and that only references one
> of the fonts, ArabicTransparent. However, if I add this to my cidfmap in > /gs/Resource/Init/cidfmap: > > /ArabicTransparent << /CSI [(Identity) 0] /Path (c:/temp/artro.ttf) > /SubfontID 0 /FileType /TrueType >> ; > > and then invoke GS using: > > gs -I/gs/Resource/Init;/gs/Resource arabic.pdf I apologize if I am being obtuse, but on my system I do not know how to get this to run like you did. First off, I don't have a gs, but gswin32 which I'm guessing is not a big deal, but most importantly I don't have an Init folder in my Resource folder in c:\program files\gs\gs8.63\bin. This is why I am wondering if my installation or something is not setup correctly? However, when I do run gswin32.exe c:\temp\arabic.pdf it loads the pdf if I use (Unicode) 1 but the text is still wrong...but when I modify cidfmap to be what have above (Identity) 0, it does not work at all and says: C: >>gswin32c.exe -dPrinted -dBATCH -dPDFFitPage -dUseCropBox -dNOPAUSE -dDITHERPPI=100 -sDEVICE=tiffg4 -r72x72 -sFONTPATH=C:/windows/fonts -sOutptFile="c:\temp\arabic1.tif" "C:\temp\arabic.pdf" GPL Ghostscript 8.63 (2008-08-01) Copyright (C) 2008 Artifex Software, Inc. All rights reserved. This software comes with NO WARRANTY: see the file PUBLIC for details. Processing pages 1 through 1. Page 1 Loading a TT font from c:/windows/fonts/artro.ttf to emulate a CID font ArabicTransparent ... Done. Can't build /Identity.Unicode /CIDDecoding resource. See gs_ciddc.ps . Error: /undefinedresource in findresource Since that displays, does that mean you can do my original command to convert it to a ccitt4 tiff file and it works too? > > The resulting file appears to be OK. At least, it contains Arabic text, > looks like 'Nastaliq' style cursive script, but has word spaces which I > thought was undesirable, but then I'm not an Arabic speaker (also the > resolution I'm using is rather low). Perhaps the spacing of the glyphs is > incorrect. > I may be able to send you the original document, but I need to clear that first. > NB I also needed to add this font to my fontmap.GS file, but from your > previous email this seems to have been done for you at install time, so if > you use the example above, and duplicate that line, with appropriate > substitutions, for the ArabicTransparent-Bold font, then the file should > work. > > Ken > > PS the lack of a ToUnicode CMap in the original PDF file will prevent > cut+paste from the file working correctly. > gs-devel mailing list gs-devel@... http://www.ghostscript.com/mailman/listinfo/gs-devel |
|
|
|
|
|
Re: ArabicTransparent and ArabicTransparent-Bold FontsKen / Ray,
You guys rock. I've got it working, but I did have to take a few steps to get it. I installed the latest gs8.70 on my machine via the EXE installer for windows. Straight out of the box, this did not work. I noticed that there was no cidfmap file in the lib directory. To correct this, I downloaded the sources and extracted the "gs" folder into gs8.70. After doing so, I had an gs8.70\gs folder that included a "Resources\Init". I tried setting the -l/gs/Resources/Init, but gswin32.exe did not recognize the -l switch. Next I tried to edit the cidfmap file in gs8.70\gs\lib but to no avail. I purposefully put a bad config in there and it didn't complain so I realized it wasn't picking it up. After that, I copied the cidfmap file into the gs8.70\lib directory, and voila...it's working now. I'm curious as to why the installer seems to suck so much or what I could have done to get it to work without having to go through all these steps, but it's working by using the (Identity) 0 CIS configuration. Many thanks to the both of you not only for the solution but for your quick responses to my problem. Levi _______________________________________________ gs-devel mailing list gs-devel@... http://www.ghostscript.com/mailman/listinfo/gs-devel |
|
|
|
| Free embeddable forum powered by Nabble | Forum Help |