Skip to content

Commit 5a11cd5

Browse files
committed
Merge pull request #142 from chrisjenx/readme-fixes
Update README.md
2 parents c4f4379 + 8ca5b29 commit 5a11cd5

File tree

1 file changed

+14
-19
lines changed

1 file changed

+14
-19
lines changed

README.md

Lines changed: 14 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ Calligraphy
33

44
[![Android Arsenal](https://img.shields.io/badge/Android%20Arsenal-Calligraphy-blue.svg?style=flat)](http://android-arsenal.com/details/1/163)
55

6-
Custom fonts in Android the easy way.
6+
Custom fonts in Android an OK way.
77

88
Are you fed up of Custom views to set fonts? Or traversing the ViewTree to find TextViews? Yeah me too.
99

@@ -13,33 +13,27 @@ Are you fed up of Custom views to set fonts? Or traversing the ViewTree to find
1313

1414
### Dependency
1515

16-
[Download from Maven Central (.aar)](http://search.maven.org/remotecontent?filepath=uk/co/chrisjenx/calligraphy/2.0.1/calligraphy-2.0.1.aar)
17-
18-
__OR__
19-
20-
Include the dependency:
16+
Include the dependency [Download (.aar)](http://search.maven.org/remotecontent?filepath=uk/co/chrisjenx/calligraphy/2.0.1/calligraphy-2.0.1.aar) :
2117

2218
```groovy
2319
dependencies {
2420
compile 'uk.co.chrisjenx:calligraphy:2.0.1'
2521
}
2622
```
27-
### Fonts
28-
29-
Add your custom fonts to `assets/fonts/` all font definitions are relative to this path.
23+
### Add Fonts
3024

31-
### Custom Attribute
25+
Add your custom fonts to `assets/` all font definitions are relative to this path.
3226

33-
We ship with `R.attr.fontPath`.
27+
### Usage
3428

35-
This can be used in such a way: `<TextView fontPath="fonts/MyFont.ttf"/>` Please note the missing
36-
namespace, this IS intention.
29+
```xml
30+
<TextView fontPath="fonts/MyFont.ttf"/>
31+
```
32+
**Note: The missing namespace, this __IS__ intention.**
3733

38-
### Configuration
34+
### Installation
3935

40-
Define your default font using `CalligraphyConfig`, in your `Application` class.
41-
Unfortunately `Activity#onCreate(Bundle)` is called _after_ `Activity#attachBaseContext(Context)` so
42-
the config needs to be defined before that.
36+
Define your default font using `CalligraphyConfig`, in your `Application` class in the `#onCreate()` method.
4337

4438
```java
4539
@Override
@@ -53,12 +47,13 @@ public void onCreate() {
5347
//....
5448
}
5549
```
50+
5651
_Note: You don't need to define `CalligraphyConfig` but the library will apply
57-
no default font and use `R.id.fontPath`._
52+
no default font and use the default attribute of `R.id.fontPath`._
5853

5954
### Inject into Context
6055

61-
Wrap the Activity Context:
56+
Wrap the `Activity` Context:
6257

6358
```java
6459
@Override

0 commit comments

Comments
 (0)