Bladeren bron

MacPDF: Load fonts via Core::Resource instead of filesystem paths

Andrew Kaster 1 jaar geleden
bovenliggende
commit
4d039b05b2
1 gewijzigde bestanden met toevoegingen van 2 en 2 verwijderingen
  1. 2 2
      Meta/Lagom/Contrib/MacPDF/AppDelegate.mm

+ 2 - 2
Meta/Lagom/Contrib/MacPDF/AppDelegate.mm

@@ -6,7 +6,7 @@
 
 #import "AppDelegate.h"
 
-#include <LibGfx/Font/FontDatabase.h>
+#include <LibCore/ResourceImplementationFile.h>
 
 @interface AppDelegate ()
 @property (strong) IBOutlet NSWindow* window;
@@ -23,7 +23,7 @@
     for (int i = 0; i < 7; ++i)
         source_root = [source_root stringByDeletingLastPathComponent];
     auto source_root_string = DeprecatedString([source_root UTF8String]);
-    Gfx::FontDatabase::set_default_fonts_lookup_path(DeprecatedString::formatted("{}/Base/res/fonts", source_root_string));
+    Core::ResourceImplementation::install(make<Core::ResourceImplementationFile>(MUST(String::formatted("{}/Base/res", source_root_string))));
 }
 
 - (void)applicationWillTerminate:(NSNotification*)aNotification