[gimp-help/gimp-help-2-10] Improve Quickreference SVG and PDF output



commit e75208d3a450397f6db352e31e01500959857136
Author: Jacob Boerema <jgboerema gmail com>
Date:   Tue Jul 19 18:11:40 2022 -0400

    Improve Quickreference SVG and PDF output
    
    On languages like Polish part of the title was overlapping Wilber and
    there were also two lines in the first column cut off.
    
    This is an extension of what was suggested in MR !69 by Anders Jonsson.
    
    The Bitstream Vera Sans font is also less portable, so we default to
    DejaVu Sans and define a few substitues because Pango was giving out
    warnings for me on Windows.
    
    Two make overlapping or cut-off text less likely we:
    - Reduce the title font size a little bit
    - Reduce the action font size a little bit
    - Reduce the size of the left margin
    - Enlarge the width of the columns
    
    Also update the inkscape version in the metadata so Inkscape won't
    complain about needing conversion when opening our svg.

 quickreference/stylesheets/keys-svg.xsl   | 26 +++++++++++------------
 quickreference/templates/svg_template.xml | 34 +++++++++++++++----------------
 quickreference/templates/wilber.svg       |  2 +-
 3 files changed, 31 insertions(+), 31 deletions(-)
---
diff --git a/quickreference/stylesheets/keys-svg.xsl b/quickreference/stylesheets/keys-svg.xsl
index e63ce1c2c..016d0b723 100644
--- a/quickreference/stylesheets/keys-svg.xsl
+++ b/quickreference/stylesheets/keys-svg.xsl
@@ -18,7 +18,7 @@
 <xsl:output method="xml" encoding="utf-8" indent="no"/>
 
 <xsl:variable name="style-section"
-    select="'fill:black;fill-opacity:1;stroke:none;font-family:Bitstream Vera 
Sans;font-style:normal;font-weight:bold;font-size:16;text-anchor:start;writing-mode:lr;letter-spacing:-2;'"/>
+    select="'fill:black;fill-opacity:1;stroke:none;font-family:DejaVu Sans,Bitstream Vera 
Sans,Verdana,sans-serif;font-style:normal;font-weight:bold;font-size:16;text-anchor:start;writing-mode:lr;letter-spacing:-2;'"/>
 <xsl:variable name="space-section" select="28"/>
 <xsl:variable name="skip-section-title" select="21"/>
 <xsl:variable name="skip-section-content" select="25"/>
@@ -26,7 +26,7 @@
 <xsl:variable name="space-group" select="3"/>
 <xsl:variable name="skip-group-content" select="1.5"/>
 
-<xsl:variable name="style-title" select="'fill:black;fill-opacity:1;stroke:none;font-family:Bitstream Vera 
Sans;font-style:oblique;font-weight:bold;font-size:7.4;text-anchor:start;writing-mode:lr;letter-spacing:-0.2;'"/>
+<xsl:variable name="style-title" select="'fill:black;fill-opacity:1;stroke:none;font-family:DejaVu 
Sans,Bitstream Vera 
Sans,Verdana,sans-serif;font-style:oblique;font-weight:bold;font-size:7.4;text-anchor:start;writing-mode:lr;letter-spacing:-0.2;'"/>
 <xsl:variable name="space-title" select="7"/>
 <xsl:variable name="skip-title-content" select="5"/>
 
@@ -38,16 +38,16 @@
 <xsl:variable name="skip-mouse-content" select="1.5"/>
 <xsl:variable name="skip-mouse-action" select="5"/> <!-- from mouse-content -->
 
-<xsl:variable name="style-note" select="'fill:black;fill-opacity:1;stroke:none;font-family:Bitstream Vera 
Sans;font-style:normal;font-weight:normal;font-size:3;text-anchor:start;writing-mode:lr;letter-spacing:0;'"/>
+<xsl:variable name="style-note" select="'fill:black;fill-opacity:1;stroke:none;font-family:DejaVu 
Sans,Bitstream Vera 
Sans,Verdana,sans-serif;font-style:normal;font-weight:normal;font-size:3;text-anchor:start;writing-mode:lr;letter-spacing:0;'"/>
 <xsl:variable name="space-note" select="4"/>
 <xsl:variable name="skip-note-content" select="3"/>
 
-<xsl:variable name="style-letterkey" select="'fill:black;fill-opacity:1;stroke:none;font-family:Bitstream 
Vera Sans;font-style:normal;font-weight:normal;font-size:4.4;text-anchor:start;writing-mode:lr;'"/>
-<xsl:variable name="style-keyf" select="'fill:black;fill-opacity:1;stroke:none;font-family:Bitstream Vera 
Sans;font-style:normal;font-weight:normal;font-size:3.3;text-anchor:start;writing-mode:lr;letter-spacing:-0.4;'"/>
-<xsl:variable name="style-keymisc" select="'fill:black;fill-opacity:1;stroke:none;font-family:Bitstream Vera 
Sans;font-style:normal;font-weight:normal;font-size:3.4;text-anchor:start;writing-mode:lr;letter-spacing:-0.2;'"/>
-<xsl:variable name="style-action" select="'fill:black;fill-opacity:1;stroke:none;font-family:Bitstream Vera 
Sans;font-style:normal;font-weight:normal;font-size:6.4;text-anchor:start;writing-mode:lr;letter-spacing:-0.4;'"/>
+<xsl:variable name="style-letterkey" select="'fill:black;fill-opacity:1;stroke:none;font-family:DejaVu 
Sans,Bitstream Vera 
Sans,Verdana,sans-serif;font-style:normal;font-weight:normal;font-size:4.4;text-anchor:start;writing-mode:lr;'"/>
+<xsl:variable name="style-keyf" select="'fill:black;fill-opacity:1;stroke:none;font-family:DejaVu 
Sans,Bitstream Vera 
Sans,Verdana,sans-serif;font-style:normal;font-weight:normal;font-size:3.3;text-anchor:start;writing-mode:lr;letter-spacing:-0.4;'"/>
+<xsl:variable name="style-keymisc" select="'fill:black;fill-opacity:1;stroke:none;font-family:DejaVu 
Sans,Bitstream Vera 
Sans,Verdana,sans-serif;font-style:normal;font-weight:normal;font-size:3.4;text-anchor:start;writing-mode:lr;letter-spacing:-0.2;'"/>
+<xsl:variable name="style-action" select="'fill:black;fill-opacity:1;stroke:none;font-family:DejaVu 
Sans,Bitstream Vera 
Sans,Verdana,sans-serif;font-style:normal;font-weight:normal;font-size:6;text-anchor:start;writing-mode:lr;letter-spacing:-0.4;'"/>
 
-<xsl:variable name="section-width" select="215"/>
+<xsl:variable name="section-width" select="240"/>
 <xsl:variable name="section-hskip" select="2"/>
 <xsl:variable name="note-hskip" select="6"/>
 
@@ -85,7 +85,7 @@
         height="1200"
         id="svg559"
         sodipodi:version="0.32"
-        inkscape:version="0.37cvs"
+        inkscape:version="1.1"
         sodipodi:docname="keys-sample.svg"
         xmlns="http://www.w3.org/2000/svg";
         xmlns:svg="http://www.w3.org/2000/svg";
@@ -113,8 +113,8 @@
 
         <!-- GIMP Quickreference title -->
         <text id="quickreference_title"
-            style="font-size: 43px;"
-            x="94"
+            style="font-size: 42px;"
+            x="50"
             y="82">
             <tspan>
                 <xsl:value-of select="//k:root/k:title" />
@@ -125,13 +125,13 @@
         <g
             id="wilber"
             inkscape:label="wilber reading"
-            transform="matrix(2.5822219,0,0,2.5822219,622.45494,24.994751)">
+            transform="matrix(2.5822219,0,0,2.5822219,850.0,25.0)">
             <xsl:copy-of select="$wilber" />
         </g>
 
         <!-- Reference -->
         <g id="outer_group"
-            transform="matrix(1.24, 0, 0, 1.24, 91.82, 136.99)">
+            transform="matrix(1.24, 0, 0, 1.24, 50.0, 136.99)">
             <xsl:apply-templates/>
         </g>
     </svg>
diff --git a/quickreference/templates/svg_template.xml b/quickreference/templates/svg_template.xml
index a48e35c96..93e19fd6d 100644
--- a/quickreference/templates/svg_template.xml
+++ b/quickreference/templates/svg_template.xml
@@ -142,7 +142,7 @@
             transform="matrix(0.886947,0.000000,0.000000,0.886947,0.279045,1.170720)" />
         <text
             xml:space="preserve"
-            style="font-size:1.2;font-weight:normal;stroke-width:1pt;font-family:Bitstream Vera Sans;"
+            style="font-size:1.2;font-weight:normal;stroke-width:1pt;font-family:DejaVu Sans,Bitstream Vera 
Sans,Verdana,sans-serif;"
             x="0.44536325"
             y="0.10000575"
             id="text743"
@@ -185,7 +185,7 @@
             sodipodi:nodetypes="cccc" />
         <text
             xml:space="preserve"
-            style="font-size:1.2;font-weight:normal;stroke-width:1pt;font-family:Bitstream Vera Sans;"
+            style="font-size:1.2;font-weight:normal;stroke-width:1pt;font-family:DejaVu Sans,Bitstream Vera 
Sans,Verdana,sans-serif;"
             x="2.55886233"
             y="1.00883842"
             id="text750"
@@ -209,7 +209,7 @@
             id="path757" />
         <text
             xml:space="preserve"
-            style="font-size:1.3;font-weight:normal;stroke-width:1pt;font-family:Bitstream Vera Sans;"
+            style="font-size:1.3;font-weight:normal;stroke-width:1pt;font-family:DejaVu Sans,Bitstream Vera 
Sans,Verdana,sans-serif;"
             x="1.24093144"
             y="1.00938547"
             id="text765"
@@ -249,7 +249,7 @@
             sodipodi:nodetypes="cccc" />
         <text
             xml:space="preserve"
-            style="font-size:1.2;font-weight:normal;stroke-width:1pt;font-family:Bitstream Vera Sans;"
+            style="font-size:1.2;font-weight:normal;stroke-width:1pt;font-family:DejaVu Sans,Bitstream Vera 
Sans,Verdana,sans-serif;"
             x="3.72539061"
             y="0.98140591"
             id="text768"
@@ -278,7 +278,7 @@
             id="path775" />
         <text
             xml:space="preserve"
-            style="font-size:1.2;font-weight:normal;stroke-width:1pt;font-family:Bitstream Vera Sans;"
+            style="font-size:1.2;font-weight:normal;stroke-width:1pt;font-family:DejaVu Sans,Bitstream Vera 
Sans,Verdana,sans-serif;"
             x="2.13629596"
             y="0.99347234"
             id="text780"
@@ -322,7 +322,7 @@
             sodipodi:nodetypes="cccc" />
         <text
             xml:space="preserve"
-            style="font-size:1.2;font-weight:normal;stroke-width:1pt;font-family:Bitstream Vera Sans;"
+            style="font-size:1.2;font-weight:normal;stroke-width:1pt;font-family:DejaVu Sans,Bitstream Vera 
Sans,Verdana,sans-serif;"
             x="0.49732296"
             y="0.95831662"
             id="text783"
@@ -357,7 +357,7 @@
             sodipodi:nodetypes="cc" />
         <text
             xml:space="preserve"
-            style="font-size:1.2;font-weight:normal;stroke-width:1pt;font-family:Bitstream Vera Sans;"
+            style="font-size:1.2;font-weight:normal;stroke-width:1pt;font-family:DejaVu Sans,Bitstream Vera 
Sans,Verdana,sans-serif;"
             x="0.97063343"
             y="0.96223223"
             id="text794"
@@ -447,7 +447,7 @@
             y="0.77243602"
             ry="0.38310501" />
         <text
-            style="fill:black;stroke:none;font-family:Bitstream Vera 
Sans;font-style:oblique;font-weight:normal;font-size:4;fill-opacity:1;stroke-opacity:1;stroke-width:1pt;stroke-linejoin:miter;stroke-linecap:butt;text-anchor:start;writing-mode:lr;"
+            style="fill:black;stroke:none;font-family:DejaVu Sans,Bitstream Vera 
Sans,Verdana,sans-serif;font-style:oblique;font-weight:normal;font-size:4;fill-opacity:1;stroke-opacity:1;stroke-width:1pt;stroke-linejoin:miter;stroke-linecap:butt;text-anchor:start;writing-mode:lr;"
             x="1.37996908"
             y="4.35733509"
             id="text685"
@@ -476,7 +476,7 @@
             y="0.77"
             ry="0.38310501" />
         <text
-            style="fill:black;stroke:none;font-family:Bitstream Vera 
Sans;font-style:oblique;font-weight:normal;font-size:4;fill-opacity:1;stroke-opacity:1;stroke-width:1pt;stroke-linejoin:miter;stroke-linecap:butt;text-anchor:start;writing-mode:lr;"
+            style="fill:black;stroke:none;font-family:DejaVu Sans,Bitstream Vera 
Sans,Verdana,sans-serif;font-style:oblique;font-weight:normal;font-size:4;fill-opacity:1;stroke-opacity:1;stroke-width:1pt;stroke-linejoin:miter;stroke-linecap:butt;text-anchor:start;writing-mode:lr;"
             x="1.3"
             y="4.35733509"
             id="text697"
@@ -505,7 +505,7 @@
             y="0.77"
             ry="0.38310501" />
         <text
-            style="fill:black;stroke:none;font-family:Bitstream Vera 
Sans;font-style:oblique;font-weight:normal;font-size:4;fill-opacity:1;stroke-opacity:1;stroke-width:1pt;stroke-linejoin:miter;stroke-linecap:butt;text-anchor:start;writing-mode:lr;"
+            style="fill:black;stroke:none;font-family:DejaVu Sans,Bitstream Vera 
Sans,Verdana,sans-serif;font-style:oblique;font-weight:normal;font-size:4;fill-opacity:1;stroke-opacity:1;stroke-width:1pt;stroke-linejoin:miter;stroke-linecap:butt;text-anchor:start;writing-mode:lr;"
             x="1.3"
             y="4.35733509"
             id="text705"
@@ -519,7 +519,7 @@
     <g
         id="left">
         <text
-            style="fill:black;stroke:none;font-family:Bitstream Vera 
Sans;font-style:oblique;font-weight:normal;font-size:4;fill-opacity:1;stroke-opacity:1;stroke-width:1pt;stroke-linejoin:miter;stroke-linecap:butt;text-anchor:start;writing-mode:lr;letter-spacing:-0.3;"
+            style="fill:black;stroke:none;font-family:DejaVu Sans,Bitstream Vera 
Sans,Verdana,sans-serif;font-style:oblique;font-weight:normal;font-size:4;fill-opacity:1;stroke-opacity:1;stroke-width:1pt;stroke-linejoin:miter;stroke-linecap:butt;text-anchor:start;writing-mode:lr;letter-spacing:-0.3;"
             x="1.3"
             y="4.35733509"
             sodipodi:linespacing="100%"><tspan
@@ -532,7 +532,7 @@
     <g
         id="right">
         <text
-            style="fill:black;stroke:none;font-family:Bitstream Vera 
Sans;font-style:oblique;font-weight:normal;font-size:4;fill-opacity:1;stroke-opacity:1;stroke-width:1pt;stroke-linejoin:miter;stroke-linecap:butt;text-anchor:start;writing-mode:lr;letter-spacing:-0.3;"
+            style="fill:black;stroke:none;font-family:DejaVu Sans,Bitstream Vera 
Sans,Verdana,sans-serif;font-style:oblique;font-weight:normal;font-size:4;fill-opacity:1;stroke-opacity:1;stroke-width:1pt;stroke-linejoin:miter;stroke-linecap:butt;text-anchor:start;writing-mode:lr;letter-spacing:-0.3;"
             x="1.3"
             y="4.35733509"
             sodipodi:linespacing="100%"><tspan
@@ -671,7 +671,7 @@
             rx="0.17729682" />
         <text
             xml:space="preserve"
-            style="font-size:1.2;font-weight:normal;stroke-width:1pt;font-family:Bitstream Vera Sans;"
+            style="font-size:1.2;font-weight:normal;stroke-width:1pt;font-family:DejaVu Sans,Bitstream Vera 
Sans,Verdana,sans-serif;"
             x="2.21508991"
             y="6.47878742"
             id="text796"
@@ -754,7 +754,7 @@
             sodipodi:nodetypes="cccc" />
         <text
             xml:space="preserve"
-            style="font-size:1.2;font-weight:normal;stroke-width:1pt;font-family:Bitstream Vera Sans;"
+            style="font-size:1.2;font-weight:normal;stroke-width:1pt;font-family:DejaVu Sans,Bitstream Vera 
Sans,Verdana,sans-serif;"
             x="1.82973492"
             y="6.29683936"
             id="text827"
@@ -796,7 +796,7 @@
             sodipodi:nodetypes="cccc" />
         <text
             xml:space="preserve"
-            style="font-size:1.2;font-weight:normal;stroke-width:1pt;font-family:Bitstream Vera Sans;"
+            style="font-size:1.2;font-weight:normal;stroke-width:1pt;font-family:DejaVu Sans,Bitstream Vera 
Sans,Verdana,sans-serif;"
             x="1.04129975"
             y="6.29683924"
             id="text843"
@@ -841,7 +841,7 @@
             sodipodi:nodetypes="cccc" />
         <text
             xml:space="preserve"
-            style="font-size:1.2000000;font-weight:normal;stroke-width:1.0000000pt;font-family:Bitstream 
Vera Sans;"
+            style="font-size:1.2000000;font-weight:normal;stroke-width:1.0000000pt;font-family:DejaVu 
Sans,Bitstream Vera Sans,Verdana,sans-serif;"
             x="1.0412997"
             y="6.2968392"
             id="text4612"
@@ -884,7 +884,7 @@
             sodipodi:nodetypes="cccc" />
         <text
             xml:space="preserve"
-            style="font-size:1.2000000;font-weight:normal;stroke-width:1.0000000pt;font-family:Bitstream 
Vera Sans;"
+            style="font-size:1.2000000;font-weight:normal;stroke-width:1.0000000pt;font-family:DejaVu 
Sans,Bitstream Vera Sans,Verdana,sans-serif;"
             x="1.0412997"
             y="6.2968392"
             id="text4602"
diff --git a/quickreference/templates/wilber.svg b/quickreference/templates/wilber.svg
index 04fe69c2f..248a66310 100644
--- a/quickreference/templates/wilber.svg
+++ b/quickreference/templates/wilber.svg
@@ -725,7 +725,7 @@
   </g>
   <text
      xml:space="preserve"
-     
style="font-size:4.0671401px;font-style:normal;font-weight:normal;writing-mode:lr-tb;fill:#eeeeec;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream
 Vera Sans;opacity:0.52409639"
+     
style="font-size:4.0671401px;font-style:normal;font-weight:normal;writing-mode:lr-tb;fill:#eeeeec;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:DejaVu
 Sans,Bitstream Vera Sans,Verdana,sans-serif;opacity:0.52409639"
      x="12.570449"
      y="27.987329"
      id="text5528"><tspan


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