How to add custom font when I use imglyKit SDK in iOS in Swift?

100 Views Asked by At

I tried the following code to add custom font into imglyKit SDK, but there is no custom font added or is being visible. I have also put .ttf file into info.plist file as resource.

let configuration = Configuration() { builder in
    FontImporter.init().importFonts()

    builder.configureTextFontToolController({ (textFontToolOption) in

        var fontArray = [String]()
        fontArray = ["AlexBrush_Regular.ttf", "Arabella.ttf"]
        textFontToolOption.accessibilityElements = fontArray

        textFontToolOption.actionButtonConfigurationClosure = { cell, _ in
            cell.backgroundColor = UIColor.red
        }                
    })
}
0

There are 0 best solutions below