From 154e78b0c0dd90773489e13f66f7fdf647d4f015 Mon Sep 17 00:00:00 2001 From: Nate Weaver Date: Thu, 16 Apr 2020 15:40:14 -0500 Subject: [PATCH] Add a comment about why these constants differ between OSs --- .../Timeline/Cell/NSAttributedString+NetNewsWire.swift | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Mac/MainWindow/Timeline/Cell/NSAttributedString+NetNewsWire.swift b/Mac/MainWindow/Timeline/Cell/NSAttributedString+NetNewsWire.swift index dcc2605d5..bad680a91 100644 --- a/Mac/MainWindow/Timeline/Cell/NSAttributedString+NetNewsWire.swift +++ b/Mac/MainWindow/Timeline/Cell/NSAttributedString+NetNewsWire.swift @@ -92,6 +92,8 @@ extension NSAttributedString { if superscript != 0 { let font = mutable.attribute(.font, at: range.location, effectiveRange: nil) as! Font + // There's some discrepancy here: The raw value of AppKit's .typeIdentifier is UIKit's .featureIdentifier, + // and AppKit's .selectorIdentifier is UIKit's .typeIdentifier #if canImport(AppKit) let features: [FontDescriptor.FeatureKey: Any] = [.typeIdentifier: kVerticalPositionType, .selectorIdentifier: superscript > 0 ? kSuperiorsSelector : kInferiorsSelector] #else