@quenty/textserviceutils 6.0.1 → 6.2.0-canary.4096cd9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -3,6 +3,25 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ # [6.2.0-canary.4096cd9.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/textserviceutils@6.1.0...@quenty/textserviceutils@6.2.0-canary.4096cd9.0) (2022-09-08)
7
+
8
+
9
+ ### Features
10
+
11
+ * Support lineHeight as a property ([66d6ba3](https://github.com/Quenty/NevermoreEngine/commit/66d6ba38f013230d183a3402e31fa9e67d1cb723))
12
+
13
+
14
+
15
+
16
+
17
+ # [6.1.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/textserviceutils@6.0.1...@quenty/textserviceutils@6.1.0) (2022-08-22)
18
+
19
+ **Note:** Version bump only for package @quenty/textserviceutils
20
+
21
+
22
+
23
+
24
+
6
25
  ## [6.0.1](https://github.com/Quenty/NevermoreEngine/compare/@quenty/textserviceutils@6.0.0...@quenty/textserviceutils@6.0.1) (2022-08-16)
7
26
 
8
27
  **Note:** Version bump only for package @quenty/textserviceutils
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@quenty/textserviceutils",
3
- "version": "6.0.1",
3
+ "version": "6.2.0-canary.4096cd9.0",
4
4
  "description": "Holds utilities involving the Roblox TextService and text fitting to size.",
5
5
  "keywords": [
6
6
  "Roblox",
@@ -30,9 +30,9 @@
30
30
  "access": "public"
31
31
  },
32
32
  "dependencies": {
33
- "@quenty/blend": "^5.0.1",
34
- "@quenty/loader": "^5.0.1",
35
- "@quenty/rx": "^6.0.1"
33
+ "@quenty/blend": "5.2.0-canary.4096cd9.0",
34
+ "@quenty/loader": "5.0.1",
35
+ "@quenty/rx": "6.2.0-canary.4096cd9.0"
36
36
  },
37
- "gitHead": "340ac324c03fb3b844bbbe7ca57ee88874a724c9"
37
+ "gitHead": "4096cd94d2c38d382b7aafe8cb2fcb8bb340d051"
38
38
  }
@@ -25,9 +25,11 @@ function TextServiceUtils.observeSizeForLabelProps(props)
25
25
  assert(props.TextSize, "Bad props.TextSize")
26
26
  assert(props.Font, "Bad props.Font")
27
27
 
28
- return Blend.Computed(props.Text, props.TextSize, props.Font, props.MaxSize or Vector2.new(1e6, 1e6),
29
- function(text, textSize, font, maxSize)
30
- return TextService:GetTextSize(text, textSize, font, maxSize)
28
+ return Blend.Computed(props.Text, props.TextSize, props.Font, props.MaxSize or Vector2.new(1e6, 1e6), props.LineHeight or 1,
29
+ function(text, textSize, font, maxSize, lineHeight)
30
+ local size = TextService:GetTextSize(text, textSize, font, maxSize)
31
+
32
+ return Vector2.new(size.x, lineHeight*size.y)
31
33
  end)
32
34
  end
33
35