<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 框架访问它吗?

        时间:2023-05-19

      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 框架访问它吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  上一篇:PastryKit 框架是什么? 下一篇:如何为 i386 和 x86_64 架构构建 Cocoa Touch 框架?

                  相关文章

                  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>

                  2. <small id='hDAnr'></small><noframes id='hDAnr'>

                    <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>