Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Font][Skinparam or Style] Issues on fall back font #1436

Open
The-Lum opened this issue May 26, 2023 · 5 comments
Open

[Font][Skinparam or Style] Issues on fall back font #1436

The-Lum opened this issue May 26, 2023 · 5 comments
Assignees
Labels
bug Something isn't working

Comments

@The-Lum
Copy link
Collaborator

The-Lum commented May 26, 2023

Hi PlantUML team,

(Observed on V1.2023.9beta1):
In order to make a sum-up about the fall-back fonts topic.

By skinparam

It seems there are some defects with skinparam:

Source

@startuml
skinparam DefaultFontName "Hack", "DejaVu Sans Mono", "Courier New", "Nimbus Mono L", "Monospaced", Courier, monospace

[Component\nABC]
frame "Frame" {
  card Card
}
@enduml

PNG: KO ❌

❌ KO: The font is not monospaced.

SVG: ~KO 🔶

✔️ The font is monospaced
🔶 but here is the not good (with ") SVG output:

<text fill="#000000" font-family="&quot;Hack&quot;, &quot;DejaVu Sans Mono&quot;, &quot;Courier New&quot;, Courier, monospace" font-size="14" font-weight="bold" lengthAdjust="spacing" textLength="50" x="155" y="20.9951">Frame</text>

See also similar/pseudo issues here:

By style

And a new question will be:

  • How to do the same thing with style?

Possible source proposal

@startuml
<style>
root {
  FontName "Hack", "DejaVu Sans Mono", "Courier New", "Nimbus Mono L", "Monospaced", Courier, monospace
}
</style>

[Component\nABC]
frame "Frame" {
  card Card
}
@enduml

Related issue or discussion

Ref.

Regards,
Th.

[FYI @bondden for the mono theme]

@arnaudroques arnaudroques self-assigned this May 28, 2023
@arnaudroques arnaudroques added bug Something isn't working and removed triage labels May 28, 2023
arnaudroques added a commit that referenced this issue May 31, 2023
@arnaudroques
Copy link
Contributor

Thank you for your tests!
This should be fixed in last snapshot and on the online server.
Tell us what you think about it!

@The-Lum
Copy link
Collaborator Author

The-Lum commented Jun 4, 2023

Hi @arnaudroques, and all,

This looks good (see next comment!) except for a difference on the SVG output (with or whitout simple quote) between:

skinparam

<text fill="#000000" font-family="'Hack', 'DejaVu Sans Mono', 'Courier New', 'Nimbus Mono L', 'Monospaced', Courier, monospace" font-size="14" font-weight="bold"
...

style

<text fill="#000000" font-family="Hack, DejaVu Sans Mono, Courier New, Nimbus Mono L, Monospaced, Courier, monospace" font-size="14" font-weight="bold"
...

I don't know if that has any bearing (about simple quote or not)...

Thanks for this fix.
We will be able to correct the mono theme...

Regards,
Th.

@The-Lum
Copy link
Collaborator Author

The-Lum commented Jun 4, 2023

Hi @arnaudroques, and PlantUML team,

After tests, here is a PNG non working example from:

Code

skinparam DefaultFontName "jlm_cmmi10"
Title Test: "jlm_cmmi10"

VS

skinparam DefaultFontName "NotExistingFont", "jlm_cmmi10"
Title Test: "NotExistingFont", "jlm_cmmi10"

PNG: OK with only 1 font ✔️

PNG: KO with 2 fonts ❌


  • Could you have a look?

Regards,
Th.

arnaudroques added a commit that referenced this issue Jun 27, 2023
@arnaudroques
Copy link
Contributor

We have fixed:

skinparam DefaultFontName "NotExistingFont", "jlm_cmmi10"
Title Test: "NotExistingFont", "jlm_cmmi10"

in last snapshot.

There must be other issues, but I think it would be better to open new issues and close this one (if you agree)

@The-Lum
Copy link
Collaborator Author

The-Lum commented Jun 27, 2023

Hi PlantUML team,

Yes of course...
You can close it and I can go to some new tests...

Regards,
Th.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants