mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
layout: Don't default to fallback fonts for spaces (#32442)
Previously, when deciding the font for a space, preference was given to the previous used font. This could means that the font chosen was a fallback font instead of the first font that supporting the space character in the font preference list. This caused an issue rendering emojis surrounded by spaces with "Noto Color Emoji" which has a space character the same size as the emoji, leading to too much spacing between them. Co-authored-by: Rakhi Sharma <atbrakhi@igalia.com>
This commit is contained in:
parent
49e15269c9
commit
6eaccbc297
3 changed files with 1 additions and 5 deletions
|
@ -386,7 +386,7 @@ fn char_prevents_soft_wrap_opportunity_when_before_or_after_atomic(character: ch
|
|||
/// character are not rendered at all, so it doesn't matter what font we use to render them. They
|
||||
/// should just be added to the current segment.
|
||||
fn char_does_not_change_font(character: char) -> bool {
|
||||
if character.is_whitespace() || character.is_control() {
|
||||
if character.is_control() {
|
||||
return true;
|
||||
}
|
||||
if character == '\u{00A0}' {
|
||||
|
|
|
@ -1,2 +0,0 @@
|
|||
[fonts-012.xht]
|
||||
expected: FAIL
|
|
@ -1,2 +0,0 @@
|
|||
[font-face-unicode-range-2.html]
|
||||
expected: FAIL
|
Loading…
Add table
Add a link
Reference in a new issue