mirror of
https://github.com/servo/servo.git
synced 2025-07-24 15:50:21 +01:00
Always include the last-resort font
This is used as a fallback for any characters that don't have glyphs in the specified font.
This commit is contained in:
parent
2d5dc8fa6d
commit
e588943b4f
258 changed files with 127 additions and 905 deletions
|
@ -223,9 +223,7 @@ impl FontContext {
|
|||
}
|
||||
}
|
||||
|
||||
// If unable to create any of the specified fonts, create one from the
|
||||
// list of last resort fonts for this platform.
|
||||
if fonts.is_empty() {
|
||||
// Add a last resort font as a fallback option.
|
||||
let mut cache_hit = false;
|
||||
for cached_font_entry in &self.fallback_font_cache {
|
||||
let cached_font = cached_font_entry.font.borrow();
|
||||
|
@ -256,7 +254,6 @@ impl FontContext {
|
|||
Err(_) => debug!("Failed to create fallback layout font!")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
let font_group = Rc::new(FontGroup::new(fonts));
|
||||
self.layout_font_group_cache.insert(layout_font_group_cache_key, font_group.clone());
|
||||
|
|
|
@ -1971,6 +1971,11 @@ impl Fragment {
|
|||
}
|
||||
}
|
||||
SpecificFragmentInfo::ScannedText(ref text_fragment) => {
|
||||
// Fragments with no glyphs don't contribute any inline metrics.
|
||||
// TODO: Filter out these fragments during flow construction?
|
||||
if text_fragment.content_size.inline == Au(0) {
|
||||
return InlineMetrics::new(Au(0), Au(0), Au(0));
|
||||
}
|
||||
// See CSS 2.1 § 10.8.1.
|
||||
let line_height = self.calculate_line_height(layout_context);
|
||||
let font_derived_metrics =
|
||||
|
|
|
@ -197,17 +197,12 @@ impl TextRunScanner {
|
|||
for (byte_index, character) in text.char_indices() {
|
||||
// Search for the first font in this font group that contains a glyph for this
|
||||
// character.
|
||||
let mut font_index = 0;
|
||||
let font_index = fontgroup.fonts.iter().position(|font| {
|
||||
font.borrow().glyph_index(character).is_some()
|
||||
}).unwrap_or(0);
|
||||
|
||||
// The following code panics one way or another if this condition isn't met.
|
||||
assert!(fontgroup.fonts.len() > 0);
|
||||
while font_index < fontgroup.fonts.len() - 1 {
|
||||
if fontgroup.fonts.get(font_index).unwrap().borrow()
|
||||
.glyph_index(character)
|
||||
.is_some() {
|
||||
break
|
||||
}
|
||||
font_index += 1;
|
||||
}
|
||||
|
||||
let bidi_level = match bidi_levels {
|
||||
Some(levels) => levels[*paragraph_bytes_processed],
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
[t422-rgba-onscreen-multiple-boxes-c.htm]
|
||||
type: reftest
|
||||
expected: FAIL
|
|
@ -0,0 +1,3 @@
|
|||
[t425-hsla-onscreen-multiple-boxes-c.htm]
|
||||
type: reftest
|
||||
expected: FAIL
|
|
@ -1,4 +0,0 @@
|
|||
[css3-text-line-break-jazh-002.htm]
|
||||
type: reftest
|
||||
expected:
|
||||
if os == "linux": FAIL
|
|
@ -1,4 +0,0 @@
|
|||
[css3-text-line-break-jazh-003.htm]
|
||||
type: reftest
|
||||
expected:
|
||||
if os == "linux": FAIL
|
|
@ -1,4 +0,0 @@
|
|||
[css3-text-line-break-jazh-004.htm]
|
||||
type: reftest
|
||||
expected:
|
||||
if os == "linux": FAIL
|
|
@ -1,4 +0,0 @@
|
|||
[css3-text-line-break-jazh-005.htm]
|
||||
type: reftest
|
||||
expected:
|
||||
if os == "linux": FAIL
|
|
@ -1,4 +0,0 @@
|
|||
[css3-text-line-break-jazh-006.htm]
|
||||
type: reftest
|
||||
expected:
|
||||
if os == "linux": FAIL
|
|
@ -1,4 +0,0 @@
|
|||
[css3-text-line-break-jazh-007.htm]
|
||||
type: reftest
|
||||
expected:
|
||||
if os == "linux": FAIL
|
|
@ -1,4 +0,0 @@
|
|||
[css3-text-line-break-jazh-008.htm]
|
||||
type: reftest
|
||||
expected:
|
||||
if os == "linux": FAIL
|
|
@ -1,4 +0,0 @@
|
|||
[css3-text-line-break-jazh-009.htm]
|
||||
type: reftest
|
||||
expected:
|
||||
if os == "linux": FAIL
|
|
@ -1,4 +0,0 @@
|
|||
[css3-text-line-break-jazh-010.htm]
|
||||
type: reftest
|
||||
expected:
|
||||
if os == "linux": FAIL
|
|
@ -1,4 +0,0 @@
|
|||
[css3-text-line-break-jazh-011.htm]
|
||||
type: reftest
|
||||
expected:
|
||||
if os == "linux": FAIL
|
|
@ -1,4 +0,0 @@
|
|||
[css3-text-line-break-jazh-012.htm]
|
||||
type: reftest
|
||||
expected:
|
||||
if os == "linux": FAIL
|
|
@ -1,4 +0,0 @@
|
|||
[css3-text-line-break-jazh-013.htm]
|
||||
type: reftest
|
||||
expected:
|
||||
if os == "linux": FAIL
|
|
@ -1,4 +0,0 @@
|
|||
[css3-text-line-break-jazh-014.htm]
|
||||
type: reftest
|
||||
expected:
|
||||
if os == "linux": FAIL
|
|
@ -1,4 +0,0 @@
|
|||
[css3-text-line-break-jazh-015.htm]
|
||||
type: reftest
|
||||
expected:
|
||||
if os == "linux": FAIL
|
|
@ -1,4 +0,0 @@
|
|||
[css3-text-line-break-jazh-016.htm]
|
||||
type: reftest
|
||||
expected:
|
||||
if os == "linux": FAIL
|
|
@ -1,4 +0,0 @@
|
|||
[css3-text-line-break-jazh-017.htm]
|
||||
type: reftest
|
||||
expected:
|
||||
if os == "linux": FAIL
|
|
@ -1,4 +0,0 @@
|
|||
[css3-text-line-break-jazh-018.htm]
|
||||
type: reftest
|
||||
expected:
|
||||
if os == "linux": FAIL
|
|
@ -1,4 +0,0 @@
|
|||
[css3-text-line-break-jazh-019.htm]
|
||||
type: reftest
|
||||
expected:
|
||||
if os == "linux": FAIL
|
|
@ -1,4 +0,0 @@
|
|||
[css3-text-line-break-jazh-020.htm]
|
||||
type: reftest
|
||||
expected:
|
||||
if os == "linux": FAIL
|
|
@ -1,4 +0,0 @@
|
|||
[css3-text-line-break-jazh-021.htm]
|
||||
type: reftest
|
||||
expected:
|
||||
if os == "linux": FAIL
|
|
@ -1,4 +0,0 @@
|
|||
[css3-text-line-break-jazh-022.htm]
|
||||
type: reftest
|
||||
expected:
|
||||
if os == "linux": FAIL
|
|
@ -1,4 +0,0 @@
|
|||
[css3-text-line-break-jazh-023.htm]
|
||||
type: reftest
|
||||
expected:
|
||||
if os == "linux": FAIL
|
|
@ -1,4 +0,0 @@
|
|||
[css3-text-line-break-jazh-024.htm]
|
||||
type: reftest
|
||||
expected:
|
||||
if os == "linux": FAIL
|
|
@ -1,4 +0,0 @@
|
|||
[css3-text-line-break-jazh-025.htm]
|
||||
type: reftest
|
||||
expected:
|
||||
if os == "linux": FAIL
|
|
@ -1,4 +0,0 @@
|
|||
[css3-text-line-break-jazh-027.htm]
|
||||
type: reftest
|
||||
expected:
|
||||
if os == "linux": FAIL
|
|
@ -1,4 +0,0 @@
|
|||
[css3-text-line-break-jazh-028.htm]
|
||||
type: reftest
|
||||
expected:
|
||||
if os == "linux": FAIL
|
|
@ -1,4 +0,0 @@
|
|||
[css3-text-line-break-jazh-029.htm]
|
||||
type: reftest
|
||||
expected:
|
||||
if os == "linux": FAIL
|
|
@ -1,4 +0,0 @@
|
|||
[css3-text-line-break-jazh-030.htm]
|
||||
type: reftest
|
||||
expected:
|
||||
if os == "linux": FAIL
|
|
@ -1,4 +0,0 @@
|
|||
[css3-text-line-break-jazh-032.htm]
|
||||
type: reftest
|
||||
expected:
|
||||
if os == "linux": FAIL
|
|
@ -1,4 +0,0 @@
|
|||
[css3-text-line-break-jazh-034.htm]
|
||||
type: reftest
|
||||
expected:
|
||||
if os == "linux": FAIL
|
|
@ -1,4 +0,0 @@
|
|||
[css3-text-line-break-jazh-036.htm]
|
||||
type: reftest
|
||||
expected:
|
||||
if os == "linux": FAIL
|
|
@ -1,4 +0,0 @@
|
|||
[css3-text-line-break-jazh-038.htm]
|
||||
type: reftest
|
||||
expected:
|
||||
if os == "linux": FAIL
|
|
@ -1,4 +0,0 @@
|
|||
[css3-text-line-break-jazh-039.htm]
|
||||
type: reftest
|
||||
expected:
|
||||
if os == "linux": FAIL
|
|
@ -1,4 +0,0 @@
|
|||
[css3-text-line-break-jazh-040.htm]
|
||||
type: reftest
|
||||
expected:
|
||||
if os == "linux": FAIL
|
|
@ -1,4 +0,0 @@
|
|||
[css3-text-line-break-jazh-042.htm]
|
||||
type: reftest
|
||||
expected:
|
||||
if os == "linux": FAIL
|
|
@ -1,4 +0,0 @@
|
|||
[css3-text-line-break-jazh-043.htm]
|
||||
type: reftest
|
||||
expected:
|
||||
if os == "linux": FAIL
|
|
@ -1,4 +0,0 @@
|
|||
[css3-text-line-break-jazh-044.htm]
|
||||
type: reftest
|
||||
expected:
|
||||
if os == "linux": FAIL
|
|
@ -1,4 +0,0 @@
|
|||
[css3-text-line-break-jazh-045.htm]
|
||||
type: reftest
|
||||
expected:
|
||||
if os == "linux": FAIL
|
|
@ -1,4 +0,0 @@
|
|||
[css3-text-line-break-jazh-046.htm]
|
||||
type: reftest
|
||||
expected:
|
||||
if os == "linux": FAIL
|
|
@ -1,4 +0,0 @@
|
|||
[css3-text-line-break-jazh-047.htm]
|
||||
type: reftest
|
||||
expected:
|
||||
if os == "linux": FAIL
|
|
@ -1,4 +0,0 @@
|
|||
[css3-text-line-break-jazh-048.htm]
|
||||
type: reftest
|
||||
expected:
|
||||
if os == "linux": FAIL
|
|
@ -1,4 +0,0 @@
|
|||
[css3-text-line-break-jazh-049.htm]
|
||||
type: reftest
|
||||
expected:
|
||||
if os == "linux": FAIL
|
|
@ -1,4 +0,0 @@
|
|||
[css3-text-line-break-jazh-051.htm]
|
||||
type: reftest
|
||||
expected:
|
||||
if os == "linux": FAIL
|
|
@ -1,4 +0,0 @@
|
|||
[css3-text-line-break-jazh-052.htm]
|
||||
type: reftest
|
||||
expected:
|
||||
if os == "linux": FAIL
|
|
@ -1,4 +0,0 @@
|
|||
[css3-text-line-break-jazh-054.htm]
|
||||
type: reftest
|
||||
expected:
|
||||
if os == "linux": FAIL
|
|
@ -1,4 +0,0 @@
|
|||
[css3-text-line-break-jazh-056.htm]
|
||||
type: reftest
|
||||
expected:
|
||||
if os == "linux": FAIL
|
|
@ -1,4 +0,0 @@
|
|||
[css3-text-line-break-jazh-057.htm]
|
||||
type: reftest
|
||||
expected:
|
||||
if os == "linux": FAIL
|
|
@ -1,4 +0,0 @@
|
|||
[css3-text-line-break-jazh-058.htm]
|
||||
type: reftest
|
||||
expected:
|
||||
if os == "linux": FAIL
|
|
@ -1,3 +1,4 @@
|
|||
[css3-text-line-break-jazh-059.htm]
|
||||
type: reftest
|
||||
expected: FAIL
|
||||
expected:
|
||||
if os == "mac": FAIL
|
||||
|
|
|
@ -1,4 +0,0 @@
|
|||
[css3-text-line-break-jazh-060.htm]
|
||||
type: reftest
|
||||
expected:
|
||||
if os == "linux": FAIL
|
|
@ -1,4 +0,0 @@
|
|||
[css3-text-line-break-jazh-230.htm]
|
||||
type: reftest
|
||||
expected:
|
||||
if os == "linux": FAIL
|
|
@ -1,4 +0,0 @@
|
|||
[css3-text-line-break-jazh-232.htm]
|
||||
type: reftest
|
||||
expected:
|
||||
if os == "linux": FAIL
|
|
@ -1,4 +0,0 @@
|
|||
[css3-text-line-break-jazh-234.htm]
|
||||
type: reftest
|
||||
expected:
|
||||
if os == "linux": FAIL
|
|
@ -1,4 +0,0 @@
|
|||
[css3-text-line-break-jazh-236.htm]
|
||||
type: reftest
|
||||
expected:
|
||||
if os == "linux": FAIL
|
|
@ -1,4 +0,0 @@
|
|||
[css3-text-line-break-jazh-238.htm]
|
||||
type: reftest
|
||||
expected:
|
||||
if os == "linux": FAIL
|
|
@ -1,4 +0,0 @@
|
|||
[css3-text-line-break-jazh-239.htm]
|
||||
type: reftest
|
||||
expected:
|
||||
if os == "linux": FAIL
|
|
@ -1,4 +0,0 @@
|
|||
[css3-text-line-break-jazh-240.htm]
|
||||
type: reftest
|
||||
expected:
|
||||
if os == "linux": FAIL
|
|
@ -1,4 +0,0 @@
|
|||
[css3-text-line-break-jazh-242.htm]
|
||||
type: reftest
|
||||
expected:
|
||||
if os == "linux": FAIL
|
|
@ -1,4 +0,0 @@
|
|||
[css3-text-line-break-jazh-243.htm]
|
||||
type: reftest
|
||||
expected:
|
||||
if os == "linux": FAIL
|
|
@ -1,4 +0,0 @@
|
|||
[css3-text-line-break-jazh-244.htm]
|
||||
type: reftest
|
||||
expected:
|
||||
if os == "linux": FAIL
|
|
@ -1,4 +0,0 @@
|
|||
[css3-text-line-break-jazh-245.htm]
|
||||
type: reftest
|
||||
expected:
|
||||
if os == "linux": FAIL
|
|
@ -1,4 +0,0 @@
|
|||
[css3-text-line-break-jazh-246.htm]
|
||||
type: reftest
|
||||
expected:
|
||||
if os == "linux": FAIL
|
|
@ -1,4 +0,0 @@
|
|||
[css3-text-line-break-jazh-247.htm]
|
||||
type: reftest
|
||||
expected:
|
||||
if os == "linux": FAIL
|
|
@ -1,4 +0,0 @@
|
|||
[css3-text-line-break-jazh-248.htm]
|
||||
type: reftest
|
||||
expected:
|
||||
if os == "linux": FAIL
|
|
@ -1,4 +0,0 @@
|
|||
[css3-text-line-break-jazh-249.htm]
|
||||
type: reftest
|
||||
expected:
|
||||
if os == "linux": FAIL
|
|
@ -1,4 +0,0 @@
|
|||
[css3-text-line-break-jazh-251.htm]
|
||||
type: reftest
|
||||
expected:
|
||||
if os == "linux": FAIL
|
|
@ -1,4 +0,0 @@
|
|||
[css3-text-line-break-jazh-252.htm]
|
||||
type: reftest
|
||||
expected:
|
||||
if os == "linux": FAIL
|
|
@ -1,4 +0,0 @@
|
|||
[css3-text-line-break-jazh-254.htm]
|
||||
type: reftest
|
||||
expected:
|
||||
if os == "linux": FAIL
|
|
@ -1,4 +0,0 @@
|
|||
[css3-text-line-break-jazh-256.htm]
|
||||
type: reftest
|
||||
expected:
|
||||
if os == "linux": FAIL
|
|
@ -1,4 +0,0 @@
|
|||
[css3-text-line-break-jazh-257.htm]
|
||||
type: reftest
|
||||
expected:
|
||||
if os == "linux": FAIL
|
|
@ -1,4 +0,0 @@
|
|||
[css3-text-line-break-jazh-258.htm]
|
||||
type: reftest
|
||||
expected:
|
||||
if os == "linux": FAIL
|
|
@ -1,3 +1,4 @@
|
|||
[css3-text-line-break-jazh-259.htm]
|
||||
type: reftest
|
||||
expected: FAIL
|
||||
expected:
|
||||
if os == "mac": FAIL
|
||||
|
|
|
@ -1,4 +0,0 @@
|
|||
[css3-text-line-break-jazh-302.htm]
|
||||
type: reftest
|
||||
expected:
|
||||
if os == "linux": FAIL
|
|
@ -1,4 +0,0 @@
|
|||
[css3-text-line-break-jazh-303.htm]
|
||||
type: reftest
|
||||
expected:
|
||||
if os == "linux": FAIL
|
|
@ -1,4 +0,0 @@
|
|||
[css3-text-line-break-jazh-304.htm]
|
||||
type: reftest
|
||||
expected:
|
||||
if os == "linux": FAIL
|
|
@ -1,4 +0,0 @@
|
|||
[css3-text-line-break-jazh-306.htm]
|
||||
type: reftest
|
||||
expected:
|
||||
if os == "linux": FAIL
|
|
@ -1,4 +0,0 @@
|
|||
[css3-text-line-break-jazh-308.htm]
|
||||
type: reftest
|
||||
expected:
|
||||
if os == "linux": FAIL
|
|
@ -1,4 +0,0 @@
|
|||
[css3-text-line-break-jazh-309.htm]
|
||||
type: reftest
|
||||
expected:
|
||||
if os == "linux": FAIL
|
|
@ -1,4 +0,0 @@
|
|||
[css3-text-line-break-jazh-310.htm]
|
||||
type: reftest
|
||||
expected:
|
||||
if os == "linux": FAIL
|
|
@ -1,4 +0,0 @@
|
|||
[css3-text-line-break-jazh-311.htm]
|
||||
type: reftest
|
||||
expected:
|
||||
if os == "linux": FAIL
|
|
@ -1,4 +0,0 @@
|
|||
[css3-text-line-break-jazh-312.htm]
|
||||
type: reftest
|
||||
expected:
|
||||
if os == "linux": FAIL
|
|
@ -1,4 +0,0 @@
|
|||
[css3-text-line-break-jazh-313.htm]
|
||||
type: reftest
|
||||
expected:
|
||||
if os == "linux": FAIL
|
|
@ -1,4 +0,0 @@
|
|||
[css3-text-line-break-jazh-314.htm]
|
||||
type: reftest
|
||||
expected:
|
||||
if os == "linux": FAIL
|
|
@ -1,4 +0,0 @@
|
|||
[css3-text-line-break-jazh-315.htm]
|
||||
type: reftest
|
||||
expected:
|
||||
if os == "linux": FAIL
|
|
@ -1,4 +0,0 @@
|
|||
[css3-text-line-break-jazh-316.htm]
|
||||
type: reftest
|
||||
expected:
|
||||
if os == "linux": FAIL
|
|
@ -1,4 +0,0 @@
|
|||
[css3-text-line-break-jazh-317.htm]
|
||||
type: reftest
|
||||
expected:
|
||||
if os == "linux": FAIL
|
|
@ -1,4 +0,0 @@
|
|||
[css3-text-line-break-jazh-319.htm]
|
||||
type: reftest
|
||||
expected:
|
||||
if os == "linux": FAIL
|
|
@ -1,4 +0,0 @@
|
|||
[css3-text-line-break-jazh-320.htm]
|
||||
type: reftest
|
||||
expected:
|
||||
if os == "linux": FAIL
|
|
@ -1,4 +0,0 @@
|
|||
[css3-text-line-break-jazh-322.htm]
|
||||
type: reftest
|
||||
expected:
|
||||
if os == "linux": FAIL
|
|
@ -1,4 +0,0 @@
|
|||
[css3-text-line-break-jazh-324.htm]
|
||||
type: reftest
|
||||
expected:
|
||||
if os == "linux": FAIL
|
|
@ -1,4 +0,0 @@
|
|||
[css3-text-line-break-jazh-325.htm]
|
||||
type: reftest
|
||||
expected:
|
||||
if os == "linux": FAIL
|
|
@ -1,4 +0,0 @@
|
|||
[css3-text-line-break-jazh-326.htm]
|
||||
type: reftest
|
||||
expected:
|
||||
if os == "linux": FAIL
|
|
@ -1,3 +1,4 @@
|
|||
[css3-text-line-break-jazh-327.htm]
|
||||
type: reftest
|
||||
expected: FAIL
|
||||
expected:
|
||||
if os == "mac": FAIL
|
||||
|
|
|
@ -1,4 +0,0 @@
|
|||
[css3-text-line-break-jazh-404.htm]
|
||||
type: reftest
|
||||
expected:
|
||||
if os == "linux": FAIL
|
|
@ -1,4 +0,0 @@
|
|||
[css3-text-line-break-jazh-406.htm]
|
||||
type: reftest
|
||||
expected:
|
||||
if os == "linux": FAIL
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue