about summary refs log tree commit diff
path: root/generator
diff options
context:
space:
mode:
authorgiraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8>2023-02-18 02:07:38 +0000
committergiraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8>2023-02-18 02:07:38 +0000
commit3ac3b9ad7a48429c3e9e63e4eda9541ae48a0069 (patch)
treea84d9676ad964bcacfbcae86533384a76ea64b1f /generator
parent1a3b50a3430b783acce07cf369cd0e61e50608c9 (diff)
downloadnetpbm-mirror-3ac3b9ad7a48429c3e9e63e4eda9541ae48a0069.tar.gz
netpbm-mirror-3ac3b9ad7a48429c3e9e63e4eda9541ae48a0069.tar.xz
netpbm-mirror-3ac3b9ad7a48429c3e9e63e4eda9541ae48a0069.zip
Add comments about Postscript maximum line length
git-svn-id: http://svn.code.sf.net/p/netpbm/code/trunk@4497 9d0c8265-081b-0410-96cb-a4ca84ce46f8
Diffstat (limited to 'generator')
-rw-r--r--generator/pbmtextps.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/generator/pbmtextps.c b/generator/pbmtextps.c
index 507ae760..46d53ac6 100644
--- a/generator/pbmtextps.c
+++ b/generator/pbmtextps.c
@@ -391,6 +391,11 @@ buildTextFromArgs(int           const argc,
    Postscript control characters in it; and 2) the command line might have
    text in 8-bit or multibyte code, but a Postscript program is supposed to be
    entirely printable ASCII characters.
+
+   Official Postscript specifications have a limit on the length of a program
+   line, which means there is a limit on the length of text string such as we
+   generate.  But we don't worry about that because Ghostscript actually
+   accepts very long program lines.
 -----------------------------------------------------------------------------*/
     const char * text;
         /* All the arguments ('argv') concatenated */
@@ -702,6 +707,13 @@ postscriptProgram(struct CmdlineInfo const cmdline) {
     const char * retval;
     const char * psVariable;
 
+    /* According to Adobe, maximum line length in a Postscript program is
+       255 characters excluding the newline.  The following may generated a
+       line longer than that if 'cmdline.text' or 'cmdline.font' is long.
+       However, Ghostscript accepts much longer lines, so we don't worry
+       about that.
+    */
+
     pm_asprintf(&psVariable, psTemplate, cmdline.font,
                 cmdline.fontsize, cmdline.stroke, cmdline.text,
                 cmdline.ascent, cmdline.descent,