diff --git a/Ladybird/Headless/Application.cpp b/Ladybird/Headless/Application.cpp index cb89647a2fd..bd63c3f6122 100644 --- a/Ladybird/Headless/Application.cpp +++ b/Ladybird/Headless/Application.cpp @@ -47,6 +47,9 @@ void Application::create_platform_options(WebView::ChromeOptions& chrome_options if (is_layout_test_mode) { // Allow window.open() to succeed for tests. chrome_options.allow_popups = WebView::AllowPopups::Yes; + + // Ensure consistent font rendering between operating systems. + web_content_options.force_fontconfig = WebView::ForceFontconfig::Yes; } if (dump_gc_graph) { diff --git a/Ladybird/Headless/CMakeLists.txt b/Ladybird/Headless/CMakeLists.txt index 14b28d233ec..cf914cdb53c 100644 --- a/Ladybird/Headless/CMakeLists.txt +++ b/Ladybird/Headless/CMakeLists.txt @@ -14,6 +14,6 @@ target_link_libraries(headless-browser PRIVATE ${LADYBIRD_LIBS} LibDiff) if (BUILD_TESTING) add_test( NAME LibWeb - COMMAND $ --run-tests ${LADYBIRD_SOURCE_DIR}/Tests/LibWeb --dump-failed-ref-tests --force-fontconfig + COMMAND $ --run-tests ${LADYBIRD_SOURCE_DIR}/Tests/LibWeb --dump-failed-ref-tests ) endif()