Fonts
Each screen of AutomatID uses the three following font styles:
- Title font, used for titles
- Button font, used for buttons
- Default font, used for everything else
with the following weights:
- bold
- medium
- regular
For each of these combinations, you can provide your own font through the AutomatIdConfiguration
during the initialization phase. If you don't, the default system font is used.
- Android
- iOS
val configuration = AutomatIdConfiguration.Builder()
.withDefaultFontRegular(ResourcesCompat.getFont(this, R.font.montserrat_regular))
.withDefaultFontMedium(ResourcesCompat.getFont(this, R.font.montserrat_medium))
.withDefaultFontBold(ResourcesCompat.getFont(this, R.font.montserrat_bold))
.withTitleFontBold(ResourcesCompat.getFont(this, R.font.montserrat_bold))
.withBtnFontRegular(ResourcesCompat.getFont(this, R.font.montserrat_regular))
.withBtnFontMedium(ResourcesCompat.getFont(this, R.font.montserrat_medium))
.withBtnFontBold(ResourcesCompat.getFont(this, R.font.montserrat_bold))
// size is overridden, same Font is shown at different sizes
UIFont* regularFont = [UIFont fontWithName:@"Montserrat-Regular" size:12];
UIFont* mediumFont = [UIFont fontWithName:@"Montserrat-Medium" size:12];
UIFont* boldFont = [UIFont fontWithName:@"Montserrat-Bold" size:12];
configuration.defaultFontRegular = regularFont;
configuration.defaultFontMedium = mediumFont;
configuration.defaultFontBold = boldFont;
configuration.titleFontBold = boldFont;
configuration.titleFontRegular = regularFont;
configuration.titleFontMedium = mediumFont;
configuration.buttonFontBold = boldFont;
configuration.buttonFontRegular = regularFont;
configuration.buttonFontMedium = mediumFont;