Knowledge Base and examples

Knowledge Base - Add Custom Fonts

This article shows how to add custom fonts:

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

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

Details

Created : 2016-09-12 09:57:21, Last Modified : 2016-09-12 09:57:21