Include font into lib

This commit is contained in:
hodasemi 2023-01-18 12:28:07 +01:00
parent be9f93ec3c
commit af599edb52
2 changed files with 2 additions and 7 deletions

View file

@ -26,7 +26,4 @@ package() {
# copy layer discovery info file
install -Dm644 ${_pkgbase}/rFactorOverlay.json "${pkgdir}"/usr/share/vulkan/implicit_layer.d/rFactorOverlay.json
# copy font png
install -Dm644 ${_pkgbase}/font.png "${pkgdir}"/usr/share/vulkan_rf2_layer/font.png
}

View file

@ -16,7 +16,7 @@ use std::{
rc::Rc,
sync::{Arc, Mutex},
};
use ui::prelude::*;
use ui::{guihandler::guihandler::Font, prelude::*};
use vulkan_rs::prelude::*;
use elements::*;
@ -142,9 +142,7 @@ impl Overlay {
// only font is used
let mut create_info = GuiHandlerCreateInfo::default();
create_info.font_path = AssetPath::from("/usr/share/vulkan_rf2_layer/font.png");
// create_info.font_path = AssetPath::from("/opt/sata_ssd/Workspace/vk_layer_rs/font.png");
create_info.font_path.assume_prefix_free();
create_info.font = Font::Bytes(include_bytes!("../../font.png"));
// required to not crash
create_info.resource_directory = AssetPath::from("");