Include font into lib
This commit is contained in:
parent
be9f93ec3c
commit
af599edb52
2 changed files with 2 additions and 7 deletions
|
@ -26,7 +26,4 @@ package() {
|
||||||
|
|
||||||
# copy layer discovery info file
|
# copy layer discovery info file
|
||||||
install -Dm644 ${_pkgbase}/rFactorOverlay.json "${pkgdir}"/usr/share/vulkan/implicit_layer.d/rFactorOverlay.json
|
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
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -16,7 +16,7 @@ use std::{
|
||||||
rc::Rc,
|
rc::Rc,
|
||||||
sync::{Arc, Mutex},
|
sync::{Arc, Mutex},
|
||||||
};
|
};
|
||||||
use ui::prelude::*;
|
use ui::{guihandler::guihandler::Font, prelude::*};
|
||||||
use vulkan_rs::prelude::*;
|
use vulkan_rs::prelude::*;
|
||||||
|
|
||||||
use elements::*;
|
use elements::*;
|
||||||
|
@ -142,9 +142,7 @@ impl Overlay {
|
||||||
// only font is used
|
// only font is used
|
||||||
let mut create_info = GuiHandlerCreateInfo::default();
|
let mut create_info = GuiHandlerCreateInfo::default();
|
||||||
|
|
||||||
create_info.font_path = AssetPath::from("/usr/share/vulkan_rf2_layer/font.png");
|
create_info.font = Font::Bytes(include_bytes!("../../font.png"));
|
||||||
// create_info.font_path = AssetPath::from("/opt/sata_ssd/Workspace/vk_layer_rs/font.png");
|
|
||||||
create_info.font_path.assume_prefix_free();
|
|
||||||
|
|
||||||
// required to not crash
|
// required to not crash
|
||||||
create_info.resource_directory = AssetPath::from("");
|
create_info.resource_directory = AssetPath::from("");
|
||||||
|
|
Loading…
Reference in a new issue