jgraph / drawio-desktop

Official electron build of draw.io
https://www.diagrams.net
Apache License 2.0
50.37k stars 5k forks source link

Font Size defaults to 12 pt in Mac OS despite configuration #1564

Closed sivaswami closed 9 months ago

sivaswami commented 9 months ago

Preflight Checklist

You must agree to search and the code of conduct. You must fill in this entire template. If you delete part/all or miss parts out your issue will be closed.

Describe the bug A clear and concise description of what the bug is. I use the below entry inside Configuration for my default vertex configuration. I set my fontsize as "15", but the default node is coming with Node size "12 pt". What is the difference btw "Set Default Style" option and the "defaultVertexStyle" configuration ? I believe "set default style" is for a particular session and defaultVertexStyle is for persistence of style across multiple sessions. Please confirm ?

To Reproduce Steps to reproduce the behavior:

  1. Go to '...'

  2. Click on '....'

  3. Scroll down to '....'

  4. See error

  5. Go to configuration

  6. Add the below entry as part of configuration (only part of configuration is pasted below)

    "defaultVertexStyle": { "rounded": "1", "arcSize": "50", "align": "center", "html": "1", "fontSize": 15, "fontFamily": "Pangolin", "fontStyle": 1, "fontSource": "https://fonts.googleapis.com/css?family=Pangolin&display=swap", "fillColor": "#E8EAF6", "fontColor": "#000000", "strokeColor": "#0A1172", "sketch": "1", "curveFitting": "1", "jiggle": "2", "fillStyle": "solid", "strokeWidth": "3", "whiteSpace": "wrap" }

  7. Apply configuration and restart Draw.io

  8. Create a new node.

  9. The new vertex style will not match "Configured" vertex style.

Expected behavior A clear and concise description of what you expected to happen.

The startup vertex style to match entry in the Persisted configuration rather than "set default style" option.

Screenshots If applicable, add screenshots to help explain your problem.

draw.io version (In the Help->About menu of the draw.io editor):

Desktop (please complete the following information):

Additional context Add any other context about the problem here.

m-mohamedin commented 9 months ago

Screenshot 2024-01-03 at 4 15 22 PM Unfortunately, we cannot reproduce. Please send us the full configuration and steps to reproduce

sivaswami commented 9 months ago

Full configuration: https://gist.github.com/sivaswami/e706a926de8db30fae7a121c323486ec

Reproducing steps

  1. I created a new vertex with size 12 font and some colors.
  2. set this shape as default shape (cmd + shift + D)
  3. Update the configuration with my configuration (15 pt default size).
  4. close the drawio window
  5. Open a new instance
  6. Create a vertex/node( Press D shortcut). it defaults to 12 font and not 15 font
  7. But if I create a new vertex using copy on connect (drag the connector), it is creating vertex with 15 pt font(works as expected). Hope this clarifies. Let me know if you need additional details
m-mohamedin commented 9 months ago

Thanks for the file and detailed steps.

Unfortunately, we still cannot reproduce. Once the instance is closed, the default style is cleared even if the file is saved.

sivaswami commented 9 months ago
image
sivaswami commented 9 months ago

This is what I see. After starting the draw.io, even if my configuration contained font size as "15pt", I see it defaults to "12"

sivaswami commented 9 months ago

This issue happens in sketch theme. I tried the same with other theme, works fine.

m-mohamedin commented 9 months ago

Thanks for the detailed info, we managed to reproduce and the issue will be fixed in the next release Thanks for the report

davidjgraph commented 9 months ago

In desktop release 22.1.18

sivaswami commented 9 months ago

Thanks. Verified the fix. working