-
-
Notifications
You must be signed in to change notification settings - Fork 314
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Using custom fonts #24
Comments
Hey! Of cause it's possible! You can change font as usual (applying it for a TextView directly) |
@noties hey. What i do wrong ? |
@noties can you show the code of sample ? Because |
Oh... this is problem in my code. Typeface is not setting in TextView. Sorry, its my problem. Thx, super library. |
Is it possible to add different custom fonts depending on which type you are? Header - Use Font Gelica |
Alright, I've figure it out. It's actually using Not ideal, but workable. val markwon = Markwon.builder(requireContext())
.usePlugin(object : AbstractMarkwonPlugin() {
override fun configureTheme(builder: MarkwonTheme.Builder) {
val gelicaTypeface = ResourcesCompat.getFont(requireContext(), R.font.gelica_regular)
val maisonTypeface = ResourcesCompat.getFont(requireContext(), R.font.maison_neue)
builder.headingTypeface(gelicaTypeface)
}
}).build() |
Is it possible to use custom fonts painlessly? SpannableTheme does not represent such an opportunity. You can use the custom font, but only for blocks of code.
The text was updated successfully, but these errors were encountered: