mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 22:17:43 +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
|
@ -5,7 +5,10 @@
|
||||||
// Created by Nico Weber on 7/22/23.
|
// Created by Nico Weber on 7/22/23.
|
||||||
//
|
//
|
||||||
|
|
||||||
|
// Several AK types conflict with MacOS types.
|
||||||
|
#define FixedPoint FixedPointMacOS
|
||||||
#import <Cocoa/Cocoa.h>
|
#import <Cocoa/Cocoa.h>
|
||||||
|
#undef FixedPoint
|
||||||
|
|
||||||
@interface AppDelegate : NSObject <NSApplicationDelegate>
|
@interface AppDelegate : NSObject <NSApplicationDelegate>
|
||||||
|
|
||||||
|
|
|
@ -7,6 +7,8 @@
|
||||||
|
|
||||||
#import "AppDelegate.h"
|
#import "AppDelegate.h"
|
||||||
|
|
||||||
|
#include <LibGfx/Font/FontDatabase.h>
|
||||||
|
|
||||||
@interface AppDelegate ()
|
@interface AppDelegate ()
|
||||||
|
|
||||||
@property (strong) IBOutlet NSWindow* window;
|
@property (strong) IBOutlet NSWindow* window;
|
||||||
|
@ -17,6 +19,9 @@
|
||||||
- (void)applicationDidFinishLaunching:(NSNotification*)aNotification
|
- (void)applicationDidFinishLaunching:(NSNotification*)aNotification
|
||||||
{
|
{
|
||||||
// Insert code here to initialize your application
|
// 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
|
- (void)applicationWillTerminate:(NSNotification*)aNotification
|
Loading…
Add table
Add a link
Reference in a new issue