Skip to content

Commit f5f2a5c

Browse files
committed
Update ignore, add installer to the backend
1 parent 30051ce commit f5f2a5c

File tree

5 files changed

+11
-15
lines changed

5 files changed

+11
-15
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,4 @@ Source/config.h
1414
Source/libgnustep*Info.plist
1515
Tools/XGCommonFont.m
1616
Tools/xdnd.c
17+
*~

Headers/fontconfig/FCFontAssetInstaller.h

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -26,18 +26,9 @@
2626
#define FCFONTASSETINSTALLER_H
2727

2828
#import <Foundation/NSObject.h>
29+
#import <GNUstepGUI/GSFontAssetInstaller.h>
2930

30-
@interface FCFontAssetInstaller : NSObject
31-
{
32-
NSString *_fontPath;
33-
}
34-
35-
- (instancetype) initWithFontPath: (NSString *)path;
36-
- (BOOL) validateFontError: (NSError **)error;
37-
- (BOOL) installFontError: (NSError **)error;
38-
- (NSString *) systemFontsDirectory;
39-
- (NSString *) userFontsDirectory;
40-
31+
@interface FCFontAssetInstaller : GSFontAssetInstaller
4132
@end
4233

4334
#endif

Source/cairo/CairoContext.m

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@
3636
#include "cairo/CairoPDFSurface.h"
3737
#include "cairo/CairoFontInfo.h"
3838
#include "cairo/CairoFontEnumerator.h"
39+
#include "cairo/CairoFontAssetInstaller.h"
40+
3941
#include "config.h"
4042

4143
#define CGSTATE ((CairoGState *)gstate)
@@ -88,6 +90,7 @@ + (void) initializeBackend
8890

8991
[GSFontEnumerator setDefaultClass: [CairoFontEnumerator class]];
9092
[GSFontInfo setDefaultClass: [CairoFontInfo class]];
93+
[GSFontAssetInstaller setDefaultClass: [CairoFontAssetInstaller class]];
9194
}
9295

9396
+ (Class) GStateClass

Source/cairo/GNUmakefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ cairo_OBJC_FILES = CairoSurface.m \
3434
CairoGState.m \
3535
CairoContext.m \
3636
CairoFontEnumerator.m \
37+
CairoFontAssetInstaller.m \
3738
CairoFaceInfo.m \
3839
CairoPSSurface.m \
3940
CairoPDFSurface.m \

Source/fontconfig/FCFontAssetInstaller.m

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -244,8 +244,8 @@ - (NSString *) userFontsDirectory
244244
if ([osName isEqualToString: @"NSWindowsNTOperatingSystem"]
245245
|| [osName isEqualToString: @"NSWindows95OperatingSystem"])
246246
{
247-
NSString *winDir = [NSString stringWithUTF8String: getenv("USERPROFILE")];
248-
fontsPath = [winDir stringByAppendingPathComponent: @"Fonts"];
247+
NSString *dir = [NSString stringWithUTF8String: getenv("USERPROFILE")];
248+
fontsPath = [dir stringByAppendingPathComponent: @"Fonts"];
249249
}
250250
else if ([osName isEqualToString: @"NSMACHOperatingSystem"])
251251
{
@@ -276,8 +276,8 @@ - (NSString *) systemFontsDirectory
276276
if ([osName isEqualToString: @"NSWindowsNTOperatingSystem"]
277277
|| [osName isEqualToString: @"NSWindows95OperatingSystem"])
278278
{
279-
NSString *winDir = [NSString stringWithUTF8String: getenv("WINDIR")];
280-
fontsPath = [winDir stringByAppendingPathComponent: @"Fonts"];
279+
NSString *dir = [NSString stringWithUTF8String: getenv("WINDIR")];
280+
fontsPath = [dir stringByAppendingPathComponent: @"Fonts"];
281281
}
282282
else if ([osName isEqualToString: @"NSMACHOperatingSystem"])
283283
{

0 commit comments

Comments
 (0)