Skip to content

Commit

Permalink
android: Trim whitespace around font filenames. (#32298)
Browse files Browse the repository at this point in the history
This is a speculative fix for #32161. A similar failure is
reproducible on the Android x86_64 emulator with API 35
system image. The fix has not been validated on the actual
device so potentially there might be other issues that need
to be fixed to complete #32161.

Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com>
  • Loading branch information
mukilan committed May 17, 2024
1 parent 903c516 commit c9ab743
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion components/gfx/platform/freetype/android/font_list.rs
Original file line number Diff line number Diff line change
Expand Up @@ -429,7 +429,7 @@ impl FontList {

fn text_content(nodes: &[Node]) -> Option<String> {
nodes.get(0).and_then(|child| match child {
Node::Text(contents) => Some(contents.clone()),
Node::Text(contents) => Some(contents.trim().into()),
Node::Element { .. } => None,
})
}
Expand Down

0 comments on commit c9ab743

Please sign in to comment.