layout: Implement per-glyph font fallback.

This improves numerous pages, for example Wikipedia and Ars Technica.

Closes #177.
This commit is contained in:
Patrick Walton 2015-04-07 18:43:18 -07:00
parent 19b443ecc8
commit fec43b49bb
9 changed files with 308 additions and 121 deletions

View file

@ -427,8 +427,10 @@ fn render_text(layout_context: &LayoutContext,
style,
incremental::rebuild_and_reflow(),
info));
// FIXME(pcwalton): This should properly handle multiple marker fragments. This could happen
// due to text run splitting.
let fragments = TextRunScanner::new().scan_for_runs(layout_context.font_context(), fragments);
debug_assert!(fragments.len() == 1);
debug_assert!(fragments.len() >= 1);
fragments.fragments.into_iter().next().unwrap().specific
}