What metrics are using in Polotno?
By default Polotno is using CSS pixels
as units with 1pt = 1px
and 72dpi. Everything you see in the store
is in pixels
– width
, height
or fontSize
; Polotno will use these values in UI.
You can change units displayed in UI using setUnits
method.
How to display units in custom UI?
Also you can use special functions to convert units to pixels and back:
Exports and DPI
When you export your design into PDF, polotno
will use 72 PDI to determine the size of the exported pages. If you increase just the dpi
, it will not change quality of the exported PDF. It will just produce a PDF file with smaller page sizes. You have two options to increase quality of your exported designs:
Use high
pixelRatio
attribute when you do the export.store.saveAsPDF({ pixelRatio: 2})
Change DPI and change ALL pixels values in the store.