fonts: move font logic elsewhere for now

We will get back to this, can't get it working atm
This commit is contained in:
William Casarin 2023-12-17 13:24:42 -08:00
parent cf6724bc57
commit 85ce25f48d
2 changed files with 23 additions and 21 deletions

23
src/fonts.rs Normal file
View File

@ -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);
}
*/

View File

@ -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};