You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CHANGELOG.md
+7Lines changed: 7 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,6 +2,13 @@
2
2
3
3
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
4
4
5
+
## [2.0.3] - 2018-09-14
6
+
### Changed
7
+
- Updated README
8
+
9
+
### Fixed
10
+
-#6 Fix podspec sysntax. Thanks to @Jyrno42
11
+
5
12
## [2.0.2] - 2018-08-31
6
13
### Changed
7
14
- iOS: Give `flatHeights` better performace by avoiding multiple creation of NSTextStorage.
Copy file name to clipboardExpand all lines: README.md
+13-13Lines changed: 13 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,7 +5,18 @@
5
5
6
6
Measure text accurately before laying it out and get font information from your App (Android and iOS).
7
7
8
-
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:
8
+
There are two main functions: `flatHeights` to obtain the height of different blocks of text simultaneously, optimized for components such as `<FlatList>`.
9
+
10
+
The other one is `measure`, which gets detailed information about one block of text:
11
+
12
+
- The width used by the text, with an option to calculate the real width of the largest line.
13
+
- Height, with or without paddings.
14
+
- The number of lines.
15
+
- The width of the last line, if required, useful to save space with "See more..." style labels or time stamps.
16
+
17
+
The width and height are practically the same as those received from the `onLayout` event of a `<Text>` component with the same properties.
18
+
19
+
In both functions, the text to be measured is required, but the rest of the parameters supported are optional and work in the same way as with React Native:
9
20
10
21
-`fontFamily`
11
22
-`fontSize`
@@ -18,17 +29,6 @@ The text to be measured is required, the rest of the parameters supported are op
18
29
-`allowFontScaling`
19
30
-`width`: Constraint for automatic line-break based on text-break strategy.
20
31
21
-
There are two main functions, one to obtain the height of different blocks of text simultaneously, optimized for components such as `<FlatList>`.
22
-
23
-
The other one gets detailed information about a block of text:
24
-
25
-
- The width used by the text, with an option to calculate the real width of the largest line.
26
-
- Height, with or without paddings.
27
-
- The number of lines.
28
-
- The width of the last line, if required, useful to save space with "See more..." style labels or time stamps.
29
-
30
-
Both, width and height, are practically the same as those received from the `onLayout` event of a `<Text>` component with the same properties.
31
-
32
32
In addition, the library includes functions to obtain information about the fonts visible to the App.
33
33
34
34
rnTextSize is WIP, but if it has helped you, please support my work with a star :star2: or [buy me a coffee][bmc-url].
Calculate the height of each of the strings in an array.
192
192
193
-
This is an alternative to `measure` designed for cases in which you have to calculate the height of numerous text blocks with common characteristics (width, font, etc), a Typical case with `<FlatList>`.
193
+
This is an alternative to `measure` designed for cases in which you have to calculate the height of numerous text blocks with common characteristics (width, font, etc), a Typical use case with `<FlatList>`.
194
194
195
195
The measurement uses the same algorithm as `measure` but it returns only the height of each block and, by avoiding multiple steps through the bridge, it is faster... _much faster_ on Android!
0 commit comments