Skip to content

Wrong font size for dymo labels #316

@MarcelVincourt

Description

@MarcelVincourt

Hello,

I have been trying to convert my dymo .label files to glabels however I found that the scaling of the font size is incorrect. For example Arial with size 24 was to large compared to what Dymo label software made. (I also tested printing it in libreoffice writer and that had the same size as Dymo label software).

Eventually I found that changing the virtual_dpi in ModelTextObject.ccp fixed the issue. Below you see the function I changed. Originally the value of virtual_dpi is 96 but changing it to 72 fixed the issue.

        ///
        /// Calculate pixel size
        ///
        /// Assume a virtual DPI of 96 pixels/inch for all QPainter contexts.
        /// Ideally, we should use pointSizes for device independence, but as
        /// Qt-6.4 on X11, Wayland, and MacOS this approach has better results.
        ///
        int pixelSize( double pointSize )
        {
                const double virtual_dpi = 72;
                return qMax( 1, qRound( pointSize * virtual_dpi/72.0 ) );
        }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions