Eskil

Diff
Login

Differences From Artifact [c0aa273e98]:

To Artifact [313ef3aae9]:


76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
        # Figure out font size from number of chars per line
        set charwidthHead [$pdf getCharWidth "0"]
        set charwidth [expr {$width / 2.0 / ($options(-cpl) + $options(-cpln) + 1)}]
        set fontsize [expr {$options(-headsize) * $charwidth / $charwidthHead}]
        $pdf setFont $fontsize

        # Text metrics
        set linesize  [expr {[$pdf getFontMetric height] * $options(-lnsp)}]
        set spacing [expr {$linesize / $fontsize}]
        $pdf setLineSpacing $spacing
        set offset    [expr {$fontsize + [$pdf getFontMetric bboxy]}]
        set charwidth [$pdf getCharWidth "0"]
        set nlinesf [expr {($height - $options(-headsize)) / $linesize}]
        # Number of lines per page
        set nlines  [expr {int($nlinesf - 1.0)}]







|







76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
        # Figure out font size from number of chars per line
        set charwidthHead [$pdf getCharWidth "0"]
        set charwidth [expr {$width / 2.0 / ($options(-cpl) + $options(-cpln) + 1)}]
        set fontsize [expr {$options(-headsize) * $charwidth / $charwidthHead}]
        $pdf setFont $fontsize

        # Text metrics
        set linesize  [expr {[$pdf getFontMetric "height"] * $options(-lnsp)}]
        set spacing [expr {$linesize / $fontsize}]
        $pdf setLineSpacing $spacing
        set offset    [expr {$fontsize + [$pdf getFontMetric bboxy]}]
        set charwidth [$pdf getCharWidth "0"]
        set nlinesf [expr {($height - $options(-headsize)) / $linesize}]
        # Number of lines per page
        set nlines  [expr {int($nlinesf - 1.0)}]