Fix text sources filling full canvas width instead of sizing to content#61
Draft
Copilot wants to merge 1 commit into
Draft
Fix text sources filling full canvas width instead of sizing to content#61Copilot wants to merge 1 commit into
Copilot wants to merge 1 commit into
Conversation
Copilot created this pull request from a session on behalf of
kzryzstof
April 20, 2026 23:59
View session
…ustom_width and use_custom_bgcolor Agent-Logs-Url: https://github.com/Octelys/achievements-tracker-plugin/sessions/a4002fbf-a299-4ac6-904c-a3a52f022f77 Co-authored-by: kzryzstof <38137839+kzryzstof@users.noreply.github.com>
c56b9ef to
4215901
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The private OBS text source (FreeType/GDI+) was created without explicitly setting
word_wrap,custom_width, oruse_custom_bgcolor. Some OBS builds default these to fill-canvas behavior, making the source bounding box span the full canvas width and preventing meaningful positional alignment.Changes
src/sources/common/text_source.c—create_private_obs_source_settingsword_wrap = false— prevents text from reflowing to a wide bounding boxcustom_width = 0— forces the source to auto-size to the rendered text width, soget_width()returns the true text extentuse_custom_bgcolor = false— suppresses the opaque background rectangle that GDI+ can default to, which otherwise reveals the full (oversized) source rectWith these set, each text source reports its exact text dimensions. Left/center/right alignment is then achieved natively via OBS Edit Transform → Positional Alignment (Top Left / Top Center / Top Right).