Skip to content
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 font with variants. #264

Open
staroflead opened this issue Mar 17, 2016 · 9 comments
Open

Using custom font with variants. #264

staroflead opened this issue Mar 17, 2016 · 9 comments

Comments

@staroflead
Copy link

How can I use font's variant like light, bold,italic?
Can I use textStyle attribute and set only font family to able to use all 4 variants?
And how can I reuse default font arial after I have init the config in application onCreate() ?

@chrisjenx
Copy link
Owner

It's an old requested feature see #195

Need to work out a way to build Typeface Families.

@jhansche
Copy link

The MeetMe/font-compat project does this automatically on Lollipop+. And there's a workaround that works for KitKat and earlier, with some style tweaks.

@chrisjenx
Copy link
Owner

That font-compat is complicated to use. But I'll take how he generates font
families.

Thanks for linking.

On Mon, 28 Mar 2016, 15:27 Joe, [email protected] wrote:

The MeetMe/font-compat https://github.com/MeetMe/font-compat project
does this automatically on Lollipop+. And there's a workaround that works
for KitKat and earlier, with some style tweaks.


You are receiving this because you commented.
Reply to this email directly or view it on GitHub
#264 (comment)

@jhansche
Copy link

Complicated because of the way the families are parsed? It mirrors the way that the Android platform configures font families, which means if/when Android ever exposes that capability, it will likely mirror that style of configuration: https://github.com/MeetMe/font-compat/blob/master/sample/src/main/res/raw-v19/fonts.xml

@bmutinda
Copy link

Hey guys,
Did anyone get a fix for this?

@staroflead
Copy link
Author

I use seperated fontpath for each variant. Unfotunately, it's currently the only way.

@chrisjenx
Copy link
Owner

I actually have found a better way to do this. :D

On Sun, 17 Apr 2016 at 13:02 staroflead [email protected] wrote:

I use seperated fontpath for each variant. Unfotunately, it's currently
the only way.


You are receiving this because you commented.
Reply to this email directly or view it on GitHub
#264 (comment)

@staroflead
Copy link
Author

Please enlighten us :)

@chrisjenx
Copy link
Owner

Very similar to the font manager mechanism. But I think I'd always do it as
third party attribute and pull out the text Style at the same time.

Basically the best of both worlds, font compat plus Calligraphy :D

On Sun, 17 Apr 2016, 15:42 staroflead, [email protected] wrote:

Please enlighten us :)


You are receiving this because you commented.
Reply to this email directly or view it on GitHub
#264 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants