• Craig Watson's avatar
    Adjust text item size upon loading to account for platform-to-platform variability · ae380e4e
    Craig Watson authored
    The same font, in the same point size, can be displayed differently
    depending on platform (this is a Qt limitation). This can lead to text
    items being the wrong size when importing a document created on a
    different computer.
    
    As a workaround, when saving a text item to SVG, the size of 1pt in
    pixels is calculated and saved. Upon loading, this value is calculated
    again and, if it is different from the saved value, the text item is
    scaled accordingly.
    
    Thus, any document created from this version onward will have
    correctly-scaled text boxes. If an old document (not containing a
    pixel-per-point attribute for text items) is loaded, the scene is marked
    as modified to make sure that all text items are then saved with the
    pixels-per-point value (even if the document is not edited). This allows
    old documents to be "fixed" by simply opening them once from a new
    version of OpenBoard.
    
    save text item font size in pixels, and scale it on load
    
    fixed loading of text item pixel height
    
    Save and load pixels-per-point rather than text pixel height
    
    Upon loading a text item from SVG, make sure that it will be saved with a pixel-per-point value
    ae380e4e
UBSvgSubsetAdaptor.h 9.19 KB