Skip to content

Fix text sources filling full canvas width instead of sizing to content#61

Draft
Copilot wants to merge 1 commit into
mainfrom
copilot/align-text-source-display
Draft

Fix text sources filling full canvas width instead of sizing to content#61
Copilot wants to merge 1 commit into
mainfrom
copilot/align-text-source-display

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 20, 2026

The private OBS text source (FreeType/GDI+) was created without explicitly setting word_wrap, custom_width, or use_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.ccreate_private_obs_source_settings
    • word_wrap = false — prevents text from reflowing to a wide bounding box
    • custom_width = 0 — forces the source to auto-size to the rendered text width, so get_width() returns the true text extent
    • use_custom_bgcolor = false — suppresses the opaque background rectangle that GDI+ can default to, which otherwise reveals the full (oversized) source rect

With 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).

…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>
@kzryzstof kzryzstof force-pushed the copilot/align-text-source-display branch from c56b9ef to 4215901 Compare April 21, 2026 01:12
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.

2 participants