android: Trim whitespace around font filenames. (#32298)

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>
This commit is contained in:
Mukilan Thiyagarajan 2024-05-17 09:45:10 +05:30 committed by GitHub
parent 903c516fb5
commit c9ab743c85
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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,
})
}