update logo
improve font resolution logic generate icons improve timeline
|
Before Width: | Height: | Size: 3.4 KiB After Width: | Height: | Size: 20 KiB |
|
Before Width: | Height: | Size: 6.8 KiB After Width: | Height: | Size: 68 KiB |
|
Before Width: | Height: | Size: 974 B After Width: | Height: | Size: 2.2 KiB |
|
Before Width: | Height: | Size: 2.8 KiB After Width: | Height: | Size: 15 KiB |
|
Before Width: | Height: | Size: 3.8 KiB After Width: | Height: | Size: 24 KiB |
|
Before Width: | Height: | Size: 3.9 KiB After Width: | Height: | Size: 26 KiB |
|
Before Width: | Height: | Size: 7.6 KiB After Width: | Height: | Size: 82 KiB |
|
Before Width: | Height: | Size: 903 B After Width: | Height: | Size: 2.1 KiB |
|
Before Width: | Height: | Size: 8.4 KiB After Width: | Height: | Size: 97 KiB |
|
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 3.6 KiB |
|
Before Width: | Height: | Size: 2.0 KiB After Width: | Height: | Size: 7.8 KiB |
|
Before Width: | Height: | Size: 2.4 KiB After Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 4.5 KiB |
|
Before Width: | Height: | Size: 85 KiB After Width: | Height: | Size: 84 KiB |
|
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 268 KiB |
@@ -30,7 +30,7 @@ pub struct Paint {
|
||||
pub struct TextPaint {
|
||||
pub style: PaintStyle,
|
||||
pub align: TextAlign,
|
||||
pub fontName: String,
|
||||
pub font_name: String,
|
||||
pub size: f32,
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
use super::{
|
||||
entities::common::AnimationData,
|
||||
values::{AnimatedFloatVec2, AnimatedValue},
|
||||
values::{AnimatedFloatVec2, AnimatedFloatVec3, AnimatedValue},
|
||||
};
|
||||
use crate::animation::timeline::Timeline;
|
||||
use serde::{Deserialize, Serialize};
|
||||
@@ -10,7 +10,7 @@ pub struct AnimatedTransform {
|
||||
pub translate: AnimatedFloatVec2,
|
||||
pub scale: AnimatedFloatVec2,
|
||||
pub skew: AnimatedFloatVec2,
|
||||
pub rotate: AnimatedFloatVec2,
|
||||
pub rotate: AnimatedFloatVec3,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)]
|
||||
@@ -18,7 +18,7 @@ pub struct Transform {
|
||||
pub translate: (f32, f32),
|
||||
pub scale: (f32, f32),
|
||||
pub skew: (f32, f32),
|
||||
pub rotate: (f32, f32),
|
||||
pub rotate: (f32, f32, f32),
|
||||
}
|
||||
|
||||
impl AnimatedTransform {
|
||||
|
||||
@@ -154,7 +154,7 @@ pub fn test_timeline_entities_at_frame(
|
||||
color: Color::new(0, 0, 0, 1.0),
|
||||
width: 10.0,
|
||||
}),
|
||||
fontName: "Arial".to_string(),
|
||||
font_name: "Arial".to_string(),
|
||||
align: TextAlign::Center,
|
||||
size: 20.0,
|
||||
};
|
||||
@@ -163,7 +163,7 @@ pub fn test_timeline_entities_at_frame(
|
||||
style: PaintStyle::Fill(FillStyle {
|
||||
color: Color::new(0, 0, 0, 1.0),
|
||||
}),
|
||||
fontName: "Arial".to_string(),
|
||||
font_name: "Arial".to_string(),
|
||||
align: TextAlign::Center,
|
||||
size: 10.0,
|
||||
};
|
||||
|
||||
@@ -1,16 +1,27 @@
|
||||
use font_kit::source::SystemSource;
|
||||
|
||||
pub struct Font {
|
||||
pub path: String,
|
||||
}
|
||||
|
||||
#[tauri::command]
|
||||
pub fn get_system_fonts() -> Option<Vec<String>> {
|
||||
let source = SystemSource::new();
|
||||
|
||||
let found_families = source.all_families();
|
||||
let found_fonts = source.all_fonts();
|
||||
|
||||
found_families.ok()
|
||||
match found_fonts {
|
||||
Ok(found_fonts) => {
|
||||
let font_names: Vec<String> = found_fonts
|
||||
.iter()
|
||||
.map(|f| f.load())
|
||||
.filter(|f| f.is_ok())
|
||||
.map(|f| f.unwrap())
|
||||
.map(|f| f.postscript_name())
|
||||
.filter(|f| f.is_some())
|
||||
.map(|f| f.unwrap())
|
||||
.collect();
|
||||
|
||||
Some(font_names)
|
||||
}
|
||||
Err(_) => None,
|
||||
}
|
||||
}
|
||||
|
||||
#[tauri::command]
|
||||
|
||||