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

Changing font size and LINE-SPACING in DRAW's RICH-TEXT "disalignes" the BACKDROP. #5481

Open
luce80 opened this issue Feb 16, 2024 · 0 comments
Assignees
Labels
GUI status.built A change in codebase has been done to address the ticket. type.bug Ticket describes an abnormal behavior, not conforming to the specs or expectation.

Comments

@luce80
Copy link

luce80 commented Feb 16, 2024

Describe the bug
Changing font size and line-spacing in draw's rich-text "disalignes" the backdrop.

To reproduce

view [
	rich-text 150x150 "abcdABCDEFGH"
		draw compose [
			pen red
			text 0x10 (rt: rtd-layout ["abcdABCDEFGH^/xyzXYZ"])
		]
		on-created [
			; change font size
			rt/font: make font! [size: 30]
			rt/line-spacing: 30 ; if ^^ then <<-- this disalignes highlighting
			; change font size again and color
			rt/data: [1x20 10 255.0.255 3x5 0.255.0 backdrop 164.200.255]
		]
]

Expected behavior
backdrop alignement should stay correct also for non-default line-spacing with non-default font! size.

Screenshots
image

Platform version

-----------RED & PLATFORM VERSION----------- 
RED: [ branch: "master" tag: #v0.6.5 ahead: 20 date: 14-Feb-2024/12:03:12 commit: #d3409baa77a4a38a12753f6ec4af53545d749d08 ]
PLATFORM: [ name: "Windows 11" OS: 'Windows arch: 'x86-64 version: 10.0.0 build: 22631 ]
--------------------------------------------
@hiiamboris hiiamboris added type.bug Ticket describes an abnormal behavior, not conforming to the specs or expectation. GUI labels Feb 16, 2024
qtxie added a commit that referenced this issue Feb 17, 2024
@qtxie qtxie added the status.built A change in codebase has been done to address the ticket. label Feb 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
GUI status.built A change in codebase has been done to address the ticket. type.bug Ticket describes an abnormal behavior, not conforming to the specs or expectation.
Projects
None yet
Development

No branches or pull requests

3 participants