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

UI Mirroring Demo: ported to Godot 4.1 #974

Closed
wants to merge 1 commit into from

Conversation

Alex2782
Copy link
Contributor

@Alex2782 Alex2782 commented Oct 5, 2023

v4.2.dev5.official [e3e2528ba]

Screen-2023-10-06-012623.mp4

Copy link
Member

@Calinou Calinou left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested locally on 4.2.beta1. I can't see Japanese characters where they should appear in the translation demo:

image

This also applies to the UI mirroring demo (a label should appear below the focused dropdown with "Japanese (fa)"):

image

These issues also occur when testing with 4.1.2.

@Calinou
Copy link
Member

Calinou commented Oct 18, 2023

I suggest checking what #930 does.

@Alex2782

This comment was marked as outdated.

@Alex2782

This comment was marked as outdated.

@Alex2782

This comment was marked as outdated.

@Alex2782
Copy link
Contributor Author

Alex2782 commented Oct 18, 2023

If I close Godot and open the project again then everything is ok, Japanese is also displayed.
v4.1.2.stable.official [399c9dc39]

@Calinou
Copy link
Member

Calinou commented Oct 18, 2023

I still can't get it to work on my end, even after removing .import/ and .godot/ while the editor is closed 🙁
Note that I'm on Linux, so font loading behavior may differ compared to macOS.

PS: I noticed your PR adds two new files in ui_mirroring/fonts, noto_font.res and noto_font_arabic.res. Why are these files required when the existing TTF fonts could be reused?

Copy link
Member

@bruvzg bruvzg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fonts are clearly not ported correctly:

I would suggest doing something like this (from the clean state before any changes):

  • Delete all font *.tres files (droid_sans.tres, noto_font.tres).
  • Reimport all font from the editor import tab (probably optional).
  • Set fallbacks in the main font import settings and reimport it.
Screenshot 2023-10-19 at 08 22 19
  • Open the scene, and in the "Fix Dependencies" dialog, select the main font instead of missing font *.tres.

Also, do we need to ship all the font with the demos? For the Mirroring and Translation demos system font fallback should be fine, neither require specific font dimensions to work.

@Alex2782

This comment was marked as outdated.

@Alex2782
Copy link
Contributor Author

  • Reimport all font from the editor import tab (probably optional).

I had opened Project Settings -> Import Defaults -> Importer "Font Data (Dynamic Font)" and under "Fallbacks" inserted and saved the 2 font files, after that I could not continue (Crash / Godot open Project Manager). Was that correct?

The file 'ui_mirroring.tscn' is now 7.3 MB. If I add font for Japanese, then the scene will be even bigger.

@smix8 says: #955 (comment)

If we rework and update the demo maybe we should save the NavigationPolygon resource to an external file as a binary .res file?

Right now it is stored embedded as plain text inside the navigation.tscn file, something that we should not teach to new users as it will bloat their scene files and make them super slow to load/save/update on large and complex navigation meshes.

@bruvzg does this PR work for you with binary 'res'-Fonts? Or is Japanese not displayed for you either?
The label for HELLO_TEXT has normal English font, but still Arabic is displayed correctly? @Calinou

I suggest checking what #930 does.
Add PO support in addition to CSV.

I think there is little point in trying to fix problems I can't reproduce.

@bruvzg
Copy link
Member

bruvzg commented Oct 19, 2023

does this PR work for you with binary 'res'-Fonts?

There should not be any binary (or text) font resources at all, font files should be used directly.

@bruvzg
Copy link
Member

bruvzg commented Oct 19, 2023

Something like this - bruvzg@0401f28

@Alex2782
Copy link
Contributor Author

ok I'll check later, from some tutorials I know only first convert the fonts to "tres", also already with Godot 3.2

@Alex2782 Alex2782 changed the title UI Mirroring Demo: ported to Godot 4.2 UI Mirroring Demo: ported to Godot 4.1 Oct 19, 2023
@Alex2782
Copy link
Contributor Author

Also, do we need to ship all the font with the demos? For the Mirroring and Translation demos system font fallback should be fine, neither require specific font dimensions to work.

now without 'fonts', this looks and works now like with 'fonts' (on MacOS)

Should I remove HELLO_TEXT? does not work for @Calinou with a CSV file

image

image

@Calinou
Copy link
Member

Calinou commented Oct 21, 2023

Something like this - bruvzg@0401f28

I've tested that commit on 4.2.beta2 but I still can't see the CJK text (even after removing .godot/ and reopening the editor to force a reimport of everything):

image

The UI mirroring demo update works well though.

@Alex2782 Alex2782 closed this Feb 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants