expo-font 14.0.4 → 14.0.5

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.
Files changed (56) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/android/build.gradle +2 -2
  3. package/android/src/main/java/expo/modules/font/FontUtilsModule.kt +25 -17
  4. package/build/FontUtils.d.ts +3 -3
  5. package/build/FontUtils.d.ts.map +1 -1
  6. package/build/FontUtils.js.map +1 -1
  7. package/build/FontUtils.types.d.ts +14 -0
  8. package/build/FontUtils.types.d.ts.map +1 -1
  9. package/build/FontUtils.types.js.map +1 -1
  10. package/expo-module.config.json +1 -1
  11. package/ios/FontUtilsModule.swift +5 -1
  12. package/local-maven-repo/host/exp/exponent/expo.modules.font/{14.0.4/expo.modules.font-14.0.4-sources.jar → 14.0.5/expo.modules.font-14.0.5-sources.jar} +0 -0
  13. package/local-maven-repo/host/exp/exponent/expo.modules.font/14.0.5/expo.modules.font-14.0.5-sources.jar.md5 +1 -0
  14. package/local-maven-repo/host/exp/exponent/expo.modules.font/14.0.5/expo.modules.font-14.0.5-sources.jar.sha1 +1 -0
  15. package/local-maven-repo/host/exp/exponent/expo.modules.font/14.0.5/expo.modules.font-14.0.5-sources.jar.sha256 +1 -0
  16. package/local-maven-repo/host/exp/exponent/expo.modules.font/14.0.5/expo.modules.font-14.0.5-sources.jar.sha512 +1 -0
  17. package/local-maven-repo/host/exp/exponent/expo.modules.font/14.0.5/expo.modules.font-14.0.5.aar +0 -0
  18. package/local-maven-repo/host/exp/exponent/expo.modules.font/14.0.5/expo.modules.font-14.0.5.aar.md5 +1 -0
  19. package/local-maven-repo/host/exp/exponent/expo.modules.font/14.0.5/expo.modules.font-14.0.5.aar.sha1 +1 -0
  20. package/local-maven-repo/host/exp/exponent/expo.modules.font/14.0.5/expo.modules.font-14.0.5.aar.sha256 +1 -0
  21. package/local-maven-repo/host/exp/exponent/expo.modules.font/14.0.5/expo.modules.font-14.0.5.aar.sha512 +1 -0
  22. package/local-maven-repo/host/exp/exponent/expo.modules.font/{14.0.4/expo.modules.font-14.0.4.module → 14.0.5/expo.modules.font-14.0.5.module} +22 -22
  23. package/local-maven-repo/host/exp/exponent/expo.modules.font/14.0.5/expo.modules.font-14.0.5.module.md5 +1 -0
  24. package/local-maven-repo/host/exp/exponent/expo.modules.font/14.0.5/expo.modules.font-14.0.5.module.sha1 +1 -0
  25. package/local-maven-repo/host/exp/exponent/expo.modules.font/14.0.5/expo.modules.font-14.0.5.module.sha256 +1 -0
  26. package/local-maven-repo/host/exp/exponent/expo.modules.font/14.0.5/expo.modules.font-14.0.5.module.sha512 +1 -0
  27. package/local-maven-repo/host/exp/exponent/expo.modules.font/{14.0.4/expo.modules.font-14.0.4.pom → 14.0.5/expo.modules.font-14.0.5.pom} +1 -1
  28. package/local-maven-repo/host/exp/exponent/expo.modules.font/14.0.5/expo.modules.font-14.0.5.pom.md5 +1 -0
  29. package/local-maven-repo/host/exp/exponent/expo.modules.font/14.0.5/expo.modules.font-14.0.5.pom.sha1 +1 -0
  30. package/local-maven-repo/host/exp/exponent/expo.modules.font/14.0.5/expo.modules.font-14.0.5.pom.sha256 +1 -0
  31. package/local-maven-repo/host/exp/exponent/expo.modules.font/14.0.5/expo.modules.font-14.0.5.pom.sha512 +1 -0
  32. package/local-maven-repo/host/exp/exponent/expo.modules.font/maven-metadata.xml +4 -4
  33. package/local-maven-repo/host/exp/exponent/expo.modules.font/maven-metadata.xml.md5 +1 -1
  34. package/local-maven-repo/host/exp/exponent/expo.modules.font/maven-metadata.xml.sha1 +1 -1
  35. package/local-maven-repo/host/exp/exponent/expo.modules.font/maven-metadata.xml.sha256 +1 -1
  36. package/local-maven-repo/host/exp/exponent/expo.modules.font/maven-metadata.xml.sha512 +1 -1
  37. package/package.json +2 -2
  38. package/src/FontUtils.ts +3 -3
  39. package/src/FontUtils.types.ts +15 -0
  40. package/local-maven-repo/host/exp/exponent/expo.modules.font/14.0.4/expo.modules.font-14.0.4-sources.jar.md5 +0 -1
  41. package/local-maven-repo/host/exp/exponent/expo.modules.font/14.0.4/expo.modules.font-14.0.4-sources.jar.sha1 +0 -1
  42. package/local-maven-repo/host/exp/exponent/expo.modules.font/14.0.4/expo.modules.font-14.0.4-sources.jar.sha256 +0 -1
  43. package/local-maven-repo/host/exp/exponent/expo.modules.font/14.0.4/expo.modules.font-14.0.4-sources.jar.sha512 +0 -1
  44. package/local-maven-repo/host/exp/exponent/expo.modules.font/14.0.4/expo.modules.font-14.0.4.aar +0 -0
  45. package/local-maven-repo/host/exp/exponent/expo.modules.font/14.0.4/expo.modules.font-14.0.4.aar.md5 +0 -1
  46. package/local-maven-repo/host/exp/exponent/expo.modules.font/14.0.4/expo.modules.font-14.0.4.aar.sha1 +0 -1
  47. package/local-maven-repo/host/exp/exponent/expo.modules.font/14.0.4/expo.modules.font-14.0.4.aar.sha256 +0 -1
  48. package/local-maven-repo/host/exp/exponent/expo.modules.font/14.0.4/expo.modules.font-14.0.4.aar.sha512 +0 -1
  49. package/local-maven-repo/host/exp/exponent/expo.modules.font/14.0.4/expo.modules.font-14.0.4.module.md5 +0 -1
  50. package/local-maven-repo/host/exp/exponent/expo.modules.font/14.0.4/expo.modules.font-14.0.4.module.sha1 +0 -1
  51. package/local-maven-repo/host/exp/exponent/expo.modules.font/14.0.4/expo.modules.font-14.0.4.module.sha256 +0 -1
  52. package/local-maven-repo/host/exp/exponent/expo.modules.font/14.0.4/expo.modules.font-14.0.4.module.sha512 +0 -1
  53. package/local-maven-repo/host/exp/exponent/expo.modules.font/14.0.4/expo.modules.font-14.0.4.pom.md5 +0 -1
  54. package/local-maven-repo/host/exp/exponent/expo.modules.font/14.0.4/expo.modules.font-14.0.4.pom.sha1 +0 -1
  55. package/local-maven-repo/host/exp/exponent/expo.modules.font/14.0.4/expo.modules.font-14.0.4.pom.sha256 +0 -1
  56. package/local-maven-repo/host/exp/exponent/expo.modules.font/14.0.4/expo.modules.font-14.0.4.pom.sha512 +0 -1
package/CHANGELOG.md CHANGED
@@ -10,6 +10,12 @@
10
10
 
11
11
  ### 💡 Others
12
12
 
13
+ ## 14.0.5 — 2025-08-27
14
+
15
+ ### 🛠 Breaking changes
16
+
17
+ - [android] improve bitmap rendering for `renderToImageAsync` ([#39118](https://github.com/expo/expo/pull/39118) by [@vonovak](https://github.com/vonovak))
18
+
13
19
  ## 14.0.4 — 2025-08-26
14
20
 
15
21
  ### 💡 Others
@@ -4,13 +4,13 @@ plugins {
4
4
  }
5
5
 
6
6
  group = 'host.exp.exponent'
7
- version = '14.0.4'
7
+ version = '14.0.5'
8
8
 
9
9
  android {
10
10
  namespace "expo.modules.font"
11
11
  defaultConfig {
12
12
  versionCode 29
13
- versionName "14.0.4"
13
+ versionName "14.0.5"
14
14
  }
15
15
  }
16
16
 
@@ -6,7 +6,6 @@ import android.content.Context
6
6
  import android.graphics.Bitmap
7
7
  import android.graphics.Canvas
8
8
  import android.graphics.Paint
9
- import android.graphics.Rect
10
9
  import android.graphics.Typeface
11
10
  import android.net.Uri
12
11
  import com.facebook.react.common.assets.ReactFontManager
@@ -19,7 +18,7 @@ import java.io.File
19
18
  import java.io.FileOutputStream
20
19
  import java.io.IOException
21
20
  import java.util.UUID
22
- import kotlin.math.abs
21
+ import kotlin.math.ceil
23
22
 
24
23
  private class SaveImageException(uri: String, cause: Throwable? = null) :
25
24
  CodedException("Could not save image to '$uri'", cause)
@@ -36,33 +35,42 @@ open class FontUtilsModule : Module() {
36
35
 
37
36
  val paint = Paint().apply {
38
37
  this.typeface = typeface
39
- this.color = options.color
40
- this.textSize = options.size
41
- this.isAntiAlias = true
38
+ color = options.color
39
+ textSize = options.size
40
+ isAntiAlias = true
42
41
  }
43
42
 
44
- val bounds = Rect().also {
45
- paint.getTextBounds(glyphs, 0, glyphs.length, it)
46
- }
43
+ val fontMetrics = paint.fontMetrics
47
44
 
48
- val bitmap = Bitmap.createBitmap(bounds.width(), bounds.height(), Bitmap.Config.ARGB_8888)
49
- val canvas = Canvas(bitmap)
45
+ val width = ceil(paint.measureText(glyphs)).toInt()
50
46
 
51
- val x = abs(bounds.left).toFloat()
52
- val y = bounds.height().toFloat() / 2 - ((paint.fontMetrics.ascent + paint.fontMetrics.descent) / 2)
47
+ // Calculate height based on font metrics to ensure enough space
48
+ // This gives the maximum height the font might occupy. Could be more than strictly needed but aligns with iOS.
49
+ val height = ceil(fontMetrics.descent - fontMetrics.ascent).toInt()
53
50
 
54
- canvas.drawText(glyphs, x, y, paint)
51
+ val bitmap = Bitmap.createBitmap(width, height, Bitmap.Config.ARGB_8888)
52
+ val canvas = Canvas(bitmap)
53
+
54
+ // The `drawText` method's y-parameter is the baseline of the text.
55
+ // To draw the text starting from the very top of the bitmap,
56
+ // the baseline should be at -fontMetrics.ascent.
57
+ // For most characters, text may appear vertically centered, but try with characters like Å or Ç
58
+ val yBaseline = -fontMetrics.ascent
59
+ canvas.drawText(glyphs, 0f, yBaseline, paint)
55
60
 
56
61
  val output = File(context.cacheDir, "${UUID.randomUUID()}.png")
57
- if (!output.exists()) {
58
- output.createNewFile()
59
- }
60
62
 
61
63
  try {
62
64
  FileOutputStream(output).use { out ->
63
65
  bitmap.compress(Bitmap.CompressFormat.PNG, 100, out)
64
- promise.resolve(Uri.fromFile(output))
65
66
  }
67
+ promise.resolve(
68
+ mapOf(
69
+ "uri" to Uri.fromFile(output).toString(),
70
+ "width" to bitmap.width,
71
+ "height" to bitmap.height
72
+ )
73
+ )
66
74
  } catch (e: IOException) {
67
75
  promise.reject(SaveImageException(output.absolutePath, e))
68
76
  }
@@ -1,5 +1,5 @@
1
- import { RenderToImageOptions } from './FontUtils.types';
2
- export type { RenderToImageOptions };
1
+ import type { RenderToImageOptions, RenderToImageResult } from './FontUtils.types';
2
+ export type { RenderToImageOptions, RenderToImageResult };
3
3
  /**
4
4
  * Creates an image with provided text.
5
5
  * @param glyphs Text to be exported.
@@ -8,5 +8,5 @@ export type { RenderToImageOptions };
8
8
  * @platform android
9
9
  * @platform ios
10
10
  */
11
- export declare function renderToImageAsync(glyphs: string, options?: RenderToImageOptions): Promise<string>;
11
+ export declare function renderToImageAsync(glyphs: string, options?: RenderToImageOptions): Promise<RenderToImageResult>;
12
12
  //# sourceMappingURL=FontUtils.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"FontUtils.d.ts","sourceRoot":"","sources":["../src/FontUtils.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AAEzD,YAAY,EAAE,oBAAoB,EAAE,CAAC;AAErC;;;;;;;GAOG;AACH,wBAAsB,kBAAkB,CACtC,MAAM,EAAE,MAAM,EACd,OAAO,CAAC,EAAE,oBAAoB,GAC7B,OAAO,CAAC,MAAM,CAAC,CASjB"}
1
+ {"version":3,"file":"FontUtils.d.ts","sourceRoot":"","sources":["../src/FontUtils.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,oBAAoB,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAEnF,YAAY,EAAE,oBAAoB,EAAE,mBAAmB,EAAE,CAAC;AAE1D;;;;;;;GAOG;AACH,wBAAsB,kBAAkB,CACtC,MAAM,EAAE,MAAM,EACd,OAAO,CAAC,EAAE,oBAAoB,GAC7B,OAAO,CAAC,mBAAmB,CAAC,CAS9B"}
@@ -1 +1 @@
1
- {"version":3,"file":"FontUtils.js","sourceRoot":"","sources":["../src/FontUtils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AACxD,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAE5C,OAAO,aAAa,MAAM,iBAAiB,CAAC;AAK5C;;;;;;;GAOG;AACH,MAAM,CAAC,KAAK,UAAU,kBAAkB,CACtC,MAAc,EACd,OAA8B;IAE9B,IAAI,CAAC,aAAa,EAAE,CAAC;QACnB,MAAM,IAAI,mBAAmB,CAAC,WAAW,EAAE,kCAAkC,CAAC,CAAC;IACjF,CAAC;IAED,OAAO,MAAM,aAAa,CAAC,kBAAkB,CAAC,MAAM,EAAE;QACpD,GAAG,OAAO;QACV,KAAK,EAAE,OAAO,EAAE,KAAK,CAAC,CAAC,CAAC,YAAY,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,SAAS;KAChE,CAAC,CAAC;AACL,CAAC","sourcesContent":["import { UnavailabilityError } from 'expo-modules-core';\nimport { processColor } from 'react-native';\n\nimport ExpoFontUtils from './ExpoFontUtils';\nimport { RenderToImageOptions } from './FontUtils.types';\n\nexport type { RenderToImageOptions };\n\n/**\n * Creates an image with provided text.\n * @param glyphs Text to be exported.\n * @param options RenderToImageOptions.\n * @return Promise which fulfils with uri to image.\n * @platform android\n * @platform ios\n */\nexport async function renderToImageAsync(\n glyphs: string,\n options?: RenderToImageOptions\n): Promise<string> {\n if (!ExpoFontUtils) {\n throw new UnavailabilityError('expo-font', 'ExpoFontUtils.renderToImageAsync');\n }\n\n return await ExpoFontUtils.renderToImageAsync(glyphs, {\n ...options,\n color: options?.color ? processColor(options.color) : undefined,\n });\n}\n"]}
1
+ {"version":3,"file":"FontUtils.js","sourceRoot":"","sources":["../src/FontUtils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AACxD,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAE5C,OAAO,aAAa,MAAM,iBAAiB,CAAC;AAK5C;;;;;;;GAOG;AACH,MAAM,CAAC,KAAK,UAAU,kBAAkB,CACtC,MAAc,EACd,OAA8B;IAE9B,IAAI,CAAC,aAAa,EAAE,CAAC;QACnB,MAAM,IAAI,mBAAmB,CAAC,WAAW,EAAE,kCAAkC,CAAC,CAAC;IACjF,CAAC;IAED,OAAO,MAAM,aAAa,CAAC,kBAAkB,CAAC,MAAM,EAAE;QACpD,GAAG,OAAO;QACV,KAAK,EAAE,OAAO,EAAE,KAAK,CAAC,CAAC,CAAC,YAAY,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,SAAS;KAChE,CAAC,CAAC;AACL,CAAC","sourcesContent":["import { UnavailabilityError } from 'expo-modules-core';\nimport { processColor } from 'react-native';\n\nimport ExpoFontUtils from './ExpoFontUtils';\nimport type { RenderToImageOptions, RenderToImageResult } from './FontUtils.types';\n\nexport type { RenderToImageOptions, RenderToImageResult };\n\n/**\n * Creates an image with provided text.\n * @param glyphs Text to be exported.\n * @param options RenderToImageOptions.\n * @return Promise which fulfils with uri to image.\n * @platform android\n * @platform ios\n */\nexport async function renderToImageAsync(\n glyphs: string,\n options?: RenderToImageOptions\n): Promise<RenderToImageResult> {\n if (!ExpoFontUtils) {\n throw new UnavailabilityError('expo-font', 'ExpoFontUtils.renderToImageAsync');\n }\n\n return await ExpoFontUtils.renderToImageAsync(glyphs, {\n ...options,\n color: options?.color ? processColor(options.color) : undefined,\n });\n}\n"]}
@@ -15,4 +15,18 @@ export interface RenderToImageOptions {
15
15
  */
16
16
  color?: string;
17
17
  }
18
+ export interface RenderToImageResult {
19
+ /**
20
+ * The file uri to the image.
21
+ */
22
+ uri: string;
23
+ /**
24
+ * Image width.
25
+ */
26
+ width: number;
27
+ /**
28
+ * Image height.
29
+ */
30
+ height: number;
31
+ }
18
32
  //# sourceMappingURL=FontUtils.types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"FontUtils.types.d.ts","sourceRoot":"","sources":["../src/FontUtils.types.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,oBAAoB;IACnC;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB"}
1
+ {"version":3,"file":"FontUtils.types.d.ts","sourceRoot":"","sources":["../src/FontUtils.types.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,oBAAoB;IACnC;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,mBAAmB;IAClC;;OAEG;IACH,GAAG,EAAE,MAAM,CAAC;IACZ;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;CAChB"}
@@ -1 +1 @@
1
- {"version":3,"file":"FontUtils.types.js","sourceRoot":"","sources":["../src/FontUtils.types.ts"],"names":[],"mappings":"","sourcesContent":["export interface RenderToImageOptions {\n /**\n * Font family name.\n * @default system default\n */\n fontFamily?: string;\n /**\n * Size of the font.\n * @default 24\n */\n size?: number;\n /**\n * Font color\n * @default 'black'\n */\n color?: string;\n}\n"]}
1
+ {"version":3,"file":"FontUtils.types.js","sourceRoot":"","sources":["../src/FontUtils.types.ts"],"names":[],"mappings":"","sourcesContent":["export interface RenderToImageOptions {\n /**\n * Font family name.\n * @default system default\n */\n fontFamily?: string;\n /**\n * Size of the font.\n * @default 24\n */\n size?: number;\n /**\n * Font color\n * @default 'black'\n */\n color?: string;\n}\n\nexport interface RenderToImageResult {\n /**\n * The file uri to the image.\n */\n uri: string;\n /**\n * Image width.\n */\n width: number;\n /**\n * Image height.\n */\n height: number;\n}\n"]}
@@ -8,7 +8,7 @@
8
8
  "publication": {
9
9
  "groupId": "host.exp.exponent",
10
10
  "artifactId": "expo.modules.font",
11
- "version": "14.0.4",
11
+ "version": "14.0.5",
12
12
  "repository": "local-maven-repo"
13
13
  }
14
14
  }
@@ -38,7 +38,11 @@ public final class FontUtilsModule: Module {
38
38
 
39
39
  do {
40
40
  try data.write(to: outputURL, options: .atomic)
41
- promise.resolve(outputURL.absoluteString)
41
+ promise.resolve([
42
+ "uri": outputURL.absoluteString,
43
+ "width": image.size.width,
44
+ "height": image.size.height
45
+ ])
42
46
  } catch {
43
47
  promise.reject(SaveImageException(outputURL.absoluteString))
44
48
  }
@@ -0,0 +1 @@
1
+ 216b1339d3c7fb762d0ae3ad3cfd0a06890dcf1a14539e994274b888e0a2da31
@@ -0,0 +1 @@
1
+ 0705bba6d04bc852266555c7b9320f07fe1aad4a081d8ca5843b4480a4aff1b1144a9e436980ed6985347eb29ad452e21e2968ecf76cab202aeeb8488d5883ff
@@ -0,0 +1 @@
1
+ c527a96ec92e8a0be4e854d7ef5533de11e69ce1
@@ -0,0 +1 @@
1
+ 268738b91ba94ea4e6846aae72c5c4b2ee0e59018930224bb1a4f6d78ea01cdb
@@ -0,0 +1 @@
1
+ 29a6726199c765c0d2c17acd50eb31f83838ab7c65e4008d1ed387a0a5a546a16487747af2c6226db6c6ff8514e92afe3acbf073fa3789d961d41df8e7528cd7
@@ -3,7 +3,7 @@
3
3
  "component": {
4
4
  "group": "host.exp.exponent",
5
5
  "module": "expo.modules.font",
6
- "version": "14.0.4",
6
+ "version": "14.0.5",
7
7
  "attributes": {
8
8
  "org.gradle.status": "release"
9
9
  }
@@ -24,13 +24,13 @@
24
24
  },
25
25
  "files": [
26
26
  {
27
- "name": "expo.modules.font-14.0.4.aar",
28
- "url": "expo.modules.font-14.0.4.aar",
29
- "size": 23898,
30
- "sha512": "6d7719c52520db8192d98350f1a5accab0ed6d30b5232c127e8cf64f1f42cafc54aba97531423f172a39c3beda38e643d1bb4b11d12ae974ba3e050a257a7bec",
31
- "sha256": "4ffb592fd95cbae524f5982a303b8bfe2d7ddb353b063e7c7ae4bc39e9f1dda6",
32
- "sha1": "5343861542a16d0a9ab8391c6fd2886afeb8a6e6",
33
- "md5": "64fd30a0592b98d29b3ffd407e9e9378"
27
+ "name": "expo.modules.font-14.0.5.aar",
28
+ "url": "expo.modules.font-14.0.5.aar",
29
+ "size": 23986,
30
+ "sha512": "29a6726199c765c0d2c17acd50eb31f83838ab7c65e4008d1ed387a0a5a546a16487747af2c6226db6c6ff8514e92afe3acbf073fa3789d961d41df8e7528cd7",
31
+ "sha256": "268738b91ba94ea4e6846aae72c5c4b2ee0e59018930224bb1a4f6d78ea01cdb",
32
+ "sha1": "c527a96ec92e8a0be4e854d7ef5533de11e69ce1",
33
+ "md5": "8a9a26427b79c126304de628d9f6b855"
34
34
  }
35
35
  ]
36
36
  },
@@ -57,13 +57,13 @@
57
57
  ],
58
58
  "files": [
59
59
  {
60
- "name": "expo.modules.font-14.0.4.aar",
61
- "url": "expo.modules.font-14.0.4.aar",
62
- "size": 23898,
63
- "sha512": "6d7719c52520db8192d98350f1a5accab0ed6d30b5232c127e8cf64f1f42cafc54aba97531423f172a39c3beda38e643d1bb4b11d12ae974ba3e050a257a7bec",
64
- "sha256": "4ffb592fd95cbae524f5982a303b8bfe2d7ddb353b063e7c7ae4bc39e9f1dda6",
65
- "sha1": "5343861542a16d0a9ab8391c6fd2886afeb8a6e6",
66
- "md5": "64fd30a0592b98d29b3ffd407e9e9378"
60
+ "name": "expo.modules.font-14.0.5.aar",
61
+ "url": "expo.modules.font-14.0.5.aar",
62
+ "size": 23986,
63
+ "sha512": "29a6726199c765c0d2c17acd50eb31f83838ab7c65e4008d1ed387a0a5a546a16487747af2c6226db6c6ff8514e92afe3acbf073fa3789d961d41df8e7528cd7",
64
+ "sha256": "268738b91ba94ea4e6846aae72c5c4b2ee0e59018930224bb1a4f6d78ea01cdb",
65
+ "sha1": "c527a96ec92e8a0be4e854d7ef5533de11e69ce1",
66
+ "md5": "8a9a26427b79c126304de628d9f6b855"
67
67
  }
68
68
  ]
69
69
  },
@@ -77,13 +77,13 @@
77
77
  },
78
78
  "files": [
79
79
  {
80
- "name": "expo.modules.font-14.0.4-sources.jar",
81
- "url": "expo.modules.font-14.0.4-sources.jar",
82
- "size": 3716,
83
- "sha512": "2c8069f25ea086e76885e4a9ba803bb5e62c8f82140d35dd34be3774aa083db6239e024b2cc4f7b1b7d0587c7bf9d022dcd6cbd5e4bfa403df27ee452ece90f9",
84
- "sha256": "3082716e01b1aa6412301809f3a30add410f19cbc7ce8a4a3535bf7f575712a4",
85
- "sha1": "9b298baf89cf7a6b5416bd9d8ad22263f6f85681",
86
- "md5": "906c8ca0d38bae5577ee5cd8e4f8bd72"
80
+ "name": "expo.modules.font-14.0.5-sources.jar",
81
+ "url": "expo.modules.font-14.0.5-sources.jar",
82
+ "size": 3939,
83
+ "sha512": "0705bba6d04bc852266555c7b9320f07fe1aad4a081d8ca5843b4480a4aff1b1144a9e436980ed6985347eb29ad452e21e2968ecf76cab202aeeb8488d5883ff",
84
+ "sha256": "216b1339d3c7fb762d0ae3ad3cfd0a06890dcf1a14539e994274b888e0a2da31",
85
+ "sha1": "9d2b9d8c7b614636de43d5d1ad70508829dde896",
86
+ "md5": "d701814cb3469f9aa22aa949ed4c6264"
87
87
  }
88
88
  ]
89
89
  }
@@ -0,0 +1 @@
1
+ 4c5cf1e81d53955096aeefc2c1ad92f54fa8a3c988aad61aa9694c8dcf03c208
@@ -0,0 +1 @@
1
+ a73756eaa3fdd7469fd4d45a079358c7b265de10616950197ec1a353e58d3f6a744782f9ad7eb720cf2524be1e861ec0c9fd12ba2428fb860d24d9010dcc7500
@@ -9,7 +9,7 @@
9
9
  <modelVersion>4.0.0</modelVersion>
10
10
  <groupId>host.exp.exponent</groupId>
11
11
  <artifactId>expo.modules.font</artifactId>
12
- <version>14.0.4</version>
12
+ <version>14.0.5</version>
13
13
  <packaging>aar</packaging>
14
14
  <name>expo.modules.font</name>
15
15
  <url>https://github.com/expo/expo</url>
@@ -0,0 +1 @@
1
+ 2d588638358523cab12877dc9924e9fe00cd1ae6
@@ -0,0 +1 @@
1
+ 00b5108b5b6b25756b9d1e35f338dc904f3895791f119f95694c220cb7650802
@@ -0,0 +1 @@
1
+ ecea0fc2cf008798b645840eb1143f512ca9fc74dc23233d48805bce21ee0a7a9df128c9e2bc68193472b16461a6f29cccd37b9728da850e41e21aced426ed69
@@ -3,11 +3,11 @@
3
3
  <groupId>host.exp.exponent</groupId>
4
4
  <artifactId>expo.modules.font</artifactId>
5
5
  <versioning>
6
- <latest>14.0.4</latest>
7
- <release>14.0.4</release>
6
+ <latest>14.0.5</latest>
7
+ <release>14.0.5</release>
8
8
  <versions>
9
- <version>14.0.4</version>
9
+ <version>14.0.5</version>
10
10
  </versions>
11
- <lastUpdated>20250826172803</lastUpdated>
11
+ <lastUpdated>20250827210759</lastUpdated>
12
12
  </versioning>
13
13
  </metadata>
@@ -1 +1 @@
1
- e53e7515032ec3459b21b17ac3b6caab
1
+ 034920c5a4ea6bbccf0cca04d0a489b6
@@ -1 +1 @@
1
- c53270d1aaed0334cf887d6ac78d98dd2ebddb32
1
+ 44423d42b4a366763b5dfe91189ef3bd65ef0b8e
@@ -1 +1 @@
1
- 998e2d970ef7f8ad0b5b443385f0f1f63de16e2369a70d4c73bd6c7900466396
1
+ 099c36278363489d697e4c04a66fbfc86898ae9300ea8d7e0e3c0b968ec27394
@@ -1 +1 @@
1
- cb4a220567f912aed8b5caf20f4681d422bc3f7f6429c6753d85abcc8f72b8be0027e2e15d272e3c15237c4e73851142be876e13df98fcea92245b2061207504
1
+ 99b7ae296ab4f4d647760cf3e59c410251d28436af11fc5220e1e4936b544c8f4d40b03fbb74c7b2176100bddf8b2618e40b60c35cfbfb57174d94bedea17e78
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "expo-font",
3
- "version": "14.0.4",
3
+ "version": "14.0.5",
4
4
  "description": "Load fonts at runtime and use them in React Native components.",
5
5
  "main": "build/index.js",
6
6
  "types": "build/index.d.ts",
@@ -59,5 +59,5 @@
59
59
  "react": "*",
60
60
  "react-native": "*"
61
61
  },
62
- "gitHead": "d44e41c9c0714a838b1652556d27bcb506fabbdf"
62
+ "gitHead": "48faa7b9a9f93a7660cb80aa118c7f6bf0aeff38"
63
63
  }
package/src/FontUtils.ts CHANGED
@@ -2,9 +2,9 @@ import { UnavailabilityError } from 'expo-modules-core';
2
2
  import { processColor } from 'react-native';
3
3
 
4
4
  import ExpoFontUtils from './ExpoFontUtils';
5
- import { RenderToImageOptions } from './FontUtils.types';
5
+ import type { RenderToImageOptions, RenderToImageResult } from './FontUtils.types';
6
6
 
7
- export type { RenderToImageOptions };
7
+ export type { RenderToImageOptions, RenderToImageResult };
8
8
 
9
9
  /**
10
10
  * Creates an image with provided text.
@@ -17,7 +17,7 @@ export type { RenderToImageOptions };
17
17
  export async function renderToImageAsync(
18
18
  glyphs: string,
19
19
  options?: RenderToImageOptions
20
- ): Promise<string> {
20
+ ): Promise<RenderToImageResult> {
21
21
  if (!ExpoFontUtils) {
22
22
  throw new UnavailabilityError('expo-font', 'ExpoFontUtils.renderToImageAsync');
23
23
  }
@@ -15,3 +15,18 @@ export interface RenderToImageOptions {
15
15
  */
16
16
  color?: string;
17
17
  }
18
+
19
+ export interface RenderToImageResult {
20
+ /**
21
+ * The file uri to the image.
22
+ */
23
+ uri: string;
24
+ /**
25
+ * Image width.
26
+ */
27
+ width: number;
28
+ /**
29
+ * Image height.
30
+ */
31
+ height: number;
32
+ }
@@ -1 +0,0 @@
1
- 3082716e01b1aa6412301809f3a30add410f19cbc7ce8a4a3535bf7f575712a4
@@ -1 +0,0 @@
1
- 2c8069f25ea086e76885e4a9ba803bb5e62c8f82140d35dd34be3774aa083db6239e024b2cc4f7b1b7d0587c7bf9d022dcd6cbd5e4bfa403df27ee452ece90f9
@@ -1 +0,0 @@
1
- 5343861542a16d0a9ab8391c6fd2886afeb8a6e6
@@ -1 +0,0 @@
1
- 4ffb592fd95cbae524f5982a303b8bfe2d7ddb353b063e7c7ae4bc39e9f1dda6
@@ -1 +0,0 @@
1
- 6d7719c52520db8192d98350f1a5accab0ed6d30b5232c127e8cf64f1f42cafc54aba97531423f172a39c3beda38e643d1bb4b11d12ae974ba3e050a257a7bec
@@ -1 +0,0 @@
1
- b1f6b66ef860ba07fc7702f88ecbf7377f5b61a2
@@ -1 +0,0 @@
1
- 97b3a42028ac6847b59a253ab1ac9ec0007aeb02adaf60c32ceb953d9e4c0a77
@@ -1 +0,0 @@
1
- 80ed069a40b330357c705da18a7360d2b935a387077e473626cee2361c91ec719db5b74827427ce7d451dacf8baf545994982ba28470ab4b245f4dc6237bfcd6
@@ -1 +0,0 @@
1
- 0637c8eb0ff3091aad52e6c114c2439bfd841f22
@@ -1 +0,0 @@
1
- 749b97d819fb1e2b8edb8a47c91124a0f70d3476703a430a8a807992243f9760
@@ -1 +0,0 @@
1
- 95aebba94d2b5791dbc387c450213a2c8601488757e676cdf781cc7ff794be6434e5c4cc07fcdff06ef69f55592c59b585b49eada13b89e7f7c61aa902ec214d