[TIMOB-13720] CLI: iOS: /Resources/fonts/ directory is ignored with new tiapp.xml <ios> directive
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Low |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2013-05-20T22:00:23.000+0000 |
Affected Version/s | Release 3.1.0 |
Fix Version/s | n/a |
Components | CLI |
Labels | documentation, regression |
Reporter | Shannon Hicks |
Assignee | Chris Barber |
Created | 2013-04-08T15:18:42.000+0000 |
Updated | 2017-03-21T19:06:05.000+0000 |
Description
*Problem description*
If you have a /Resources/fonts/ directory with custom fonts in it, and define those fonts in tiapp.xml 's new directive, the fonts directory is not copied over to the build.
*Test case*
<ios>
<min-ios-ver>4.3</min-ios-ver>
<plist>
<dict>
<key>UIStatusBarStyle</key>
<string>UIStatusBarStyleBlackOpaque</string>
<key>UIAppFonts</key>
<array>
<string>/fonts/MyFont_1.otf</string>
<string>/fonts/MyFont_2.ttf</string>
</array>
</dict>
</plist>
</ios>
*Workaround*
If you copy the fonts/ directory to /platform/iphone/ and /platform/android/ they are included in the build.
Just some thoughts if you're around before we test this... So if you *don't* define those fonts with UIAppFonts, the Resources/fonts/ directory is copied to the build as expected? I'd think this is expected behavior anyway, since the
According to the docs ([http://docs.appcelerator.com/titanium/latest/#!/guide/Custom_Fonts]), you need a custom info.plist... I would have assumed that using the new
I'm 99% sure it's expected behavior that you should include the fonts directory in the /iphone directory anyway. Do you have any problems with this? About the docs... So you'd like the docs to be updated to describe adding fonts with the new
Well, the bottom line is that we need accurate instructions on how to use custom fonts, regardless of what those instructions are. You've now mentioned a second "expected", yet undocumented behavior... the need to put fonts in the /iphone directory. [Using the custom font](http://docs.appcelerator.com/titanium/latest/#!/guide/Custom_Fonts-section-29004935_CustomFonts-Usingthecustomfont): {quote} 2. Copy the TTF/OTF file to the Resources/fonts/ directory. If you want to use different fonts on iOS than Android, you can copy those files to Resources/iphone/fonts and Resources/android/fonts instead. {quote} So, if the documentation is all wrong, then it needs to get fixed in 3.1.1. If there's an actual Ti SDK bug, well, ditto.
Ah I see. I'll get our team to look at it from the platform side first. Thanks.
This has been fixed by TIMOB-13859. In TIMOB-13859, there was a bug with files not being symlinked properly, some files being copied twice, and some files not copied at all. Turns out that the fix for TIMOB-13859 also fixes this ticket. :) TIMOB-13859 was merged into master and 3_1_X and will be available in 3.1.1.GA.
Closing ticket as fixed.