Extract platform-dependant FontSystem
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
This commit is contained in:
co-authored by
Nathan Sobo
parent
e0e4cff815
commit
9178e91cc0
@@ -109,12 +109,9 @@ impl Element for Label {
|
||||
colors = vec![(0..text_len, ColorU::black())];
|
||||
}
|
||||
|
||||
let line = ctx.text_layout_cache.layout_str(
|
||||
self.text.as_str(),
|
||||
self.font_size,
|
||||
styles.as_slice(),
|
||||
ctx.font_cache,
|
||||
);
|
||||
let line =
|
||||
ctx.text_layout_cache
|
||||
.layout_str(self.text.as_str(), self.font_size, styles.as_slice());
|
||||
|
||||
let size = vec2f(
|
||||
line.width.max(constraint.min.x()).min(constraint.max.x()),
|
||||
|
||||
Reference in New Issue
Block a user