Follow-up Comment #1, bug #68828 (group groff):

This commit is cued up on my development branch awaiting end of code freeze:-

commit f9103676171feb189e48cb0ba6c115a17ac3096e
Author: Deri James <[email protected]>
Date:   Sat Oct 24 20:20:18 2026 +0100

    [gropdf]: Fix errors in units conversion to points.
    
    * src/devices/gropdf/gropdf.pl (ToPoints): Do correct conversion
    for 'm' (ems) and 'P' picas.
    (GetPoints): correct list of units accepted.
    
    Fix for <https://savannah.gnu.org/bugs/index.php?68828>.

diff --git a/src/devices/gropdf/gropdf.pl b/src/devices/gropdf/gropdf.pl
index 9194c8bd3..444caea97 100644
--- a/src/devices/gropdf/gropdf.pl
+++ b/src/devices/gropdf/gropdf.pl
@@ -1171,9 +1171,9 @@ sub ToPoints
     {
        return int($num*72/2.54);
     }
-    elsif ($unit eq 'm')       # millimetres
+    elsif ($unit eq 'm')       # ems
     {
-       return int($num*72/25.4);
+       return $num*$cftsz;
     }
     elsif ($unit eq 'p')
     {
@@ -1181,7 +1181,7 @@ sub ToPoints
     }
     elsif ($unit eq 'P')
     {
-       return($num*6);
+       return($num*12);
     }
     elsif ($unit eq 'z')
     {
@@ -2356,7 +2356,7 @@ sub GetPoints
 {
     my $val=shift;
 
-    $val=ToPoints($1,$2) if ($val and $val=~m/(-?[\d.]+)([cipnz])/);
+    $val=ToPoints($1,$2) if ($val and $val=~m/(-?[\d.]+)([cipPmz])/);
 
     return $val;
 }




    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?68828>

_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/

Attachment: signature.asc
Description: PGP signature

Reply via email to