MacPDF: Make pdfs without embedded fonts work again

A prior change removed some (very hacky) code needed for this
This commit is contained in:
Nico Weber 2023-09-21 22:06:35 -04:00 committed by Andreas Kling
parent 87f31cab70
commit f5e81c8a99
2 changed files with 8 additions and 0 deletions

View file

@ -5,7 +5,10 @@
// Created by Nico Weber on 7/22/23.
//
// Several AK types conflict with MacOS types.
#define FixedPoint FixedPointMacOS
#import <Cocoa/Cocoa.h>
#undef FixedPoint
@interface AppDelegate : NSObject <NSApplicationDelegate>

View file

@ -7,6 +7,8 @@
#import "AppDelegate.h"
#include <LibGfx/Font/FontDatabase.h>
@interface AppDelegate ()
@property (strong) IBOutlet NSWindow* window;
@ -17,6 +19,9 @@
- (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