How to change the default font on iOS with Objective-C.

Sometimes your application with PlugPDF SDK  does not display your native language or some special characters because our default font may not support some languages and special characters. Also, you may do not like our default font style.

So, we will see a simple way how to change the default font on PlugPDF SDK for iOS.

 

Adding your font

First of all, you need to prepare a font file you wan to use.

Choose the Build phase > Copy Bundle Resources and then press on the + button as shown in the figure below.  

buildphase   

Select your font file.

font

The below is shown the font file is added.

copybundle

 

Set the font

Now,we are ready to change the default font.

This code snippet enables you can set the font.

The default font can be set within the AppDelegate.m file by calling the PlugPDFInit function from the didFinishLaunchingWithOptions method.

 

0 replies

Leave a Reply

Want to join the discussion?
Feel free to contribute!

Leave a Reply

Your email address will not be published. Required fields are marked *