mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-17 07:18:04 +08:00
Code review fixes
This commit is contained in:
@@ -7,10 +7,3 @@ pub const LAYER_OUTLINE_STROKE_WEIGHT: f64 = 0.5;
|
||||
// Fonts
|
||||
pub const DEFAULT_FONT_FAMILY: &str = "Cabin";
|
||||
pub const DEFAULT_FONT_STYLE: &str = "Regular (400)";
|
||||
|
||||
// Load Source Sans Pro font data
|
||||
// TODO: Grab this from the node_modules folder (either with `include_bytes!` or ideally at runtime) instead of checking the font file into the repo.
|
||||
// TODO: And maybe use the WOFF2 version (if it's supported) for its smaller, compressed file size.
|
||||
pub const SOURCE_SANS_FONT_DATA: &[u8] = include_bytes!("text/source-sans-pro-regular.ttf");
|
||||
pub const SOURCE_SANS_FONT_FAMILY: &str = "Source Sans Pro";
|
||||
pub const SOURCE_SANS_FONT_STYLE: &str = "Regular (400)";
|
||||
|
||||
@@ -70,6 +70,6 @@ impl RenderComplexity for GradientStops {
|
||||
|
||||
impl RenderComplexity for Typography {
|
||||
fn render_complexity(&self) -> usize {
|
||||
1
|
||||
self.layout.lines().map(|line| line.items().count()).sum()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -83,7 +83,7 @@ impl fmt::Debug for Typography {
|
||||
|
||||
impl PartialEq for Typography {
|
||||
fn eq(&self, _other: &Self) -> bool {
|
||||
unimplemented!("Typography data type cannot be compared")
|
||||
unimplemented!("Typography cannot be compared")
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Binary file not shown.
Reference in New Issue
Block a user