Foxit PDF SDK

Instance Methods | List of all members
<FSFontMapperCallback> Protocol Reference

Inherits <NSObject>.

## Instance Methods
(NSArray< NSData * > *) | - mapFont:charset:styles:weight:italic_angle:
| A callback function used to map a suitable font according to input parameters. More...
(FSFontMapResult *) | - mapFont:is_truetype:styles:weight:italic_angle:charset:
| A callback function used to map a suitable font according to input parameters. More...

## Detailed Description

This class represents a callback object to map font in customized way. All the pure virtual functions in this class are used as callback functions and should be implemented by user. An implemented FSFontMapperCallback object can be set to Foxit PDF SDK by function FSLibrary::setFontMapperCallback:.

See also
  FSLibrary

## Method Documentation

## ◆ mapFont:charset:styles:weight:italic_angle:()

- (NSArray<NSData *> *) mapFont: |  | (NSString *) | font_family_name
charset: |  | (FSFontCharset) | charset
styles: |  | (unsigned int) | styles
weight: |  | (int) | weight
italic_angle: |  | (int) | italic_angle
| required

A callback function used to map a suitable font according to input parameters.

Parameters

  [in] | font_family_name | Font family name.
  [in] | charset | The charset of the font to be mapped. Please refer to values starting from FSFontCharsetANSI and this would be one of these values.
  [in] | styles | Font styles. Please refer to values starting from FSFontStyleFixedPitch and this would be one or a combination of these values.
  [in] | weight | Original font weight. 0 means unspecified.
  [in] | italic_angle | Italic angle.

Returns
  Font family name array. If the returned array is empty, that means no mapped font is found.

## ◆ mapFont:is_truetype:styles:weight:italic_angle:charset:()

- (FSFontMapResult*) mapFont: |  | (NSString *) | font_name
is_truetype: |  | (BOOL) | is_truetype
styles: |  | (unsigned int) | styles
weight: |  | (int) | weight
italic_angle: |  | (int) | italic_angle
charset: |  | (FSFontCharset) | charset
| required

A callback function used to map a suitable font according to input parameters.

Parameters

  [in] | font_name | Font name.
  [in] | is_truetype | YES means the font is expected to be a TrueType font, while NO means the font is expected to be a Type1 font.
  [in] | styles | Font styles. Please refer to values starting from FSFontStyleFixedPitch and this would be one or a combination of these values.
  [in] | weight | Original font weight. 0 means unspecified.
  [in] | italic_angle | Italic angle.
  [in] | charset | The charset of the font to be mapped. Please refer to values starting from FSFontCharsetANSI and this would be one of these values.

Returns
  Font map result object. If any member in the returned FSFontMapResult is invalid, that means no mapped font is found. Then Foxit PDF SDK will do font mapping.