mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 23:57:34 +00:00
MacPDF: Load fonts via Core::Resource instead of filesystem paths
This commit is contained in:
parent
1af3da39fd
commit
4d039b05b2
1 changed files with 2 additions and 2 deletions
|
@ -6,7 +6,7 @@
|
||||||
|
|
||||||
#import "AppDelegate.h"
|
#import "AppDelegate.h"
|
||||||
|
|
||||||
#include <LibGfx/Font/FontDatabase.h>
|
#include <LibCore/ResourceImplementationFile.h>
|
||||||
|
|
||||||
@interface AppDelegate ()
|
@interface AppDelegate ()
|
||||||
@property (strong) IBOutlet NSWindow* window;
|
@property (strong) IBOutlet NSWindow* window;
|
||||||
|
@ -23,7 +23,7 @@
|
||||||
for (int i = 0; i < 7; ++i)
|
for (int i = 0; i < 7; ++i)
|
||||||
source_root = [source_root stringByDeletingLastPathComponent];
|
source_root = [source_root stringByDeletingLastPathComponent];
|
||||||
auto source_root_string = DeprecatedString([source_root UTF8String]);
|
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
|
- (void)applicationWillTerminate:(NSNotification*)aNotification
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue