mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-20 11:28:30 +08:00
Refactor font loading from per-document to the portfolio (#659)
* Cleanup default font loading * Refactor fonts * Fix menulist mouse navigation * Format * Formatting * Move default font into consts.rs Co-authored-by: Keavon Chambers <keavon@keavon.com>
This commit is contained in:
committed by
Keavon Chambers
co-authored by
Keavon Chambers
parent
d4539bc304
commit
8923b68e30
@@ -6,6 +6,8 @@ use crate::message_prelude::*;
|
||||
use crate::misc::HintData;
|
||||
use crate::Color;
|
||||
|
||||
use graphene::layers::text_layer::Font;
|
||||
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
#[remain::sorted]
|
||||
@@ -23,8 +25,7 @@ pub enum FrontendMessage {
|
||||
TriggerAboutGraphiteLocalizedCommitDate { commit_date: String },
|
||||
TriggerFileDownload { document: String, name: String },
|
||||
TriggerFileUpload,
|
||||
TriggerFontLoad { font_file_url: String },
|
||||
TriggerFontLoadDefault,
|
||||
TriggerFontLoad { font: Font, is_default: bool },
|
||||
TriggerIndexedDbRemoveDocument { document_id: u64 },
|
||||
TriggerIndexedDbWriteDocument { document: String, details: FrontendDocumentDetails, version: String },
|
||||
TriggerRasterDownload { document: String, name: String, mime: String, size: (f64, f64) },
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
use graphene::LayerId;
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
#[derive(PartialEq, Clone, Deserialize, Serialize, Debug)]
|
||||
#[derive(PartialEq, Eq, Clone, Deserialize, Serialize, Debug)]
|
||||
pub struct FrontendDocumentDetails {
|
||||
pub is_saved: bool,
|
||||
pub name: String,
|
||||
pub id: u64,
|
||||
}
|
||||
|
||||
#[derive(PartialEq, Clone, Deserialize, Serialize, Debug)]
|
||||
#[derive(PartialEq, Eq, Clone, Deserialize, Serialize, Debug)]
|
||||
pub struct FrontendImageData {
|
||||
pub path: Vec<LayerId>,
|
||||
pub mime: String,
|
||||
|
||||
Reference in New Issue
Block a user