-
-
Notifications
You must be signed in to change notification settings - Fork 21.4k
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
RichTextLabel's [url] bounding box is incorrect if bbcode updates the [font_size] #92437
Comments
Does it work if you close the extends RichTextLabel
func _ready():
bbcode_enabled = true
text = "[url]Url bounding box is [font_size=80]broken[/font_size][/url][url]it also affects other url on the same line[/url]" |
Yes sorry this was just a typo on the github post. My project does close the url properly and the bug remains. Recording.2024-05-27.180959.mp4 |
The screenshot originally posted did also have the same error, see the closing bracket at the end, hence why I asked |
Yes, my bad thanks for mentioning it. I've fixed it in the original post now. I noticed this issue in my main project where I want to use multiple url's in the same line which often have different sizing which is done via bbcode. So I assume that the engine is not accounting for bbcode tag changes to the appearance of text when calculating the |
For context, this is how it works in Firefox with the following page: <!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>Test</title>
<style>
a:hover {
color: green;
}
</style>
</head>
<body>
<a href="">Url bounding box is <span style="font-size: 72px">broken</span> it also affects url on the same line</span>
</body>
</html> simplescreenrecorder-2024-05-27_19.21.11.mp4 |
Tested versions
Reproducible in 4.3 dev, 4.2.2, and 3.5.
System information
Windows 11
Issue description
Setting the font_size in a tag for a part of the url, makes the entire line follow that bounding box.
The clickbox for the whole line is at the height of the largest piece of text, in this case the one word set at font_size=80
Steps to reproduce
The click of the url is at the height of the biggest font size.
Minimal reproduction project (MRP)
URL-Hitbox.zip
The text was updated successfully, but these errors were encountered: