From c9ab743c85b2f8ba079b129ee4e2204ae5fe82db Mon Sep 17 00:00:00 2001 From: Mukilan Thiyagarajan Date: Fri, 17 May 2024 09:45:10 +0530 Subject: [PATCH] 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 --- components/gfx/platform/freetype/android/font_list.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/gfx/platform/freetype/android/font_list.rs b/components/gfx/platform/freetype/android/font_list.rs index 97276c35468..6e6b45c5ad7 100644 --- a/components/gfx/platform/freetype/android/font_list.rs +++ b/components/gfx/platform/freetype/android/font_list.rs @@ -429,7 +429,7 @@ impl FontList { fn text_content(nodes: &[Node]) -> Option { nodes.get(0).and_then(|child| match child { - Node::Text(contents) => Some(contents.clone()), + Node::Text(contents) => Some(contents.trim().into()), Node::Element { .. } => None, }) }