iOS SDK Article UI change font (help center) | Community
Skip to main content

iOS SDK Article UI change font (help center)

  • September 3, 2022
  • 0 replies
  • 0 views

Alex38

Hello! I was trying to change font of the article UI using help_center_article_style.css by adding the following css:

@font-face {
    font-family: 'MyFont-Regular';
    src: local('MyFont-Regular'),url('MyFont-Regular.otf') format('opentype');
}

and changing default css as:

body {
    font-family: 'MyFont-Regular';
    color:#666;
    -webkit-font-smoothing:antialiased;
    text-rendering:optimizeLegibility;
    margin: 30px;
    background-color: #ffff00;
}

I am initiating the article as:

let articleUiConfig = ArticleUiConfiguration()
articleUiConfig.showContactOptions = false
let articleController = HelpCenterUi
.buildHelpCenterArticleUi(
withArticleId: String(article.id),
andConfigs: [articleUiConfig])
let nav = UINavigationController(rootViewController: articleController)
present(nav, animated: true)

Unfortunately the font is not changing at all. I think this is because of the external bundle where the framework is located.
I've tied the same with a standard WKWebView and it works.

1) Is it possible to change fonts?
2) If not, I also thought not to use your UI and create my own with WKWebView, but in this case I have to implement the voting by my own?
3) I am wondering why "Create a ticket" button in ArticleUI sometimes still visible despite the fact that I've disabled it using:

articleUiConfig.showContactOptions = false