MBOcrCharKey


@interface MBOcrCharKey : NSObject

Class representing a char in specific font.

@example char ‘k’ in font Arial

 MBOcrCharKey* key = [[MBOcrCharKey alloc] initWithCode:'k' font:MB_OCR_FONT_ARIAL];

@example char ‘ü’ in any font

 MBOcrCharKey* key = [[MBOcrCharKey alloc] initWithCode:'ü' font:MB_OCR_FONT_ANY];
  • Unicode value of the char. For example, for char ‘k’, you can use either ‘k’ or 107.

    Declaration

    Objective-C

    @property (assign, readwrite, nonatomic) int code;

    Swift

    var code: Int32 { get set }
  • Font of the char. Can be specific (for example MB_OCR_FONT_ARIAL), or any font (MB_OCR_FONT_ANY), which is the same as specifying the same char code with all supported fonts.

    Declaration

    Objective-C

    @property (assign, readwrite, nonatomic) MBOcrFont font;

    Swift

    var font: MBOcrFont { get set }
  • Initializer which specifies the code and font of the char.

    Declaration

    Objective-C

    - (nonnull instancetype)initWithCode:(int)code font:(MBOcrFont)font;

    Swift

    init(code: Int32, font: MBOcrFont)

    Parameters

    code

    Unicode value for the char

    font

    Font of the char

    Return Value

    initialized char key

  • Factory method for easier instantiation

    Declaration

    Objective-C

    + (nonnull instancetype)keyWithCode:(int)code font:(MBOcrFont)font;

    Parameters

    code

    Unicode value for the char

    font

    Font of the char

    Return Value

    initialized char key