Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

hard check macOS version for feature settings #335

Merged
merged 1 commit into from Nov 11, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 4 additions & 2 deletions drawBot/context/baseContext.py
Expand Up @@ -8,6 +8,7 @@
from fontTools.pens.basePen import BasePen

from drawBot.misc import DrawBotError, cmyk2rgb, warnings, transformationAtCenter
from drawBot.macOSVersion import macOSVersion

from .tools import openType
from .tools import variation
Expand Down Expand Up @@ -1151,8 +1152,9 @@ def append(self, txt, **kwargs):
fontAttributes = {}
if coreTextFontFeatures:
fontAttributes[CoreText.kCTFontFeatureSettingsAttribute] = coreTextFontFeatures
# fallback for macOS < 10.13:
fontAttributes[CoreText.NSFontFeatureSettingsAttribute] = nsFontFeatures
if macOSVersion < "10.13":
# fallback for macOS < 10.13:
fontAttributes[CoreText.NSFontFeatureSettingsAttribute] = nsFontFeatures
if coreTextFontVariations:
fontAttributes[CoreText.NSFontVariationAttribute] = coreTextFontVariations
if self._fallbackFont:
Expand Down