bug-groff
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug #51568] gropdf: Bug when string '\e014' is in the input


From: Deri James
Subject: [bug #51568] gropdf: Bug when string '\e014' is in the input
Date: Tue, 25 Jul 2017 08:03:44 -0400 (EDT)
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Firefox/52.0

Follow-up Comment #2, bug #51568 (project groff):

Looking inside the pdf (groff -Tpdf -P-d test | less) I see:-

0.000 Tw [(Octal character code "\014" for a form feed.  Alternati)] TJ

So gropdf has passed through the text "as is". The PDF Reference says:-

=================================================================

The \ddd escape sequence provides a way to represent characters outside the
printable ASCII character set. For example:

  (This string contains \245two octal characters\307.)

The number ddd may consist of one, two, or three octal digits, with high-order
overflow ignored. It is required that three octal digits be used, with leading
zeros as needed, if the next character of the string is also a digit. For
example, the literal
  
  (\0053)

denotes a string containing two characters, \005 (Control-E) followed by the
digit 3, whereas both

  (\053)

and

  (\53)

denote strings containing the single character \053, a plus sign 

  (+)

=================================================================

So it is the viewer which must interpret the string as a reference into the
font, 12 has no glyph attached so nothing is printed.

If you change to "\e104" in the test file you will see "D".

The gap after "Alternati" is because gropdf has calculated the string length
from the four characters which make up the string but the viewer is displaying
nothing for it.

If I manually change in the pdf to "\\014" it goes back to looking normal. So
I suspect the fix is to look for the pattern \\(\d{1,3}) (AFTER gropdf has
calculated the string length) and prefix with a '\'.

I will prepare a patch.

    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?51568>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]