kayak_ui
kayak_ui copied to clipboard
Is there a way to import Chinese fonts?
I've tried to use msdf-atlas-gen.exe
to generate somefont.png
and somefont.kayak_font
files, but neither font_mapping.set_default(asset_server.load("somefont.kayak_font"));
nor font_mapping.set_default(asset_server.load("somefont.kttf"));
worked for me.
The terminal throws an error:
ERROR wgpu::backend::direct: Handling wgpu errors as fatal by default thread 'Compute Task Pool (1)' panicked at 'wgpu error: Validation Error`
Caused by:
In CommandEncoder::copy_texture_to_texture
Copy error
copy of Z 500..501 would end up overrunning the bounds of the Destination texture of Z size 500
And I found pub const MAX_CHARACTERS: u32 = 500;
in src/bevy/renderer/font_texture_cache.rs
.
The Chinese character set is much larger than [0x20] - [0x7f]
, so is there a way to use a character set which is more than 500 characters?
I've tried to use
msdf-atlas-gen.exe
to generatesomefont.png
andsomefont.kayak_font
files, but neitherfont_mapping.set_default(asset_server.load("somefont.kayak_font"));
norfont_mapping.set_default(asset_server.load("somefont.kttf"));
worked for me. The terminal throws an error:ERROR wgpu::backend::direct: Handling wgpu errors as fatal by default thread 'Compute Task Pool (1)' panicked at 'wgpu error: Validation Error` Caused by: In CommandEncoder::copy_texture_to_texture Copy error copy of Z 500..501 would end up overrunning the bounds of the Destination texture of Z size 500
And I found
pub const MAX_CHARACTERS: u32 = 500;
insrc/bevy/renderer/font_texture_cache.rs
. The Chinese character set is much larger than[0x20] - [0x7f]
, so is there a way to use a character set which is more than 500 characters?
We can problem bump the character limit here to 2000. Feel free to open a PR. 👍