From fa0cc1b86a2cba7ff1407a0ddd849f5ac9fc3bda Mon Sep 17 00:00:00 2001 From: Robin Linden Date: Mon, 20 Nov 2023 02:17:54 +0100 Subject: [PATCH] browser/gui: Use SFML for text measurements when layouting --- browser/gui/BUILD | 1 + browser/gui/app.h | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/browser/gui/BUILD b/browser/gui/BUILD index 1cd1c6e3..067cb14f 100644 --- a/browser/gui/BUILD +++ b/browser/gui/BUILD @@ -20,6 +20,7 @@ cc_binary( "//os:system_info", "//protocol", "//render", + "//type:sfml", "//uri", "//util:history", "@fmt", diff --git a/browser/gui/app.h b/browser/gui/app.h index ec3bf0bc..49df1667 100644 --- a/browser/gui/app.h +++ b/browser/gui/app.h @@ -11,6 +11,7 @@ #include "gfx/sfml_canvas.h" #include "layout/layout_box.h" #include "protocol/handler_factory.h" +#include "type/sfml.h" #include "uri/uri.h" #include "util/history.h" @@ -35,7 +36,8 @@ class App final { private: // Latest Firefox ESR user agent (on Windows). This matches what the Tor browser does. engine::Engine engine_{protocol::HandlerFactory::create( - "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Firefox/102.0")}; + "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Firefox/102.0"), + std::make_unique()}; bool page_loaded_{}; std::string browser_title_{};