obs-studio icon indicating copy to clipboard operation
obs-studio copied to clipboard

Text alignment not working properly with custom extents & wrap

Open jithinsss opened this issue 4 years ago • 2 comments

Platform

Operating system and version: Windows 10 - 19041 OBS Studio version: 26.0.0-rc1

Expected Behavior

Text GDI+ sources that have Custom Text Extents and Wrap enabled are not centered properly

Current Behavior

The text source is about 2 character spaces to the left of where its supposed to be center

Steps to Reproduce

  1. Create Text GD+ source
  2. Enable Custom Text Extents & Wrap
  3. Set alignment to center
  4. https://i.imgur.com/lnm5bxB.png

Additional information

jithinsss avatar Aug 31 '20 02:08 jithinsss

Yep same issue. Alignment does not work when you have "Wrap" disabled. Which is annoying for dynamically updating text of which you do not know its width.

agaertner avatar Oct 07 '21 19:10 agaertner

Same problem, anyone found some tweak to fix this? Wrap disable doesn't work,

Spo-oky avatar Nov 18 '21 00:11 Spo-oky

I found a point. maybe we haven't remove the newline padding when "Custom Text Extents + Warp" are enabled.

https://github.com/obsproject/obs-studio/blob/master/plugins/obs-text/gdiplus/obs-text.cpp#L445-L481

akiirui avatar Aug 28 '22 18:08 akiirui

would love to see this issue resolved as it does make it annoying when you want your text centered at all times. we reguralry change the text and having to go trough the scenes to fix it is annoying. added a picture to show that even wrapping isnt working properly. looks like the text is pushed a little to the left at all times.

image

maggi373 avatar Dec 29 '23 23:12 maggi373