feat(text_gizmos): add support for accented Latin characters#24003
feat(text_gizmos): add support for accented Latin characters#24003nuts-rice wants to merge 9 commits into
Conversation
|
It looks like your PR has been selected for a highlight in the next release blog post, but you didn't provide a release note. Please review the instructions for writing release notes, then expand or revise the content in the release notes directory to showcase your changes. |
54d087f to
e3016f5
Compare
e3016f5 to
1868c78
Compare
05aa450 to
cf17a12
Compare
027740c to
5755a7f
Compare
5755a7f to
2de6580
Compare
kfc35
left a comment
There was a problem hiding this comment.
If this is ready for review, you probably should change the PR title to remove WIP
“add support for accented latin characters” sounds like it better conveys what this does
| return Some((color, inner)); | ||
| } | ||
|
|
||
| for stroke_idx in current_extended_strokes.by_ref() { |
There was a problem hiding this comment.
nit: it’d be nice to dedup this logic with the current_main_strokes for loop if possible. they have similar enough bodies, but unsure if it’ll make things less comprehensible
| continue; | ||
| } | ||
|
|
||
| // If this stroke is a closed loop, append one extra point to add a join at the seam. |
There was a problem hiding this comment.
This comment still has some value, no? I believe this was clarification for a bug fix previously #22982
There was a problem hiding this comment.
put that back in, sorry about that
| /// | ||
| /// Only ASCII characters in the range 32–126 are supported. | ||
| /// | ||
| /// Unsupported characters will be rendered as '?'. |
There was a problem hiding this comment.
is this true? I tried typing Japanese hiragana into a text gizmo from your branch and it shows up blank
There was a problem hiding this comment.
Unsupported will now render as a box, put hirigana as unsupported in example text_gizmo
There was a problem hiding this comment.
These comments will have to be updated from “?” to “☐” (or whatever the appropriate square character is because I cannot find the exact one lol)
| self.extended[i].3.clone(), | ||
| ) | ||
| } else { | ||
| GlyphSource::Standard(self.advance, 0..0) |
There was a problem hiding this comment.
I wonder if this merits its own type of GlyphSource::Unsupported
There was a problem hiding this comment.
put in Unuspported and associated logic
7b5c640 to
d3cf2d7
Compare
kfc35
left a comment
There was a problem hiding this comment.
Tested it out and the example looks good
There was a problem hiding this comment.
It’s unfortunate that the starting size doesn’t show every glyph anymore…. seems like it’s time to up the height
| resolution: WindowResolution::new(1920, 1920).with_scale_factor_override(1.0), |
| /// | ||
| /// Only ASCII characters in the range 32–126 are supported. | ||
| /// | ||
| /// Unsupported characters will be rendered as '?'. |
There was a problem hiding this comment.
These comments will have to be updated from “?” to “☐” (or whatever the appropriate square character is because I cannot find the exact one lol)
| @@ -0,0 +1,13 @@ | |||
| --- | |||
| title: Text gizmos extended characters | |||
There was a problem hiding this comment.
Hmm, if this gets in before we release 0.19, I think this might be better merged with the existing text gizmos release note…
but a maintainer will let you know for certain, so I wouldn’t do anything just yet.

Objective
bevy_gizmos: Expand text gizmos character support beyond ASCII #22997Solution
extendedfield toStrokeFontget_glyphfor finding glyphs outside of ASCIIEXTENDED_POSITIONSACCENT_STROKESSIMPLEX_EXTENDEDarrays now owned byextended_fields inSIMPLEX_STROKE_FONTSTesting