mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 11:07:45 +00:00
MacPDF: Make pdfs without embedded fonts work again
A prior change removed some (very hacky) code needed for this
This commit is contained in:
parent
87f31cab70
commit
f5e81c8a99
2 changed files with 8 additions and 0 deletions
37
Meta/Lagom/Contrib/MacPDF/AppDelegate.mm
Normal file
37
Meta/Lagom/Contrib/MacPDF/AppDelegate.mm
Normal file
|
@ -0,0 +1,37 @@
|
|||
//
|
||||
// AppDelegate.m
|
||||
// SerenityPDF
|
||||
//
|
||||
// Created by Nico Weber on 7/22/23.
|
||||
//
|
||||
|
||||
#import "AppDelegate.h"
|
||||
|
||||
#include <LibGfx/Font/FontDatabase.h>
|
||||
|
||||
@interface AppDelegate ()
|
||||
|
||||
@property (strong) IBOutlet NSWindow* window;
|
||||
@end
|
||||
|
||||
@implementation AppDelegate
|
||||
|
||||
- (void)applicationDidFinishLaunching:(NSNotification*)aNotification
|
||||
{
|
||||
// Insert code here to initialize your application
|
||||
// FIXME: copy the fonts to the bundle or something
|
||||
auto source_root = DeprecatedString("/Users/thakis/src/serenity");
|
||||
Gfx::FontDatabase::set_default_fonts_lookup_path(DeprecatedString::formatted("{}/Base/res/fonts", source_root));
|
||||
}
|
||||
|
||||
- (void)applicationWillTerminate:(NSNotification*)aNotification
|
||||
{
|
||||
// Insert code here to tear down your application
|
||||
}
|
||||
|
||||
- (BOOL)applicationSupportsSecureRestorableState:(NSApplication*)app
|
||||
{
|
||||
return YES;
|
||||
}
|
||||
|
||||
@end
|
Loading…
Add table
Add a link
Reference in a new issue