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

Make all splash screen text scalable #4092

Merged
merged 1 commit into from
Jan 26, 2025

Conversation

10110111
Copy link
Contributor

Currently the splash screen has rasterized branding text: Stellarium and stellarium.org. This text gets upscaled when scale factor or font size changes. It's better to have it rendered as text instead, which this PR does.

Later I intend to also provide a higher-resolution version of the background image.

Now, it looks as intended on Ubuntu 20.04, but I'm not completely sure how this will look on Windows, because Sans font will be different there. Please show me your screenshots from Windows before this could be mergeable.

This is how it looks on Ubuntu 20.04. To compare just try upscaling the current splash or run Stellarium with 26px GUI fonts or 200% scaling.

Screenshot_2025-01-21_13-28-15

Screenshot_2025-01-21_13-31-02

Copy link

Great PR! Please pay attention to the following items before merging:

Files matching src/**/*.cpp:

  • Are possibly unused includes removed?

This is an automatically generated QA checklist based on modified files.

@alex-w alex-w added the subsystem: gui The issue is related to GUI subsystem of planetarium... label Jan 21, 2025
@alex-w alex-w added this to the 25.1 milestone Jan 21, 2025
@gzotti

This comment was marked as resolved.

@10110111

This comment was marked as resolved.

@alex-w
Copy link
Member

alex-w commented Jan 21, 2025

Ubuntu 20.04

master:
stellarium-release

this branch:
stellarium-branch

Please see density of font - we may got surprises by dependent of users font settings (Noto Sans at the moment for Stellarium)

@10110111
Copy link
Contributor Author

What if you specify "Bitstream Vera Sans" explicitly? (And I wonder what will happen on Windows then.)

@alex-w
Copy link
Member

alex-w commented Jan 21, 2025

What if you specify "Bitstream Vera Sans" explicitly?

stellarium-branch

@10110111 10110111 closed this Jan 24, 2025
@10110111 10110111 reopened this Jan 24, 2025
@10110111
Copy link
Contributor Author

Please retry with the updated version.

@10110111 10110111 force-pushed the scalable-splash branch 4 times, most recently from 76fed07 to f363f45 Compare January 25, 2025 06:39
@10110111 10110111 marked this pull request as ready for review January 25, 2025 06:39
@alex-w
Copy link
Member

alex-w commented Jan 25, 2025

Please retry with the updated version.

The look is much better, but why not using "DejaVu Sans" for text on splash? We distribute this font with Stellarium and it give best look for density of text IMHO.

@gzotti
Copy link
Member

gzotti commented Jan 25, 2025

Windows 11/Qt6.8:
image

@10110111
Copy link
Contributor Author

The look is much better, but why not using "DejaVu Sans" for text on splash?

Well, first of all, I didn't know that we distribute some fonts. Second, it appears that the alignment of the title and subtitle with DejaVu Sans is broken :\

BTW, there are several instances of DejaVu Sans in the tree, and all are different, is it intended?

-rw-rw-r-- 1 ruslan ruslan 757076 окт 24 18:36 ./data/DejaVuSans.ttf
-rw-rw-r-- 1 ruslan ruslan 720280 окт 24 18:36 ./plugins/RemoteControl/webroot/dejavusans-webfont.ttf
-rw-rw-r-- 1 ruslan ruslan 720012 окт 24 18:36 ./util/DSSToStellarium/DejaVuSans.ttf

@10110111
Copy link
Contributor Author

So, now it should be pixel-perfect in the sense that the rightmost pixels of all three text lines must be at the same column. This might be a bit suboptimal regarding very faint sides of vertical lines (where the better alignment would be by the neighboring bright column), but it's OK to me.

Here's how it looks on my Ubuntu 20.04:

Screenshot_2025-01-26_17-23-58

Screenshot_2025-01-26_17-23-50

If it looks similarly good on Windows and the Linux distro used by @alex-w, this can be merged.

@alex-w
Copy link
Member

alex-w commented Jan 26, 2025

This is may be strange, but what about some redesign the splash screen - version 25.1 will coming with serious changes and we can make a "Stellarium" text a bit less and add the version number in same string (e.g. "Stellarium 25.0" currently) + do a small shift of both lines (Stellarium & stellarium.org) to up.

@10110111 @gzotti @sushoff @henrysky @worachate001 your opinion?

@alex-w
Copy link
Member

alex-w commented Jan 26, 2025

Well, first of all, I didn't know that we distribute some fonts.

We doing it since version 10.1/10.2 (at least in 10.5 when I coming in the project the DejaVu fonts already was in distributive of Stellarium).

Second, it appears that the alignment of the title and subtitle with DejaVu Sans is broken :\

This is sad, but probably our fonts is outdated now.

BTW, there are several instances of DejaVu Sans in the tree, and all are different, is it intended?
-rw-rw-r-- 1 ruslan ruslan 757076 окт 24 18:36 ./data/DejaVuSans.ttf

This is font which we distribute within Stellarium by default

-rw-rw-r-- 1 ruslan ruslan 720280 окт 24 18:36 ./plugins/RemoteControl/webroot/dejavusans-webfont.ttf

We distribute it too, but for Remote Control plugin only (a font is using for compatibility of text rendering within WUI) - probably we should sync the font with main one.

-rw-rw-r-- 1 ruslan ruslan 720012 окт 24 18:36 ./util/DSSToStellarium/DejaVuSans.ttf

This is font for utilite and he is outdated by the fact now and we do not distribute it within binary packages.

@10110111
Copy link
Contributor Author

make a "Stellarium" text a bit less and add the version number in same string

I'm not sure it would look better. The current version placement looks nice to me, while simply having it follow the name would be somewhat boring, too standard. But anyway, this is something a designer should look at. From readability perspective we shouldn't lift the text too much up, otherwise it would be white on white.

@alex-w
Copy link
Member

alex-w commented Jan 26, 2025

make a "Stellarium" text a bit less and add the version number in same string

I'm not sure it would look better. The current version placement looks nice to me, while simply having it follow the name would be somewhat boring, too standard. But anyway, this is something a designer should look at. From readability perspective we shouldn't lift the text too much up, otherwise it would be white on white.

"Stellarium:25.0" :-) ?

P.S. The current look is OK for me, but maybe someone want to see a some changes

P.P.S. @10110111 is it possible to make a splash screen a grayscale in depending by config option? In this case we shouldn't be storing 2 images and we can avoid a cache issue.

@alex-w
Copy link
Member

alex-w commented Jan 26, 2025

If it looks similarly good on Windows and the Linux distro used by @alex-w, this can be merged.

The look of text is perfect for me

@10110111
Copy link
Contributor Author

10110111 commented Jan 26, 2025 via email

@gzotti
Copy link
Member

gzotti commented Jan 26, 2025

Win11/Qt6.8, 100% scaling:
image

Good for me.

EDIT: Uh, I just see the commit number looks identical to above. I did of course checkout master, branch -D pr/4092, pull, checkout pr/4092. Cmake ran again, but apparently, sometimes commit numbers and even branch names are still not updated.

@alex-w
Copy link
Member

alex-w commented Jan 26, 2025

So, the PR can be merge as is :)

@alex-w alex-w merged commit 4363889 into Stellarium:master Jan 26, 2025
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
subsystem: gui The issue is related to GUI subsystem of planetarium...
Development

Successfully merging this pull request may close these issues.

3 participants