33207

Unable to add certain fonts in an iphone app

Question:

In my app i need to add two fonts:

Insight_screen_Regular-e and Insight_screen_Bold-e

I have dragged and dropped them in the ttf formats to the Xcode project resources folder. In the application-info.plist file I have added the key "Fonts provided by application" to a new row and then added two items for added fonts.Then i built the project.

Yet i am unable to access these fonts from the xib files. What might be the reason. Thanks in advance.

Answer1:

Read <a href="https://stackoverflow.com/a/2616101/463892" rel="nofollow">this answer</a>.

You're probably not using the right string in fontWithName:size:. You need to use the <em>PostScript</em> name of the font in fontWithName:size:, which you can find by opening the font in Font Book on OS X, selecting the font, and pressing cmd+I.

Answer2:

From .m File I am using custom font like this

btnPhotoLibrary.titleLabel.font = [UIFont fontWithName:@"Hand Of Sean" size:18];

<img alt="enter image description here" class="b-lazy" data-src="https://i.stack.imgur.com/pTvaq.png" data-original="https://i.stack.imgur.com/pTvaq.png" src="https://etrip.eimg.top/images/2019/05/07/timg.gif" />

Recommend

  • cant create handler inside thread that has not called looper.prepare
  • iPhone — MKReverseGeocoder.adminstrativeArea — getting state abbreviation
  • Font Awesome in Viewpager Previous Next
  • Eclipse dark color theme fixes
  • iOS custom UTI in UIDocumentPickerViewController initWithDocumentTypes
  • Is it possible to “shrink” a PdfPtable?
  • CFBundleDevelopmentRegion not works as expected
  • jquery validation - waiting for remote check to complete
  • New Firebase failed: First argument must be a valid firebase URL and the path can't contain “.”
  • JSON encode and decode on PHP
  • Building Qt project for C++11 standard
  • How do I display a dialog that asks the user multi-choice questıon using tkInter?
  • Unable to install Git-core+svn by MacPorts
  • Unable to decode certificate at client new X509Certificate2()
  • How to define and use opencv mat of user type
  • The plugin 'org.apache.maven.plugins:maven-jboss-as-plugin' does not exist or no valid ver
  • How to rebase a series of branches?
  • Xamarin Forms - UWP Fonts
  • Why value captured by reference in lambda is broken? [duplicate]
  • Launch Runnable Jar from Web Start
  • C# - Serializing and deserializing static member
  • Sending data from AppleScript to FileMaker records
  • Cassandra Data Model
  • Apache 2.4 - remove | delete | uninstall
  • Run Powershell script from inside other Powershell script with dynamic redirection to file
  • Windows forms listbox.selecteditem displaying “System.Data.DataRowView” instead of actual value
  • How to include full .NET prerequisite for Wix Burn installer
  • Unit Testing MVC Web Application in Visual Studio and Problem with QTAgent
  • Proper folder structure for lots of source files
  • Benchmarking RAM performance - UWP and C#
  • Load html files in TinyMce
  • How can I get HTML syntax highlighting in my editor for CakePHP?
  • Why joiner is not used after Sequence generator or Update statergy
  • coudnt use logback because of log4j
  • Getting Messege Twice Using IMvxMessenger
  • Is it possible to post an object from jquery to bottle.py?
  • Recursive/Hierarchical Query Using Postgres
  • UserPrincipal.Current returns apppool on IIS
  • Python/Django TangoWithDjango Models and Databases
  • Net Present Value in Excel for Grouped Recurring CF