aboutsummaryrefslogtreecommitdiff
path: root/devel/electron12/files/patch-third__party_pdfium_core_fxge_fx__ge__linux.cpp
blob: 6a61e117a2d4f136fbe30f3f4d8cbf38359c7aec (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
--- third_party/pdfium/core/fxge/fx_ge_linux.cpp.orig	2021-01-07 00:39:34 UTC
+++ third_party/pdfium/core/fxge/fx_ge_linux.cpp
@@ -16,7 +16,7 @@
 #include "core/fxge/systemfontinfo_iface.h"
 #include "third_party/base/stl_util.h"
 
-#if !defined(OS_LINUX) && !defined(OS_CHROMEOS) && !defined(OS_ASMJS)
+#if !defined(OS_LINUX) && !defined(OS_CHROMEOS) && !defined(OS_ASMJS) && !defined(OS_BSD)
 #error "Included on the wrong platform"
 #endif
 
@@ -165,10 +165,16 @@ class CLinuxPlatform : public CFX_GEModule::PlatformIf
   std::unique_ptr<SystemFontInfoIface> CreateDefaultSystemFontInfo() override {
     auto pInfo = std::make_unique<CFX_LinuxFontInfo>();
     if (!pInfo->ParseFontCfg(CFX_GEModule::Get()->GetUserFontPaths())) {
+#if defined(OS_BSD)
+      pInfo->AddPath("/usr/local/share/fonts");
+      pInfo->AddPath("/usr/local/share/X11/fonts/Type1");
+      pInfo->AddPath("/usr/local/share/X11/fonts/TTF");
+#else
       pInfo->AddPath("/usr/share/fonts");
       pInfo->AddPath("/usr/share/X11/fonts/Type1");
       pInfo->AddPath("/usr/share/X11/fonts/TTF");
-      pInfo->AddPath("/usr/local/share/fonts");
+      pInfo->AddPath("/usr/local/share/fonts")
+#endif
     }
     return pInfo;
   }