Skip to content

Set scale factor

The current code allows updating directly the 'scale_factor' property. This behavior is not the safest and the only check for it occurs only when the DsiUnit.to_latex() is called (raising an error).

Instead, the following changes should be implemented:

  • The attribute scale_factor should be protected and not public.
  • DsiUnit should contain a method set_scale_factor() that allows updating the scale factor, raising an error if the factor is not valid.
  • Clear any warning/error related to the old behavior within any of the methods to_latex, to_utf8, to_sirp.