commit 85ce25f48d869e94e572c7fa9b4b5c0259e445ae
parent cf6724bc57b58dc872e34443792339ede33ca1a9
Author: William Casarin <jb55@jb55.com>
Date: Sun, 17 Dec 2023 13:24:42 -0800
fonts: move font logic elsewhere for now
We will get back to this, can't get it working atm
Diffstat:
2 files changed, 23 insertions(+), 21 deletions(-)
diff --git a/src/fonts.rs b/src/fonts.rs
@@ -0,0 +1,23 @@
+// TODO: figure out the custom font situation
+
+/*
+fn setup_fonts(font_data: &egui::FontData, ctx: &egui::Context) {
+ let mut fonts = egui::FontDefinitions::default();
+
+ // Install my own font (maybe supporting non-latin characters).
+ // .ttf and .otf files supported.
+ fonts
+ .font_data
+ .insert("my_font".to_owned(), font_data.clone());
+
+ // Put my font first (highest priority) for proportional text:
+ fonts
+ .families
+ .entry(egui::FontFamily::Proportional)
+ .or_default()
+ .insert(0, "my_font".to_owned());
+
+ // Tell egui to use these fonts:
+ ctx.set_fonts(fonts);
+}
+*/
diff --git a/src/main.rs b/src/main.rs
@@ -31,27 +31,6 @@ fn nip19_evid(nip19: &Nip19) -> Option<EventId> {
}
}
-/*
-fn setup_fonts(font_data: &egui::FontData, ctx: &egui::Context) {
- let mut fonts = egui::FontDefinitions::default();
-
- // Install my own font (maybe supporting non-latin characters).
- // .ttf and .otf files supported.
- fonts
- .font_data
- .insert("my_font".to_owned(), font_data.clone());
-
- // Put my font first (highest priority) for proportional text:
- fonts
- .families
- .entry(egui::FontFamily::Proportional)
- .or_default()
- .insert(0, "my_font".to_owned());
-
- // Tell egui to use these fonts:
- ctx.set_fonts(fonts);
-}
-*/
fn render_note<'a>(_app_ctx: &Context, note: &'a Note) -> Vec<u8> {
use egui::{FontId, RichText};