Conversation
|
Hello @gzotti! Thank you for the suggested improvement. |
e27ded9 to
aaeba9c
Compare
|
It seems at least the full strings are now again visible, and font change is immediately visible. |
|
@10110111 @alex-w do you see Cuneiform even if you have set Noto Sans as app font? I must switch to Noto Sans Cuneiform, and then vertical spacing is weird. The bounding box issues may depend on QString's append and handling of mixed LTR/RTL strings. Are you familiar with the problem? I would like to have the native string always on the left side. |
Yes, I set Noto Sans in the rightmost combobox, and the cuneiforms are still visible. Not sure what the one on the left does, but it's set to Latin by default, and doesn't contain any cuneiform option.
I'm not familiar with the issue, but what I'd try is render the separate strings to separate surfaces, and then join them in the desired order physically (rather than typographically), separated by the width of a space character. |
Argh, this is different on Windows then. I was looking for optional OS features like "international support", but did not find anything relevant (aside from eastern Asian fonts of course)
The left combo allows setting a font family, and then the right then provides the list which fonts contain the respective glyphs, with samples where applicable. Indeed, no Cuneiform family here, and the Noto Cuneiform also has no glyph samples. It seems that some font features are optional and missing.
That was an option I see as last-resort, but sure, it's a way to go. Unless we want to keep "gravity" labels. ... Grmpf - Gravity labels don't work with Cuneiform! Just showing question mark roadsigns. OTOH, Arab strings are placed to the left where I want them. ... BUT character-reversed! OMG, new features, new nightmares... EDIT: Maybe this helps for label collation:
|
|
Qt5: error: cannot call member function ‘QStringList QFontDatabase::families(WritingSystem) const’ without object |
I am developing this for diagnostics. Not sure we will ever need it in the end, or it can just be encircled with ifdefs. |
|
Just checked on Windows 11 Home installation that has never been on the Internet, and Notepad shows cuneiform characters regardless of the font configured in its settings, even Times New Roman. OTOH, Stellarium shows empty rectangles instead of cuneiforms in all labels, info strings and input fields. So the conclusion is that some cuneiform-enabled font is already present in the system (apparently, it's Segoe UI Historic), but Qt isn't able to pick it up. Maybe it needs some special configuration for this, I don't know. |
|
Thanks for this. Seems we need to understand a few things around Qt's Unicode and font handling much better. :-( |
|
This creates good labels and IMHO solves #4493. However, it may be better to do that FSI/PDI enclosing already when reading the culturalName from file, and change that from struct to object, with getters and setters that guarantees such embeddings. @alex-w , @10110111 opinions? I have not started changing code around gravityLabels. Probably the complete label will have to be split on FSI/PDI regexps, and where applicable, the angular rendering handled in some yet-to-invent ways. |
|
@10110111 's hint on QFontDatabase::addApplicationFallbackFontFamily() nailed it. No need for extra fonts, just set one as fallback. My previous question about when to place the Unicode isolation characters remains open. And again, GravityLabels are not fixed in this PR. |
|
Note that |
|
Uh, again thanks for that hint. I hope it is no problem to set the Windows CI to Qt6.8 also for Arm ( @alex-w ?) I will add the version check, and the feature will just not work nicely on Qt5 builds. |
|
It's interesting - I see hieroglyphs and cuneiform on the mac when DejaVue Sans font selected :) |
I tried use Qt6.8 for arm, but without success |
Apparently just what Linuxians experience. Either your version of DejaVue Sans contains the glyphs, or a fallback handler becomes active. This is what the latest change did to Windows: declare which font to use to retrieve missing characters of a particular character class. Finally I can again set any font (decorative handwriting, blackletter, ... however ugly I want my UI to be), and the Cuneiform letters come from Segoe UI Historical. |
|
I will rebase a bit before merging. But happy to have reached at least this stage in 25.3. |
94591dc to
733b44d
Compare
|
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
- So far, even no need to install any extra fonts!
…aracters. This ensures left to right order of label elements.
733b44d to
c0be57c
Compare
|
Conflicts have been resolved. A maintainer will review the pull request shortly. |
|
Hello @gzotti! Please check the fresh version (development snapshot) of Stellarium: |
- also better align symbols with right edge - but don't use 2-degree offset to avoid collision with symbols - matter of taste...
|
Hello @gzotti! Please check the latest stable version of Stellarium: |
Description
StelApp is the only element which ever accepts a font change.
Currently, several StelModules have their own fonts which may get initialized at startup, but then only size was changed.
When switching font, the font change should become effective immediately, not only after relaunch.
This is a first step to hopefully fix the font issues which appeared with Skycultures demands.
This branch should be used to
Screenshots (if appropriate):
Type of change
How Has This Been Tested?
Test Configuration:
Checklist: