You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I hope you guys are doing well, I've been wondering how or if I can provide my own fonts to specific labels/attributed string. I can't find any documentation about providing my own font styles / AttributedString to specific UILabel/Views
The text was updated successfully, but these errors were encountered:
I did that by overring the default font provider, for example:
final class CustomFontProvider: FontProviding {
var regular = Style.Fonts.lightBodyText // Just a regular UIFont kept in a static enum here
var bold = Style.Fonts.bodyText
var italic = Style.Fonts.italicLightBodyText
var boldItalic = Style.Fonts.italicBodyText
var headingFonts: HeadingFonts {
.init(
h1: Style.Fonts.subheaderText,
h2: Style.Fonts.subheaderText,
h3: Style.Fonts.leadText,
h4: Style.Fonts.leadText,
h5: Style.Fonts.leadText,
h6: Style.Fonts.leadText
)
}
var monospaced = Style.Fonts.lightBodyText
}
Then I injected it into the renders provider when initializing the VC:
Hello contentful team,
I hope you guys are doing well, I've been wondering how or if I can provide my own fonts to specific labels/attributed string. I can't find any documentation about providing my own font styles / AttributedString to specific UILabel/Views
The text was updated successfully, but these errors were encountered: