Revision: 15099
http://sourceforge.net/p/skim-app/code/15099
Author: hofman
Date: 2025-04-07 15:46:44 +0000 (Mon, 07 Apr 2025)
Log Message:
-----------
UTI for NSPboardType should inherit from public.data
Modified Paths:
--------------
trunk/SKFontWell.m
Modified: trunk/SKFontWell.m
===================================================================
--- trunk/SKFontWell.m 2025-04-07 14:13:23 UTC (rev 15098)
+++ trunk/SKFontWell.m 2025-04-07 15:46:44 UTC (rev 15099)
@@ -46,7 +46,7 @@
#define SKNSFontPanelDescriptorsPboardType @"NSFontPanelDescriptorsPboardType"
#define SKNSFontPanelFamiliesPboardType @"NSFontPanelFamiliesPboardType"
-#define UTIForNSPboardType(type)
CFBridgingRelease(UTTypeCreatePreferredIdentifierForTag(kUTTagClassNSPboardType,
(__bridge CFStringRef)type, NULL))
+#define UTIForNSPboardType(type)
CFBridgingRelease(UTTypeCreatePreferredIdentifierForTag(kUTTagClassNSPboardType,
(__bridge CFStringRef)type, kUTTypeData))
#define SKNSFontCollectionFontDescriptors @"NSFontCollectionFontDescriptors"
#define SKFontWellWillBecomeActiveNotification
@"SKFontWellWillBecomeActiveNotification"
@@ -344,7 +344,7 @@
@try {
if ([type isEqualToString:SKNSFontPanelDescriptorsPboardType]) {
- NSData *data = [pboard dataForType:type] ?: [pboard
dataForType:UTIForNSPboardType(type)];
+ NSData *data = [pboard dataForType:type];
NSDictionary *dict = [data isKindOfClass:[NSData class]] ?
[NSKeyedUnarchiver unarchiveObjectWithData:data] : nil;
if ([dict isKindOfClass:[NSDictionary class]]) {
NSArray *fontDescriptors = [dict
objectForKey:SKNSFontCollectionFontDescriptors];
@@ -356,7 +356,7 @@
}
}
} else if ([type isEqualToString:SKNSFontPanelFamiliesPboardType]) {
- NSArray *families = [pboard propertyListForType:type] ?: [pboard
propertyListForType:UTIForNSPboardType(type)];
+ NSArray *families = [pboard propertyListForType:type];
NSString *family = ([families isKindOfClass:[NSArray class]] &&
[families count]) ? [families objectAtIndex:0] : nil;
if ([family isKindOfClass:[NSString class]])
droppedFont = [[NSFontManager sharedFontManager]
convertFont:[self font] toFamily:family];
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit