Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Text vertical alignment working different in each browser. #6255

Closed
amyhapple opened this issue Nov 8, 2022 · 2 comments
Closed

Text vertical alignment working different in each browser. #6255

amyhapple opened this issue Nov 8, 2022 · 2 comments
Assignees

Comments

@amyhapple
Copy link

amyhapple commented Nov 8, 2022

Problem description

Text vertical alignment working different in each browser.

Attach a .c3p

textalignbug.zip

Steps to reproduce

  1. Set text objects with different settings.
  2. Open the project in different browsers (can be reproduced in preview mode).

Observed result

With BBCode activated, center and bottom alignments not matches in Chrome, Firefox and iOS Safari.
Removing the BBCode option, both stay same, but not in iOS Safari (even the Top alignment is different in this browser)

LEFT: CHROME | RIGHT: FIREFOX (I don't have an iPhone to send screenshots, but have tested in a previous project.)
firefox_LBkmKi70d7
With larger fonts the difference are HUGE.

Expected result

All main browsers working the same.

More details

The only settings that I could reproduce in the three browsers equally, is enabling the BBCode and setting the vertical aligment to Top.

Another case 1:
https://www.construct.net/en/forum/construct-3/general-discussion-7/text-offset-mobile-browser-161303

Another case 2:
https://www.construct.net/en/forum/construct-3/general-discussion-7/text-center-vertical-alignment-158779

Affected browsers/platforms:
Tested in: Windows and Android Chrome / Windows Firefox / iPhone Safari

First affected release:
This bug is too old. There were some changes in past versions, but the bug was never actually fixed. I'm using r317 right now (last stable one)

System details

View details

PASTE HERE

@AshleyScirra
Copy link
Member

I'm afraid this is currently due to incompatibilities between browsers, the same as #6137. Browser makers will need to first agree on the correct behavior and then implement it everywhere consistency (see this comment).

@amyhapple
Copy link
Author

@AshleyScirra I think the solution is to do it manually then. Is there any way to detect the browser used for this? The closest I've come is using Browser.UserAgent, but I would still need an API to translate the info.
And it's possible to make an action Enable/Disable BBCode to text objects?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants