mirror of
https://github.com/storytold/wordcraft.git
synced 2026-10-26 03:17:28 -06:00
Compare commits
1
Commits
main
...
fix/ci-main-nbsp
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e04d3d921b |
@@ -37,7 +37,8 @@ fn wide_nbsp_family() -> &'static str {
|
||||
/// The width of the first line of `text` set in the wide-nbsp font.
|
||||
fn line_width(text: &str) -> f32 {
|
||||
let chr = wordcraft_doc::CharProps { font: Some(wide_nbsp_family().into()), size: Some(12.0), ..Default::default() };
|
||||
let d = Document { body: vec![wordcraft_doc::para_block(wordcraft_doc::Paragraph::with_text(text, chr))], ..Document::new() };
|
||||
let mut d = Document::new();
|
||||
d.body = vec![wordcraft_doc::para_block(wordcraft_doc::Paragraph::with_text(text, chr))];
|
||||
let mut c = LayoutCache::new();
|
||||
let l = layout(&d, &mut c, &LayoutOptions::default());
|
||||
for p in &l.pages {
|
||||
|
||||
Reference in New Issue
Block a user