Knowledge Base - Add your own fonts (iOS)

This article shows how to add custom fonts:

In PDFVGlobal.m you can add or mapping fonts in APP_Init method.

If you're using CALayer's version edit RDVGlobal.m instead of PDFVGlobal.m

For example, to add a custom font you should call Global_fontfileListAdd method, in this way:

fpath = [[NSBundle mainBundle] pathForResource:@"arimo.ttf" ofType:nil inDirectory:@"fdat"];

 

Global_fontfileListAdd( [fpath UTF8String] );

 

Where "arimo.ttf" should be your custom font.

You can simply add your font to fdat directory and call Global_fontfileListAdd at the end of other font added in APP_Init method.

 

To do a font mapping, you should use Global_fontfileMapping method.

For example you can call: 

Global_fontfileMapping("Arial""Arimo");

 

This will allow you to use you custom font (in this case "Arimo") instead of another font (in this case "Arial").

You can simply add your font to fdat directory and call Global_fontfileMapping at the end of other font mapping in APP_Init method.

If you want to do the font mapping with your custom font, you also have to add it previously.

Applies To

RadaeePDF SDK for iOS

Related Articles

Wrong fonts' rendering and adding your own fonts (Android)

Wrong fonts' rendering (iOS)

Details

Created : 2016-09-12 09:57:21, Last Modified : 2019-07-08 11:06:12