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

Display placeholder for missing glyphs #591

Closed
timothyqiu opened this issue Mar 17, 2020 · 2 comments
Closed

Display placeholder for missing glyphs #591

timothyqiu opened this issue Mar 17, 2020 · 2 comments
Milestone

Comments

@timothyqiu
Copy link
Member

timothyqiu commented Mar 17, 2020

Describe the project you are working on: the Godot editor

Describe the problem or limitation you are having in your project:

Godot silently "eats" the character if it can't be provided by the font chain. It's hard to tell if it's a editor/game programming bug or it's just because the font does not have the glyph.

Describe the feature / enhancement and how it helps to overcome the problem or limitation:

Use a placeholder glyph to provide a visual representation of the missing glyph, like the .notdef glyph in dynamic fonts.

The .notdef glyph

Describe how your proposal will work, with code, pseudocode, mockups, and/or diagrams:

For dynamic fonts, use the .notdef glyph when the glyph is missing in the current font, and there are no fallback fonts available.

example

Bitmap fonts can also be modified to provide a similar "undefined" glyph. For example, automatically generate a checked rectangle box bitmap.

If this enhancement will not be used often, can it be worked around with a few lines of script?:

No.

Is there a reason why this should be core and not an add-on in the asset library?:

It seems impossible to load the .notdef glyph through GDScript.

@bruvzg
Copy link
Member

bruvzg commented Mar 17, 2020

At least for the editor, I would prefer something more informative, like character codes.

Screenshot 2020-03-17 at 07 45 51

@Calinou
Copy link
Member

Calinou commented May 16, 2021

This was implemented in godotengine/godot#41100, closing.

Since this relies on the new, backwards-incompatible TextServer, this feature can't be backported as-is to the 3.x branch.

@Calinou Calinou closed this as completed May 16, 2021
@Calinou Calinou added this to the 4.0 milestone May 16, 2021
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

3 participants