<tfoot id='NAZYK'></tfoot>

      <bdo id='NAZYK'></bdo><ul id='NAZYK'></ul>
  • <i id='NAZYK'><tr id='NAZYK'><dt id='NAZYK'><q id='NAZYK'><span id='NAZYK'><b id='NAZYK'><form id='NAZYK'><ins id='NAZYK'></ins><ul id='NAZYK'></ul><sub id='NAZYK'></sub></form><legend id='NAZYK'></legend><bdo id='NAZYK'><pre id='NAZYK'><center id='NAZYK'></center></pre></bdo></b><th id='NAZYK'></th></span></q></dt></tr></i><div id='NAZYK'><tfoot id='NAZYK'></tfoot><dl id='NAZYK'><fieldset id='NAZYK'></fieldset></dl></div>
    <legend id='NAZYK'><style id='NAZYK'><dir id='NAZYK'><q id='NAZYK'></q></dir></style></legend>

        <small id='NAZYK'></small><noframes id='NAZYK'>

        我可以在包中嵌入自定义字体并从 ios 框架访问它吗?

        Can I embed a custom font in a bundle and access it from an ios framework?(我可以在包中嵌入自定义字体并从 ios 框架访问它吗?)

      1. <small id='ankHY'></small><noframes id='ankHY'>

          <tbody id='ankHY'></tbody>

          • <legend id='ankHY'><style id='ankHY'><dir id='ankHY'><q id='ankHY'></q></dir></style></legend>

            1. <tfoot id='ankHY'></tfoot>

                <i id='ankHY'><tr id='ankHY'><dt id='ankHY'><q id='ankHY'><span id='ankHY'><b id='ankHY'><form id='ankHY'><ins id='ankHY'></ins><ul id='ankHY'></ul><sub id='ankHY'></sub></form><legend id='ankHY'></legend><bdo id='ankHY'><pre id='ankHY'><center id='ankHY'></center></pre></bdo></b><th id='ankHY'></th></span></q></dt></tr></i><div id='ankHY'><tfoot id='ankHY'></tfoot><dl id='ankHY'><fieldset id='ankHY'></fieldset></dl></div>
                  <bdo id='ankHY'></bdo><ul id='ankHY'></ul>
                  本文介绍了我可以在包中嵌入自定义字体并从 ios 框架访问它吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  限时送ChatGPT账号..

                  我正在创建一个 ios framework 及其 bundle 用于打包资源(笔尖、图像、字体),并且我正在尝试嵌入 自定义字体 在捆绑包中,但我无法从框架中加载它,这可能吗?

                  I'm creating an ios framework with its bundle for packaging ressources (nib, images, fonts) and I'm trying to embed a custom font in the bundle but I'm not able to load it from the framework, is it possible ?

                  1) 我可以用这个本地化字体文件:<代码>objcNSString *fontPath = [[NSBundle frameworkBundle] pathForResource:@"MyCustomFont" ofType:@"ttf"];2)但我无法在我的字体列表中得到它:<代码>objcNSArray * 数组 = [UIFont familyNames];我将我的字体名称与应用程序提供的字体"一起包含在捆绑的 plist 中,但没有成功,也在应用程序信息 plist 中尝试过,将其包含在框架资源中但没有成功.

                  1) I can localize the font file with this: objc NSString *fontPath = [[NSBundle frameworkBundle] pathForResource:@"MyCustomFont" ofType:@"ttf"]; 2) But I can't get it in my fonts lists: objc NSArray * array = [UIFont familyNames]; I included my font name in the bundle's plist with a "Fonts provided by application", without success, tried also in the app info plist, include it in the framework ressource without success.

                  我可以从包中加载笔尖和图像(通过以包的名称为前缀),但不能加载字体.有什么想法吗?

                  I can load the nib and images from the bundle (by prefixing with the bundle's name) but not for the font. Any thought ?

                  我看到了以下帖子:我可以在 iPhone 应用程序中嵌入自定义字体吗?,但问题只是我可以在 iPhone 应用程序中嵌入自定义字体吗?"不是我可以在外部框架/包中嵌入自定义字体吗?"它还引用了一个有趣的动态加载,但它使用的是私有 api,这对于框架来说不是可用的解决方案.

                  EDIT : I saw the following post : Can I embed a custom font in an iPhone application?, but the question is just "Can I embed a custom font in an iPhone application?" not "Can I embed a custom font in an external framework/bundle ?" It also makes references to a dynamic loading which is interesting but it is using private api, which is not usable solution for a framework.

                  谢谢

                  推荐答案

                  这是一种新方法,可让您动态加载字体而无需将它们放入 Info.plist:http://www.marco.org/2012/12/21/ios-dynamic-font-loading

                  This is a new method that lets you load fonts dynamically without putting them in your Info.plist: http://www.marco.org/2012/12/21/ios-dynamic-font-loading

                  这篇关于我可以在包中嵌入自定义字体并从 ios 框架访问它吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  iOS 6 rotations: supportedInterfaceOrientations doesn#180;t work?(iOS 6 旋转:supportedInterfaceOrientations 不起作用?)
                  CABasicAnimation rotate returns to original position(CABasicAnimation 旋转返回原始位置)
                  UITabBarController Rotation Issues in ios 6(ios 6 中的 UITabBarController 旋转问题)
                  iOS: How to run a function after Device has Rotated (Swift)(iOS:设备旋转后如何运行函数(Swift))
                  How to rotate an image 90 degrees on iOS?(如何在 iOS 上将图像旋转 90 度?)
                  iOS 8 Rotation Methods Deprecation - Backwards Compatibility(iOS 8 旋转方法弃用 - 向后兼容性)
                  1. <i id='hDAnr'><tr id='hDAnr'><dt id='hDAnr'><q id='hDAnr'><span id='hDAnr'><b id='hDAnr'><form id='hDAnr'><ins id='hDAnr'></ins><ul id='hDAnr'></ul><sub id='hDAnr'></sub></form><legend id='hDAnr'></legend><bdo id='hDAnr'><pre id='hDAnr'><center id='hDAnr'></center></pre></bdo></b><th id='hDAnr'></th></span></q></dt></tr></i><div id='hDAnr'><tfoot id='hDAnr'></tfoot><dl id='hDAnr'><fieldset id='hDAnr'></fieldset></dl></div>

                    • <small id='hDAnr'></small><noframes id='hDAnr'>

                        <tbody id='hDAnr'></tbody>
                      <legend id='hDAnr'><style id='hDAnr'><dir id='hDAnr'><q id='hDAnr'></q></dir></style></legend>
                          <bdo id='hDAnr'></bdo><ul id='hDAnr'></ul>
                          <tfoot id='hDAnr'></tfoot>