site_archiver@lists.apple.com Delivered-To: pro-apps-dev@lists.apple.com Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=hgGRxV 1KZNrDsJpjfOiRc3+ND+B2a9PKRo7ZLCVPXM4=; b=AsWa8RaYl6nAq5DWdptLq2 Z6ximY863b8ARv9bCdXqNPTlYrmvpL6xTGiV73RlyQ8IxgUAjXLWL9EGfIlZC/61 T8dOKR+8SjWo0+0goChW28zThGWqqe7h9bWdrkVymt2vEUieH0AOOddT9KUZ6fkZ bRe2O04z8xeVgvHmOjX/cc//fYRS88EwwnnHFxLgedy98ZEcb2231M+0EGWh3vSV LlmUnxIxVVeCz6h4L+6b06Cep6vOtNm8mO123OccgZEDa6tjSPf4y3IYaALHHa94 ulka3RJVAY11+UWHIO4CPtXnO4a4eugQbc/tlSgnJoBOiNXKm/KC17biVMwWRtBA == Thanks Darrin! I'm using that method for actual plugins, but... If all I'm distributing is a Titles pack to be used in FCPX (doesn't require an FXPlug) but it has custom fonts, do you recommend compiling some sort of a "dummy" FXPlug that just provides the fonts or should I just be copying the fonts to the user's "/Users/username/Library/Fonts" directory (possibly posing issues if they already have the font installed). Is there a better place to copy fonts for a specific Motion project that is only a Titles or Generator template made for FCPX and not an actual plugin? Thanks!! Fred On Thu, Sep 28, 2017, at 02:19 PM, Darrin Cardani wrote:
Fred,
I’m not entirely sure I understand all your needs here. If you just need the font for your own plug-in, you can load it from your plug- in’s bundle in its Fonts directory like this:>
NSBundle *bundle = [NSBundle bundleWithIdentifier: @"com.apple.motion.TextFramework"]; NSArray *fontPaths = [bundle pathsForResourcesOfType:nil inDirectory:@"Fonts"]; for (NSString *fontPath in fontPaths) { CFURLRef url = CFURLCreateWithFileSystemPath(NULL, (CFStringRef)fontPath, kCFURLPOSIXPathStyle, false); if (url) { CFErrorRef error = NULL; bool succ = CTFontManagerRegisterFontsForURL(url, kCTFontManagerScopeProcess, &error);
if (!succ) { //Handle the error here } CFRelease(url); } }> That’s the code we use to load custom fonts from Motion’s TextFramework bundle that lives inside the app. (You’ll obviously want to load from your own bundle, not from Motion's TextFramework bundle.)> I’m not sure what the implications would be if the plug-in was loaded out-of-process, as we hope to be able to do one day. If you’re just using the fonts for rendering, I think that would be fine. But if the user wants to be able to use the fonts in other ways within the app, they won’t show up in the app’s UI if the plug-in is out-of-process. But of course, that’s not how it works today, so probably not a problem for the near term.> Darrin
On Sep 28, 2017, at 12:56 PM, fnelson@clemuniversity.com wrote:
I'm curious as to the recommended method of including fonts with a pluging (especially one that's Motion only). Having an installer install>> to the user directory's font directory can sometimes pose issues if it's>> installed somewhere else like the system font directory. Do you recommend compiling a .app just to provide the fonts? Thanks for any>> suggestions!
Fred _______________________________________________ Do not post admin requests to the list. They will be ignored. Pro-apps-dev mailing list (Pro-apps-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/pro-apps-dev/dcardani%40apple.com>> This email sent to dcardani@apple.com
_______________________________________________ Do not post admin requests to the list. They will be ignored. Pro-apps-dev mailing list (Pro-apps-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/pro-apps-dev/site_archiver%40lists.a... This email sent to site_archiver@lists.apple.com
participants (1)
-
Fred