Skip to content

Fix outline encroaches on text color#1193

Merged
ddennedy merged 1 commit into
masterfrom
outline
Jan 16, 2026
Merged

Fix outline encroaches on text color#1193
ddennedy merged 1 commit into
masterfrom
outline

Conversation

@bmatherly

Copy link
Copy Markdown
Member

As reported here: https://forum.shotcut.org/t/outline-outlining-text-in-filter-subtilte-burn-in-and-typewriter-with-unwanted-inline/50726

Posting this as a PR so we can consider if we need to do anything for backwards compatibility. I was thinking we could just push it out. But I want to make sure users would not be surprised.

I think this change significantly improves the outline.

Before:
before

After:
after

Even the maximum outline size still preserves the text fill:
image

@ddennedy

ddennedy commented Jan 9, 2026

Copy link
Copy Markdown
Member

I think it needs some versioning since it changes behavior significantly.

@bmatherly

Copy link
Copy Markdown
Member Author

OK. I can bump the yaml version. Do you think we should do anything differently in Shotcut for the new version?

@ddennedy

ddennedy commented Jan 9, 2026

Copy link
Copy Markdown
Member

I mean a project that was made before this change should look very similar to before. People will be surprised when they upgrade and the text outline is much thinner. You can make it a user option (property). Would you characterize this as stroke (before) and now outline? Unfortunately, we already have an outline property. Otherwise, that would have been perfect as a boolean for this. Maybe outer_line. 😆

@bmatherly

Copy link
Copy Markdown
Member Author

Your comment reminded me that the same change applies to producer_qtext as well. I've updated the commit to change both.

I mean a project that was made before this change should look very similar to before. People will be surprised when they upgrade and the text outline is much thinner.

I understand what you mean. On the one-hand, I agree that this is going to change the behavior quite a bit. On the other hand, I think the old behavior is really a bug and is basically unusable beyond a tiny bit of outline.

Here is an example comparison vs the pango implementation:

Pango
melt -profile atsc_1080p_60 pango text=hello size=200 outline=10 olcolour=0xff0000ff
pango

Current qtext
melt -profile atsc_1080p_60 qtext text=hello size=200 outline=10 olcolour=0xff0000ff
qtext_old

New qtext
melt -profile atsc_1080p_60 qtext text=hello size=200 outline=10 olcolour=0xff0000ff
qtext_new

As you can see, nobody would actually want the current implementation - which is why people have complained.
So I was hoping that we might just consider this a bug fix and deal with the small amount of surprise that might come from a few people. But I am on the fence, open minded, and happy to follow your preference.

If we decide to make it backwards compatible, here is my suggestion:

  • MLT: Pick a new property name for the new behavior. For the sake of this discussion, lets call it "stroke" (although, i would argue the current mode is really stroke).
  • MLT: Add the stroke property to any services that use text and outline: pango producer, qtext producer, qtext filter, dynamictext filter, gpstext filter, subtitle filter, text filter, timer filter, count producer, subtitle producer
  • MLT: For the qt based text services, the outline property will use current behavior while the stroke property will use new behavior. For the pango based service, the outline and stroke properties will have the same behavior
  • MLT: the stroke property will always override the outline property when stroke is set. If stroke is not set, outline will be used
  • MLT: the outline property for all these services can be deprecated for future removal.
  • Shotcut: We will change all the text based services that have outline to use stroke instead. But we will keep the label as "Outline".
  • Shotcut: If a user opens an existing project that used the "outline" property, it will look exactly the same. However, if they open the filter UI, the "Outline" item will have a value of zero because it is really reading the stroke property. If the user changes the outline, the underlying stroke value will override the currently set "outline". There will be no way for them to remove the outline. So if they want to remove all outline/stroke, they will have to delete the filter and re-add it to clear the legacy "outline" property. Or maybe we can detect when "stroke" has been set and clear "outline".

@ddennedy

Copy link
Copy Markdown
Member

Ok I can be convinced to treat it as a bug. We have some goals to insulate behavior changes, but it is not 100% rigorous. But let’s get @j-b-m approval as well since kdenlive might be affected (outside of the titler).

@ddennedy ddennedy requested review from Copilot and j-b-m January 11, 2026 19:07

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR fixes an issue where text outlines were encroaching on the fill color of text in the qtext producer and filter. The fix reorders the drawing operations to draw the outline first with no brush, then draw the fill on top with no pen, ensuring clean separation between outline and fill.

Changes:

  • Modified drawing logic to render outline before fill instead of simultaneously
  • Removed unused helper functions get_qpen and get_qbrush from filter_qtext.cpp
  • Added explanatory comments describing the new two-pass rendering approach

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
src/modules/qt/producer_qtext.cpp Refactored text rendering to draw outline first, then fill on top
src/modules/qt/filter_qtext.cpp Applied same outline-then-fill rendering fix and removed now-unused helper functions

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@ddennedy ddennedy added this to the v7.38.0 milestone Jan 16, 2026
@ddennedy

Copy link
Copy Markdown
Member

We will make a change if JB later objects, but I am going to merge now for the Shotcut 26.1 beta.

@ddennedy ddennedy merged commit 48507a8 into master Jan 16, 2026
25 checks passed
@ddennedy ddennedy deleted the outline branch January 16, 2026 01:59
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.

3 participants