Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upStart implementing text in layout 2020 #24822
Conversation
highfive
commented
Nov 21, 2019
|
Heads up! This PR modifies the following files:
|
highfive
commented
Nov 21, 2019
|
Forgot to |
|
|
Fixed now, and I ran |
|
r? @SimonSapin |
Diff in /repo/components/layout_2020/flow/inline.rs at line 291:
impl TextRun {
fn layout(&self, layout_context: &LayoutContext, ifc: &mut InlineFormattingContextState) {
use gfx::font::{ShapingFlags, ShapingOptions};
- use style::values::generics::text::LineHeight;
use style::computed_values::text_rendering::T as TextRendering;
use style::computed_values::word_break::T as WordBreak;
+ use style::values::generics::text::LineHeight;
let font_style = self.parent_style.clone_font();
let inherited_text_style = self.parent_style.get_inherited_text();
Diff in /repo/components/layout_2020/flow/inline.rs at line 336:
&mut None,
);
- (font.metrics.ascent, font.metrics.line_gap, font.font_key, glyph_runs)
+ (
+ font.metrics.ascent,
+ font.metrics.line_gap,
+ font.font_key,
+ glyph_runs,
+ )
});
let font_size = self.parent_style.get_font().font_size.size.0;
clang-format not installed. Skipping CPP formatting.
Run `./mach fmt` to fix the formatting |
|
Oops. Fixed. |
| #[derive(Clone)] | ||
| pub struct ShapedSegment { | ||
| pub(crate) font_key: FontInstanceKey, | ||
| pub(crate) glyph_runs: Vec<Arc<GlyphStore>>, |
This comment has been minimized.
This comment has been minimized.
SimonSapin
Nov 22, 2019
Member
"Segment" and "run" are somewhat interchangeable in my mind. What’s the terminology here? What does it mean to have multiple runs per segment? Since there is only one font key per segment, I assume we also have multiple segments per DOM text node.
This comment has been minimized.
This comment has been minimized.
SimonSapin
Nov 22, 2019
Member
multiple segments per DOM text node
Though maybe not yet if we don’t do font fallback? Either way, could we unify the segment and (glyph) run concepts with each other? (And maybe with flow::inline::TextRun?)
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
I addressed all the comments. |
| #[derive(Clone)] | ||
| pub struct ShapedSegment { | ||
| pub(crate) font_key: FontInstanceKey, | ||
| pub(crate) glyph_runs: Vec<Arc<GlyphStore>>, |
This comment has been minimized.
This comment has been minimized.
| #[derive(Clone)] | ||
| pub struct ShapedSegment { | ||
| pub(crate) font_key: FontInstanceKey, | ||
| pub(crate) glyph_runs: Vec<Arc<GlyphStore>>, |
This comment has been minimized.
This comment has been minimized.
|
@bors-servo r+ |
|
@bors-servo retry #24726 |
Start implementing text in layout 2020
|
|
|
@bors-servo retry
|
Start implementing text in layout 2020
|
|
|
@bors-servo retry |
Start implementing text in layout 2020
|
|
nox commentedNov 21, 2019
No description provided.