Skip to content

Commit 6b283ba

Browse files
committed
Include note about unlink the previous version in the README
1 parent 6255c6b commit 6b283ba

File tree

2 files changed

+20
-22
lines changed

2 files changed

+20
-22
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
55
## [Unreleased]
66

77
### Fixed
8-
- Some error in the README
8+
- Some error in the README and include note about unlink the previous version.
99

1010
## [2.0.1] - 2018-08-22
1111

README.md

Lines changed: 19 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,16 @@ Measure text accurately before laying it out and get font information from your
77

88
The text to be measured is required, the rest of the parameters supported are optional and work in the same way as with React Native:
99

10-
- Font family, with the common name or specific filename for Android or font-name for iOS.
11-
- Font size
12-
- Font weight
13-
- Font style
14-
- Font variant (iOS)
15-
- Include font padding (Android)
16-
- Text break strategy (Android)
17-
- Letter spacing
18-
- Allow font scaling
19-
- Maximum width, for automatic line-break based on text-break strategy.
10+
- `fontFamily`
11+
- `fontSize`
12+
- `fontWeight`
13+
- `fontStyle`
14+
- `fontVariant` (iOS)
15+
- `includeFontPadding` (Android)
16+
- `textBreakStrategy` (Android)
17+
- `letterSpacing`
18+
- `allowFontScaling`
19+
- `width`: Constraint for automatic line-break based on text-break strategy.
2020

2121
There are two main functions, one to obtain the height of different blocks of text simultaneously, optimized for components such as `<FlatList>`.
2222

@@ -36,23 +36,21 @@ rnTextSize is WIP, but if it has helped you, please support my work with a star
3636
---
3737
**IMPORTANT:**
3838

39-
**rnTextSize (react-native-text-size) v2.0 is a complete refactoring, before using it, please uninstall the previous version.**
39+
**rnTextSize (react-native-text-size) v2.0 is a complete refactoring, before using it, please unlink the previous version.**
40+
41+
**If `react-native unlink` fails, it reverses the changes described in [Manual Installation](https://github.com/aMarCruz/react-native-text-size/wiki/Manual-Installation).**
4042

4143
---
4244

4345
**Requirements:**
4446

4547
- React Native v0.52.0 or later
46-
- Targets Androind API 16 and iOS 9.0
47-
48-
The [sample App](https://github.com/aMarCruz/rn-text-size-sample-app) uses RN v0.52.0, which is the minimum version supported by rnTextSize, but you can change it (See your README before testing it).
48+
- Targets Android API 16 and iOS 9.0
4949

50-
To take advantage of features such as `letterSpacing`, and better support for the most modern devices, use RN v0.55 or above.
50+
The [sample App](https://github.com/aMarCruz/rn-text-size-sample-app) uses RN v0.52.0, which is the minimum version supported by rnTextSize but, to take advantage of features such as `letterSpacing` and better support for the most modern devices, use RN v0.55 or above.
5151

5252
## Installation
5353

54-
Mostly automatic:
55-
5654
```bash
5755
$ yarn add react-native-text-size
5856
$ react-native link react-native-text-size
@@ -278,7 +276,7 @@ fontFamily | string | iOS: 'San Francisco', Android: 'Roboto'
278276
fontWeight | string | 'normal'
279277
fontSize | number | 14
280278
fontStyle | string | 'normal'
281-
fontVariant | array | (none)
279+
fontVariant | string[] | (none)
282280
letterSpacing | number | 0
283281

284282
`fontFromSpecs` uses an implicit `allowsFontScaling:true` and, since this is not a measuring function, `includeFontPadding` has no meaning.
@@ -292,9 +290,9 @@ Property | Type | Details
292290
fontFamily | string | In Android it is the same string passed as parameter.
293291
fontName | string |_iOS only_, always `undefined` in Android.
294292
fontSize | number | It may be different from the given parameter if it includes decimals.
295-
fontStyle | TFontStyle | 'normal' or 'italic'.
296-
fontWeight | TFontWeight | 'normal' or 'bold', on iOS it can go from '100' to '900'.
297-
fontVariant | TFontVariant | _iOS only_, always `undefined` in Android.
293+
fontStyle | string | 'normal' or 'italic'.
294+
fontWeight | string | 'normal' or 'bold', on iOS it can go from '100' to '900'.
295+
fontVariant | string[] | _iOS only_, always `undefined` in Android.
298296
ascender | number | The recommended distance above the baseline for singled spaced text.
299297
descender | number | The recommended distance below the baseline for singled spaced text.
300298
capHeight | number | _iOS only_ Height of capital characters.

0 commit comments

Comments
 (0)