Revision: 16601
http://sourceforge.net/p/skim-app/code/16601
Author: hofman
Date: 2026-10-04 14:31:37 +0000 (Sun, 04 Oct 2026)
Log Message:
-----------
append /DA string when present
Modified Paths:
--------------
trunk/PDFAnnotation_SKExtensions.m
Modified: trunk/PDFAnnotation_SKExtensions.m
===================================================================
--- trunk/PDFAnnotation_SKExtensions.m 2026-10-03 17:57:16 UTC (rev 16600)
+++ trunk/PDFAnnotation_SKExtensions.m 2026-10-04 14:31:37 UTC (rev 16601)
@@ -478,13 +478,18 @@
}
if ([type isEqualToString:SKNFreeTextString]) {
[fdfString appendFDFName:SKFDFDefaultAppearanceKey];
- NSColor *color = [self fontColor];
- if ([[color colorSpace] colorSpaceModel] == NSGrayColorSpaceModel) {
- [[color colorUsingColorSpaceName:NSDeviceWhiteColorSpace]
getWhite:&g alpha:&a];
- [fdfString appendFormat:@"(/%@ %g Tf %g g)", [self fontName],
[self fontSize], g];
+ NSString *da = [self
valueForAnnotationKey:PDFAnnotationKeyDefaultAppearance];
+ if (da) {
+ [fdfString appendFormat:@"(%@)", da];
} else {
- [[color colorUsingColorSpaceName:NSDeviceRGBColorSpace] getRed:&r
green:&g blue:&b alpha:&a];
- [fdfString appendFormat:@"(/%@ %g Tf %g %g %g rg)", [self
fontName], [self fontSize], r, g, b];
+ NSColor *color = [self fontColor];
+ if ([[color colorSpace] colorSpaceModel] == NSGrayColorSpaceModel)
{
+ [[color colorUsingColorSpaceName:NSDeviceWhiteColorSpace]
getWhite:&g alpha:&a];
+ [fdfString appendFormat:@"(/%@ %g Tf %g g)", [self fontName],
[self fontSize], g];
+ } else {
+ [[color colorUsingColorSpaceName:NSDeviceRGBColorSpace]
getRed:&r green:&g blue:&b alpha:&a];
+ [fdfString appendFormat:@"(/%@ %g Tf %g %g %g rg)", [self
fontName], [self fontSize], r, g, b];
+ }
}
[fdfString appendFDFName:SKFDFAnnotationAlignmentKey];
[fdfString appendFormat:@" %ld",
(long)SKFDFFreeTextAnnotationAlignmentFromPDFFreeTextAnnotationAlignment([self
alignment])];
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