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-family from title template always reverts to sans-serif #5572

Open
babudro opened this issue Jul 6, 2024 · 1 comment
Open

Font-family from title template always reverts to sans-serif #5572

babudro opened this issue Jul 6, 2024 · 1 comment
Assignees
Labels
💡 enhancement This issue describes an improvement, enhancement, or feature request for OpenShot 🐞 bug A bug, error, or breakage of any kind

Comments

@babudro
Copy link

babudro commented Jul 6, 2024

Describe the bug:
The font-family set in the SVG file of a title template is ignored and always set to sans-serif (DejaVu Sans in my case) when initially created. It can be edited, but initially is always set to the default sans-serif font.

I have tested the issue using DejaVu Serif, C059, EB Garamond, and Liberation Serif fonts. They all revert to DejaVu Sans the same way.

Issue #5115 also mentions the font being changed, but has more issues relating to font rendering (colour, stroke, etc.) and the comments went on tangents that do not apply in this case. So I am filing this issue to focus on the font-family not being preserved in several cases outlined below.

Steps to reproduce the behaviour:
The steps below demonstrate that when you create a new title or edit it, the font always reverts to the default sans-serif except when you explicitly choose an alternate font. In other words, an alternate font must be specified every time the title is created or edited.

  1. In Inkscape create a title template using something other than the default sans-serif font. Save it as ~/.openshot_qt/title_templates/font-test.svg.
  2. In OpenShot create new project and create a title using the font-test template. Just click on your template and click Save, leaving all values as they are.
  3. Place it on a track and observe that the font is shown as the default sans-serif rather than what was saved in the template.
  4. grep -oE "font-family:['a-zA-Z0-9 ]+" ~/.openshot_qt/title/TitleFileName*.svg
  5. You will see whatever your system's default sans-serif font is, in my case I see, font-family:'DejaVu Sans'; twice.
  6. grep -oE "font-family:['a-zA-Z0-9 ]+" ~/.openshot_qt/title_templates/font-test.svg and you will see font-family is defined as what you set it to in Inkscape. In my case I see font-family:C059 twice.
  7. Right-click on the title in Project Files -> Edit title -> Change Font -> set the font back to what was saved in Inkscape -> click Save.
  8. Confirm that the Video Preview shows the chosen font.
  9. grep -oE "font-family:['a-zA-Z0-9 ]+" ~/.openshot_qt/title/TitleFileName*.svg
  10. Confirm that you see the expected font name (not the default sans-serif).
  11. Right-click on the title in Project Files -> Edit title -> Change Font.
  12. Notice sans-serif is shown rather than the expected font.
  13. Click save and confirm that the title now displays in the default sans-serif in Video Preview.
  14. Right-click on the title in Project Files -> Edit title -> Change Font -> set the font back to what was saved in Inkscape -> click Save.
  15. Notice Video Preview again displays the expected font.
  16. Right-click on the title in Project Files -> Edit title -> Text Colour. Change text colour and save.
  17. Notice sans-serif is again shown rather than the expected font.

Expected behaviour:
The font saved in the title template, as well as the font chosen, should remain set instead of reverting back to sans-serif.

System Details:

Log Files:
If you are experiencing a crash, please collect and attach logs of the problem.
(it does not crash, but log is attached anyway)

openshot-qt.log

Exception / Stacktrace:
A message that might point to the issue that I saw when running the AppImage from the terminal was this:

Warning (in usvg::parser::svgtree:288): Failed to parse font-style value: 'Roman'.

Everything else was just INFO messages.

Thank you for your efforts.

@Colorjet3 Colorjet3 added 🐞 bug A bug, error, or breakage of any kind 💡 enhancement This issue describes an improvement, enhancement, or feature request for OpenShot labels Jul 8, 2024
@JamesRichards22
Copy link

This is a regression as it does not happen in the 3.1.1 Release, but it does happen with the 3.2.0 and 3.2.1 releases.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
💡 enhancement This issue describes an improvement, enhancement, or feature request for OpenShot 🐞 bug A bug, error, or breakage of any kind
Projects
None yet
Development

No branches or pull requests

4 participants