Calligraphy
Calligraphy copied to clipboard
Is it possible to add an attribute to disable Calligraphy on a TextView?
I'm required to have custom fonts app-wide while using https://github.com/JoanZapata/android-iconify.
However, android-iconify does not work with Calligraphy.
Is there a workaround? Can I do something like this?
<IconTextView
android:text="{fa-heart}"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:disable_calligraphy="true"
/>
Thats a good idea. What would be prefered a attribute or a ignoreClass(Class<?> clazz)
in the builder?
Right now an attribute will be great because it would fit my needs perfectly. Let me see if I can contribute by looking at the code.
Well in the interim I've found that using Iconify.addIcons(yourTextView) works for me. Leaving this here for future reference.
Meanwhile I'll submit a pull request soon for the new attribute.
How would this play out with menuitems, which don't give access to the underlying TextViews? Or are you somehow building out menus using IconTextViews?
I don't think the menu items get any font applied as they are pragmatically created by Android.
On Mon, 22 Jun 2015 21:14 rothschild86 [email protected] wrote:
How would this play out with menuitems, which don't give access to the underlying TextViews? Or are you somehow building out menus using IconTextViews?
— Reply to this email directly or view it on GitHub https://github.com/chrisjenx/Calligraphy/issues/152#issuecomment-114246934 .
@chrisjenx do you have caligraphy and android-iconify running together in you project?
No, never used iconify.
On Mon, 22 Jun 2015 21:18 rothschild86 [email protected] wrote:
@chrisjenx https://github.com/chrisjenx do you have caligraphy and android-iconify running together in you project?
— Reply to this email directly or view it on GitHub https://github.com/chrisjenx/Calligraphy/issues/152#issuecomment-114249165 .
@chrisjenx thanks for a great library
Just faced the same issue and in my opinion it should be an ignoreClass since you don't want to write attribute in every single place where you use iconify in a layout. Created #189
Why not both options? An attribute and an ignoreClass in the builder? Either can be helpful.
OK, seen as more than one person wants this I'll add it as a feature request.
On Mon, 13 Jul 2015 13:38 kashban [email protected] wrote:
Why not both options? An attribute and an ignoreClass in the builder? Either can be helpful.
— Reply to this email directly or view it on GitHub https://github.com/chrisjenx/Calligraphy/issues/152#issuecomment-120913772 .
@kashban on the other hand maybe there is some scenario where this could be of use. Initially I only fixed this for Iconify. Pushed additional changes to pull request with calligraphyIgnore attribute
@rothschild86 I think until this gets implemented, another way to get both library to work well together would be to update your iconify library to use the v2 that has been released recently. Its author says it now works with Calligraphy. You can have a look at the new features here: http://blog.joanzapata.com/iconify-just-got-a-lot-better/
Cool nice work. Just remember, there are spans used in certain places (Action Bar) still. Apart from that looks like a nice overhaul.
On Fri, 11 Sep 2015 09:32 k3v1n4ud3 [email protected] wrote:
@rothschild86 https://github.com/rothschild86 I think until this gets implemented, another way to get both library to work well together would be to update your iconify library to use the v2 that has been released recently. Its author says it now works with Calligraphy. You can have a look at the new features here: http://blog.joanzapata.com/iconify-just-got-a-lot-better/
— Reply to this email directly or view it on GitHub https://github.com/chrisjenx/Calligraphy/issues/152#issuecomment-139485268 .
@k3v1n4ud3 right on! switched to iconics, which also plays nicely with caligraphy.
I'd still wish to see a disable option. I'm currently using a default font on the default textAppearance. But my font doesn't look good with numbers, so I'd like to disable it for a specific price TextView
.
Is this still on the roadmap?
Pinging on this one since it's been 6 months... - Is this still a consideration
No. If it doesn't do it anyway, I'll change it so that fontPath="@null" would set the font to system default.
@chrisjenx Good idea; I actually had just tried that and it didn't work, so if you end up doing that please let me know. (PS sorry for duplicate issues)... I'll do that though, I'll just ship the fonts myself for now...
<style name="MyNotoSerifHeader">
<item name="android:textSize">30sp</item>
<item name="android:textColor">@color/text_black</item>
<item name="android:fontFamily">serif</item> <!-- Noto serif, introduced in lollipop -->
<item name="fontPath">@null</item>
</style>
Thx for letting me know.
On Wed, 21 Dec 2016, 00:45 Neil Jay Warner, [email protected] wrote:
@chrisjenx https://github.com/chrisjenx Good idea; I just tried that and it didn't work, so if you end up doing that please let me know. (PS sorry for duplicate issues)... I'll do that though, I'll just ship the fonts myself for now...
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/chrisjenx/Calligraphy/issues/152#issuecomment-268392264, or mute the thread https://github.com/notifications/unsubscribe-auth/ABHRsRJKxLO1ZA5kIM8sd46xm5PvR1kDks5rKGiMgaJpZM4D2tRB .
Hi! Great and useful library, thanks!
I'm trying -as others as I can see in this thread- to disable default callygraphy font on specific Textfields to show the system serif default font.
My Activity has lots of Textfield & fragments using the default callygraphy font, so it's not a good idea to remove that.
I've tried with this fontPath="@null" (Without @ as well) parameter on the Textfield but it doesn't work for me. There is another workaround or way to achieve that?
Here is the code: `
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical|left"
android:paddingLeft="20dp"
android:text="@string/filter_title_vip"
fontPath="@null"
android:fontFamily="sans-serif"
android:textColor="@color/text_color_dark_blue"
android:textSize="15sp"
android:letterSpacing="0.06"
android:textAllCaps="true"
/>`
Thanks in advance