File tree Expand file tree Collapse file tree 5 files changed +11
-15
lines changed Expand file tree Collapse file tree 5 files changed +11
-15
lines changed Original file line number Diff line number Diff line change @@ -14,3 +14,4 @@ Source/config.h
1414Source /libgnustep * Info.plist
1515Tools /XGCommonFont.m
1616Tools /xdnd.c
17+ * ~
Original file line number Diff line number Diff line change 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
Original file line number Diff line number Diff line change 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
Original file line number Diff line number Diff 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 \
Original file line number Diff line number Diff 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 {
You can’t perform that action at this time.
0 commit comments