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

Error parsing "18x18ja" TTF/OTF font file: InvalidFont #7

Open
savchenko opened this issue Apr 18, 2024 · 1 comment
Open

Error parsing "18x18ja" TTF/OTF font file: InvalidFont #7

savchenko opened this issue Apr 18, 2024 · 1 comment

Comments

@savchenko
Copy link

Release builds from master and v0.2.1 error with:

./bite 
MESA-INTEL: warning: Performance support disabled, consider sysctl dev.i915.perf_stream_paranoid=0

thread 'main' panicked at /home/lbr/.cargo/registry/src/index.crates.io-6f17d22bba15001f/epaint-0.27.2/src/text/fonts.rs:203:27:
Error parsing "18x18ja" TTF/OTF font file: InvalidFont

Backtrace:

stack backtrace:
   0: rust_begin_unwind
             at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/std/src/panicking.rs:645:5
   1: core::panicking::panic_fmt
             at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/core/src/panicking.rs:72:14
   2: epaint::text::fonts::ab_glyph_font_from_font_data::{{closure}}
             at /home/user/.cargo/registry/src/index.crates.io-6f17d22bba15001f/epaint-0.27.2/src/text/fonts.rs:203:27
   3: core::result::Result<T,E>::unwrap_or_else
             at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/core/src/result.rs:1426:23
   4: epaint::text::fonts::ab_glyph_font_from_font_data
             at /home/user/.cargo/registry/src/index.crates.io-6f17d22bba15001f/epaint-0.27.2/src/text/fonts.rs:203:6
   5: epaint::text::fonts::FontImplCache::new::{{closure}}
             at /home/user/.cargo/registry/src/index.crates.io-6f17d22bba15001f/epaint-0.27.2/src/text/fonts.rs:752:32
   6: core::ops::function::impls::<impl core::ops::function::FnOnce<A> for &mut F>::call_once
             at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/core/src/ops/function.rs:305:13
   7: core::option::Option<T>::map
             at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/core/src/option.rs:1072:29
   8: <core::iter::adapters::map::Map<I,F> as core::iter::traits::iterator::Iterator>::next
             at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/core/src/iter/adapters/map.rs:104:26
   9: <alloc::vec::Vec<T> as alloc::vec::spec_from_iter_nested::SpecFromIterNested<T,I>>::from_iter
             at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/alloc/src/vec/spec_from_iter_nested.rs:26:32
  10: <alloc::vec::Vec<T> as alloc::vec::spec_from_iter::SpecFromIter<T,I>>::from_iter
             at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/alloc/src/vec/spec_from_iter.rs:33:9
  11: <alloc::vec::Vec<T> as core::iter::traits::collect::FromIterator<T>>::from_iter
             at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/alloc/src/vec/mod.rs:2791:9
  12: core::iter::traits::iterator::Iterator::collect
             at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/core/src/iter/traits/iterator.rs:2054:9
  13: <alloc::collections::btree::map::BTreeMap<K,V> as core::iter::traits::collect::FromIterator<(K,V)>>::from_iter
             at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/alloc/src/collections/btree/map.rs:2221:34
  14: core::iter::traits::iterator::Iterator::collect
             at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/core/src/iter/traits/iterator.rs:2054:9
  15: epaint::text::fonts::FontImplCache::new
             at /home/user/.cargo/registry/src/index.crates.io-6f17d22bba15001f/epaint-0.27.2/src/text/fonts.rs:755:14
  16: epaint::text::fonts::FontsImpl::new
             at /home/user/.cargo/registry/src/index.crates.io-6f17d22bba15001f/epaint-0.27.2/src/text/fonts.rs:617:13
  17: epaint::text::fonts::Fonts::new
             at /home/user/.cargo/registry/src/index.crates.io-6f17d22bba15001f/epaint-0.27.2/src/text/fonts.rs:383:20
  18: egui::context::ContextImpl::update_fonts_mut::{{closure}}
             at /home/user/.cargo/registry/src/index.crates.io-6f17d22bba15001f/egui-0.27.2/src/context.rs:546:17
  19: alloc::collections::btree::map::entry::Entry<K,V,A>::or_insert_with
             at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/alloc/src/collections/btree/map/entry.rs:187:43
  20: egui::context::ContextImpl::update_fonts_mut
             at /home/user/.cargo/registry/src/index.crates.io-6f17d22bba15001f/egui-0.27.2/src/context.rs:537:21
  21: egui::context::ContextImpl::begin_frame_mut
             at /home/user/.cargo/registry/src/index.crates.io-6f17d22bba15001f/egui-0.27.2/src/context.rs:516:9
  22: egui::context::Context::begin_frame::{{closure}}
             at /home/user/.cargo/registry/src/index.crates.io-6f17d22bba15001f/egui-0.27.2/src/context.rs:772:26
  23: egui::context::Context::write
             at /home/user/.cargo/registry/src/index.crates.io-6f17d22bba15001f/egui-0.27.2/src/context.rs:718:9
  24: egui::context::Context::begin_frame
             at /home/user/.cargo/registry/src/index.crates.io-6f17d22bba15001f/egui-0.27.2/src/context.rs:772:9
  25: gui::winit_backend::Platform::begin_frame
             at /home/user/.shares/user_code/bite/gui/src/winit_backend.rs:338:9
  26: gui::wgpu_backend::Instance::draw
             at /home/user/.shares/user_code/bite/gui/src/wgpu_backend/mod.rs:140:9
  27: gui::UI::run::{{closure}}
             at /home/user/.shares/user_code/bite/gui/src/lib.rs:231:38
  28: core::ops::function::impls::<impl core::ops::function::FnMut<A> for &mut F>::call_mut
             at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/core/src/ops/function.rs:294:13
  29: winit::platform_impl::platform::wayland::event_loop::EventLoop<T>::single_iteration
             at /home/user/.cargo/registry/src/index.crates.io-6f17d22bba15001f/winit-0.29.10/src/platform_impl/linux/wayland/event_loop/mod.rs:504:17
  30: winit::platform_impl::platform::wayland::event_loop::EventLoop<T>::pump_events
             at /home/user/.cargo/registry/src/index.crates.io-6f17d22bba15001f/winit-0.29.10/src/platform_impl/linux/wayland/event_loop/mod.rs:231:13
  31: winit::platform_impl::platform::wayland::event_loop::EventLoop<T>::run_on_demand
             at /home/user/.cargo/registry/src/index.crates.io-6f17d22bba15001f/winit-0.29.10/src/platform_impl/linux/wayland/event_loop/mod.rs:201:19
  32: winit::platform_impl::platform::EventLoop<T>::run_on_demand
             at /home/user/.cargo/registry/src/index.crates.io-6f17d22bba15001f/winit-0.29.10/src/platform_impl/linux/mod.rs:821:56
  33: winit::platform_impl::platform::EventLoop<T>::run
             at /home/user/.cargo/registry/src/index.crates.io-6f17d22bba15001f/winit-0.29.10/src/platform_impl/linux/mod.rs:814:9
  34: winit::event_loop::EventLoop<T>::run
             at /home/user/.cargo/registry/src/index.crates.io-6f17d22bba15001f/winit-0.29.10/src/event_loop.rs:249:25
  35: gui::UI::run
             at /home/user/.shares/user_code/bite/gui/src/lib.rs:211:28
  36: bite::main
             at /home/user/.shares/user_code/bite/src/main.rs:21:9
  37: core::ops::function::FnOnce::call_once
             at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/core/src/ops/function.rs:250:5
@WINSDK
Copy link
Owner

WINSDK commented Apr 18, 2024

Looks to be loading a cjk font. On linux this would be loading /usr/share/fonts/opentype/noto/NotoSansCJK-Regular.ttc.
If you do have this font, could you send it. Might just be an unsupported font.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants