Skip to content

[FR] Word-specific line breaks to allow fixed font sizes #486

@vonguced

Description

@vonguced

Hi

I want to have a specific font size for my poster text.
In the config I set the minPointSize and maxPointSize to the same number (180 in my case).
This works well, except for very long words (e.g. German movie titles) that no longer fit at this size.

I’d like to propose an option to define word-specific breakpoints so a uniform text size is still possible.

I achieved this in the old version 1.9.32 by adding the following to the configuration:

"PrerequisitePart": {
  ...
  "NewLineOnSpecificWords": "true",
    "NewLineWords": {
        "WEIHNACHTSGESCHICHTE": "WEIHNACHTS-\nGESCHICHTE",
        "SCHOKOLADENFABRIK": "SCHOKOLADEN-\nFABRIK",
        "FEUERZANGENBOWLE": "FEUERZANGEN-\nBOWLE",
        "AHNUNGSLOSIGKEIT": "AHNUNGS-\nLOSIGKEIT"
    },
  ...

And in your script I added

#Prerequisites Part
...
$NewLineOnSpecificWords = $config.PrerequisitePart.NewLineOnSpecificWords.toLower()
...

as well as adding below each symbol replacement loop the following:

# Loop through each symbol and replace it with a newline
if ($NewLineOnSpecificSymbols -eq 'true') {
...
}
# Loop through common break words and replace them
if ($NewLineOnSpecificWords -eq 'true' -and $NewLineWords -ne $null) {
  foreach ($word in $NewLineWords.PSObject.Properties) {
    $ShowjoinedTitle = $ShowjoinedTitle -replace $word.Name, $word.Value
  }
}

Would it be possible to support this as an official option? I could modify the config and postscript file but I am a bit lost to try and add this in the new WebUI?

Is this something others would find useful, or am I an edge case?

Thanks for your consideration.
Best regards

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions