Questions tagged [calligraphy]

Custom fonts in Android the easy way

Calligraphy is an Android library that lets user to set Font to TextViews in XML file. Android does not support this way of assigning FontPath therefore Calligraphy is a solution for this problem.

Github repo

29 questions
96
votes
10 answers

Crash on Android 10 (InflateException in layout/abc_screen_simple line #17)

My application works fine from Android 4.3 until Android 9 Pie, but my application doesn't work on Android 10 (Q API 29) and crashes. This is my logcat - why this is happening? java.lang.RuntimeException: Unable to start activity …
user11453013
19
votes
3 answers

Calligraphy library by chrisjenx is not working

I did what his documentation has instructed upon setting up the default font: @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setupDefaultFont(); …
anobilisgorse
  • 906
  • 2
  • 11
  • 25
7
votes
2 answers

Custom font with diacritic - different font on same signs on Android 7

I have a problem with custom font in my app. Sometimes it works, sometimes not. I have ViewPager with fragments. In fragment 2 I have LinearLayout with programmatically added TextViews. Same TextView layout added many times. On first TextView…
7
votes
2 answers

InflateException when using chrisjenx CalligraphyLayoutInflater , android.view.InflateException

Hi So in our project we are using calligraphy library , it works with no issues but now in one of the activity i added it keeps crashing with the following stacktrace: 01-23 02:25:32.178 3654-3654/? E/AndroidRuntime: FATAL EXCEPTION: main Process:…
amIT
  • 664
  • 13
  • 27
3
votes
0 answers

Migrating Calligraphy to version 3 does not have a get() method for the font path

The original library of Calligraphy had a get() method to get the font path. Example: import uk.co.chrisjenx.calligraphy.CalligraphyConfig; CalligraphyConfig.get().getFontPath(); I was using that to set it to my Input's, example: Typeface face =…
RRGT19
  • 1,437
  • 3
  • 28
  • 54
3
votes
4 answers

InflationX/Calligraphy Crash on Android 10

I increase my targetSdkVersion from 26 to 29 and face this Crash: ReflectionUtils.java io.github.inflationx.viewpump.ReflectionUtils.getValue About My App: -App in java language -not using android X -targetSdkVersion 29 Current dependency in…
Sepehr
  • 960
  • 11
  • 17
3
votes
2 answers

Cannot resolve symbol 'CalligraphyContextWrapper'

Till yesterday everything was working fine but today i have updated my Android studio from 2.3 to 3.1 and i am getting this error now. But even i am getting Cannot resolve symbol CalligraphyContextWrapper, still project is successfully clean and…
Däñish Shärmà
  • 2,891
  • 2
  • 25
  • 43
3
votes
1 answer

android fonts in xml - how to override default font like calligraphy library does

I am trying to swap out calligraphy (very useful library) for android fonts in xml but i dont know how to change the default font for all views like with calligraphy. Calligraphy was able to change the default font at initialization time. How can…
j2emanue
  • 60,549
  • 65
  • 286
  • 456
2
votes
1 answer

How to get the height from the top of character to its base line (i.e, its actual ascent) in QWidget?

I am experimenting to build a tool that can display modified text (i.e, with some additional stroke) on screen using QWidget. So, to put the stroke in its correct position, I need to know the ascent height of the character the stroke is being put…
user49685
  • 151
  • 1
  • 7
2
votes
3 answers

java.lang.NoSuchMethodError: No static method getFont

I am using Calligraphy Library by ChrisJenx. Suddenly today morning my project has started throwing weird error. Anyone got any idea about this? I also tried looking at TintTypedArray.java:119. The one in gradle cache has getFont method which is…
2
votes
1 answer

Bold textStyle attribute of textview in xml is not working after applying custom fonts in app Android

Bold textStyle attribute of textview in xml is not working after applying custom fonts in app I have completed developement of an android app. Now I have to change font family for whole app. I have used baskerville-old-face.ttf fonts and used…
2
votes
0 answers

Change Calligraphy default font not in application class

I have a multi language application and using Calligraphy for setting the font. I want to change Calligraphy default font when the user changes app locale.
f4rz4m1995
  • 41
  • 7
1
vote
1 answer

Xamarin.Android crash only on Android 10

I have a project that is working perfectly in any version below api 29. When i try to run in a Android 10 device the app crashes after show the splash screen, debugger show this error: Java.Lang.RuntimeException: Binary XML file line #17 in…
Artur Brasil
  • 109
  • 5
1
vote
0 answers

MultiDex problem with Android Studio 3.6 when implementing it the right way

I updated my Android Studio to 3.6 and In one project I have problems with MultiDex and I keep getting this error with Calligraphy and one other library: E/AndroidRuntime: FATAL EXCEPTION: main Process: com.tivasot.book, PID: 7730 …
SIMMORSAL
  • 1,402
  • 1
  • 16
  • 32
1
vote
0 answers

Artifact on Android P for the character 5 with Calligraphy 3

I have an android app using io.github.inflationx:calligraphy3:3.0.0 With the following build settings compileSdkVersion 28 buildToolsVersion "27.0.3" Testing on Google Pixel XL OS android 9 What is interesting is, if I have a small text view…
StarWind0
  • 1,554
  • 2
  • 17
  • 46
1
2