microsoft / charticulator

Interactive Layout-Aware Construction of Bespoke Charts
Other
830 stars 115 forks source link

Normalise Font Sizes #607

Open PBI-David opened 3 years ago

PBI-David commented 3 years ago

Describe the bug Same font and size renders differently in Charticulator and PBI Desktop

To Reproduce Steps to reproduce the behavior:

  1. Create a table with Tahoma size 10 values in PBI
  2. Create a chart legend with Tahoma size 10 in Charticulator
  3. View side by side

Expected behavior Font sizes should be the same

Screenshots Both fonts below are Tahoma size 10 Example

Diagnostic information N/A

Additional context N/A

zBritva commented 3 years ago

https://github.com/microsoft/charticulator/issues/548

PBI-David commented 3 years ago

Thanks. Is this definitely a resize issue though as the charticulator visual was expanded to its maximum size and I would expect two identical fonts to render at the same size.

zBritva commented 3 years ago

Try to use workaround from https://github.com/microsoft/charticulator/issues/584#issuecomment-865801531 if chart size and visual size is same, font size should be identical.

PBI-David commented 3 years ago

I've uploaded a pbix so you can see they definitely render differently. Unless I'm misunderstanding, I don't think workaround in #584 applies as this is simply a legend and I would expect font sizes to be identical between the two.
Font.zip

zBritva commented 3 years ago

yes, I see. The problem is related to SVG scale. The core visual renders text in HTML, Charticulator uses SVG and renders text in SVG. On scale the SVG document, texts change scales too. The visual has wrong default scale.

PBI-David commented 3 years ago

Thanks. Is this something an end user can configure or is a code change required?

zBritva commented 3 years ago

Code changing is required.