unimonkiez / react-native-asset

Linking and unlinking of assets 🔥
298 stars 52 forks source link

add otf font file support #13

Closed punksta closed 5 years ago

punksta commented 5 years ago

fixes https://github.com/unimonkiez/react-native-asset/issues/12

punksta commented 5 years ago

@unimonkiez could you review this?

unimonkiez commented 5 years ago

Done! Thanks you! Available on v1.1.3

timri commented 5 years ago

There is a tiny bit still missing:

diff -ruw react-native-asset-orig/lib/index.js react-native-asset/lib/index.js
--- react-native-asset-orig/lib/index.js        2019-04-04 17:15:34.188000000 +0200
+++ react-native-asset/lib/index.js     2019-04-05 13:32:39.639928908 +0200
@@ -235,6 +235,7 @@
       cleanAssets: cleanAssetsIos,
       copyAssets: copyAssetsIos,
       linkOptionsPerExt: {
+        otf: linkOptionsPerExt.otf.ios,
         ttf: linkOptionsPerExt.ttf.ios,
         mp3: linkOptionsPerExt.mp3.ios,
       },
@@ -249,6 +250,7 @@
       cleanAssets: cleanAssetsAndroid,
       copyAssets: copyAssetsAndroid,
       linkOptionsPerExt: {
+        otf: linkOptionsPerExt.otf.android,
         ttf: linkOptionsPerExt.ttf.android,
         mp3: linkOptionsPerExt.mp3.android,
       },

(Currently in a hurry, so no pull-request ;-) )