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

Improve colour font support #954

Open
marc2k3 opened this issue Aug 22, 2024 · 3 comments
Open

Improve colour font support #954

marc2k3 opened this issue Aug 22, 2024 · 3 comments

Comments

@marc2k3
Copy link
Contributor

marc2k3 commented Aug 22, 2024

Top panel is my JScript Panel 3 component and the bottom is Item details....

$set_font(Segoe UI,32)
🎵%title%$crlf()
🎙%artist%$crlf()
[💿%album%$crlf()]
[📅%date%]

$set_font would be replaced with $font in my component.
https://jscript-panel.github.io/docs/guides/font-rgb/#font

image

FWIW, I'm using...

https://learn.microsoft.com/en-us/windows/win32/api/d2d1/nf-d2d1-id2d1rendertarget-drawtextlayout

with

D2D1_DRAW_TEXT_OPTIONS_CLIP | D2D1_DRAW_TEXT_OPTIONS_ENABLE_COLOR_FONT

Build:
foo_ui_columns-2.1.0+189.gae03aa7.github.r10496010108.1382.x64

@marc2k3
Copy link
Contributor Author

marc2k3 commented Aug 22, 2024

So this is a windows 11 issue. On windows 10, it's the same

image

@reupen
Copy link
Owner

reupen commented Aug 22, 2024

Hmm probably you are getting SVG (or similar) glyphs with Direct2D, while I'm getting basic COLR glyphs.

It wouldn't be so bad if the colours were the same...

Trying to render image glyphs using GDI doesn't look like much fun, so I'll probably have to start using Direct2D at some point.

(As an aside curves in the emojis look smoother to me in the CUI/GDI version in your first screenshot...)

@marc2k3
Copy link
Contributor Author

marc2k3 commented Aug 22, 2024

Damn, your eyesight is better than mine. But now you've pointed it out... 😬

@reupen reupen changed the title [dev version] colour font issue Improve colour font support Aug 23, 2024
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