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

Added monochrome monospaced theme for better shapes control #1424

Merged
merged 1 commit into from
May 11, 2023

Conversation

bondden
Copy link
Contributor

@bondden bondden commented May 11, 2023

This is a plain-styled theme with some features:

  1. Monospaced fonts bring additional control on diagram layout and shapes widths
  2. Some additional styling for Gantt

@arnaudroques arnaudroques merged commit 3b3ab39 into plantuml:master May 11, 2023
10 checks passed
Comment on lines +11 to +13
!if %not(%variable_exists("$CLR_BG"))
!$CLR_BG = "white"
!endif
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @bondden, and all,

Here is a general remark.

The short names are good ($CLR_BG VS $BGCOLOR VS $PUML_BGCOLOR), ...
But it is not share with all theme!

Also @bondden:

  • Perhaps don't use short name for external variable,
    only in a pinch for internal variable...

@ALL:
-> But which convention use between: $BGCOLOR VS $PUML_BGCOLOR...

@plantuml team, or any contributor:

  • Make an inventory of the variable named management on all the current themes...
  • Maybe a best practices guide should be created to help the developer to create new themes...

Regards.
Th.

Comment on lines +51 to +72
' Basic font
!ifndef $FNT

' Multiple fallback fonts defined
!$FNT_MONO = "Courier"
!$FNT_MONO = "Courier New"
!$FNT = "DejaVu Sans Mono"
!$FNT = "monospace"
!$FNT = "Rec Mono Linear"

' The preferred theme font
!$FNT = "Hack"

!endif

' Monospaced font
!ifndef $FNT_MONO

' A different font can be used
' !$FNT_MONO = "Rec Mono Semicasual"
!$FNT_MONO = $FNT
!endif
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi all,

From this part of code and from this example (tested on V1.2023.8beta1):

@startuml
title Test of the 'mono' theme

!theme mono

package "Some Group" {
  HTTP - [First Component]
  [Another Component]
}

node "Other Groups" {
  FTP - [Second Component]
  [First Component] --> FTP
}

cloud {
  [Example 1]
}

[Another Component] --> [Example 1]
@enduml

Is seems that fall-back-fonts is not so good used...

  • Could you also manage font if Hack font is not installed on the hosted PlantUML?

Perhaps could you add a line like:

skinparam DefaultFontName ..., ..., ..., ...

But @arnaudroques, @plantuml team:

  • What is the best syntax?
  • It seems there are some issues...

KO with those lines

skinparam DefaultFontName Hack, DejaVu Sans Mono, Courier, monospaced

or

skinparam DefaultFontName "Hack", "DejaVu Sans Mono", "Courier", "monospaced"

Ref.

Issues


Regards.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants