Skip to content

Extend QtTextReader for styled, animatable text clips - #1131

Merged
jonoomph merged 8 commits into
developfrom
easy-text
Oct 22, 2026
Merged

jonoomph merged 8 commits into
developfrom
easy-text

Conversation

@jonoomph

@jonoomph jonoomph commented Oct 20, 2026 •

Copy link
Copy Markdown
Member

Extends the existing QtTextReader for openshot-qt's new quick-text workflow (easy-text): OpenShot/openshot-qt#6215

  • Opt-in document layout with padding, outline, border and box styling (existing readers are unchanged)
  • Keyframeable style colors and widths that follow project frames
  • Cached rendering; HiDPI-correct preview scaling
  • Clip can now load a QtTextReader from JSON

jonoomph and others added 3 commits October 19, 2026 12:35
Clip JSON can now load a pathless QtTextReader. The reader supports
document layout, padding, stroke, border and per-clip style curves.
For SCALE_NONE clips it rasterizes at the preview-to-project ratio, as
QtImageReader does, so text keeps its project size in a resized preview
instead of being drawn at full project pixels.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Read fps from JSON instead of assuming 30 fps, so animated text style
  curves line up with project frames at 24/60 fps.
- Populate reader info without rendering; constructors no longer draw a
  throwaway image.
- Cache the last few animated style renders (bounded by count and bytes),
  so out-of-order frame requests do not re-render.
- Re-render on background color changes only while open.
- Tests for fps-correct animation, info without rendering, and cache reuse.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Qt's offscreen platform only reads fonts from <Qt>/lib/fonts on Windows,
which Qt no longer ships, so text rendered no pixels. Point QT_QPA_FONTDIR
at the Windows fonts folder unless it is already set.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@jonoomph

Copy link
Copy Markdown
Member Author

Simpler Text

@codecov

codecov Bot commented Oct 20, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 98.13433% with 10 lines in your changes missing coverage. Please review.
✅ Project coverage is 74.64%. Comparing base (6a54ea7) to head (49773fe).
⚠️ Report is 5 commits behind head on develop.

Files with missing lines Patch % Lines
src/QtTextReader.cpp 94.47% 10 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #1131      +/-   ##
===========================================
+ Coverage    74.01%   74.64%   +0.62%     
===========================================
  Files          275      276       +1     
  Lines        37119    37636     +517     
===========================================
+ Hits         27475    28094     +619     
+ Misses        9644     9542     -102     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

The unreleased style keys now use Caption's names where they mean the
same thing: stroke_color becomes stroke and padding becomes
background_padding. border_color becomes border, so the four colors
read color, background, stroke and border. Released QtTextReader keys
are unchanged.
- background_corner rounds the text background, and the border follows
  the same curve. It animates per clip like the colors (text_animation),
  and is limited to half the box.
- line_spacing sets the line height as a multiple of normal (1 = normal).
  It changes the box height, so it is a single value per text.
- Both use the Caption effect's names, and default to the previous look.
- The text outline is drawn in its own pass behind the letters, as in
  Caption, so a wide outline grows outward instead of covering them. The
  fill is drawn as a path too, so the first frame renders like the rest.
@jonoomph
jonoomph merged commit d8d8c51 into develop Oct 22, 2026
25 of 26 checks passed
@jonoomph
jonoomph deleted the easy-text branch October 22, 2026 19:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant