From 4ef2f704be8a1076480f9e6eec678713262c39f2 Mon Sep 17 00:00:00 2001 From: Satindar Dhillon Date: Sun, 20 Mar 2022 21:54:46 -0700 Subject: [PATCH] load fonts into webview --- .../Views/WebReader/WebReaderContent.swift | 3 + .../fonts => }/Inter/Inter-Black-900.ttf | Bin .../fonts => }/Inter/Inter-Bold-700.ttf | Bin .../fonts => }/Inter/Inter-ExtraBold-800.ttf | Bin .../fonts => }/Inter/Inter-ExtraLight-200.ttf | Bin .../fonts => }/Inter/Inter-Light-300.ttf | Bin .../fonts => }/Inter/Inter-Medium-500.ttf | Bin .../fonts => }/Inter/Inter-Regular-400.ttf | Bin .../fonts => }/Inter/Inter-SemiBold-600.ttf | Bin .../fonts => }/Inter/Inter-Thin-100.ttf | Bin .../fonts => }/SFMono/SFMonoRegular.otf | Bin .../Sources/Utils/Resources/fonts.css | 62 ++++++++++++++++++ 12 files changed, 65 insertions(+) rename apple/OmnivoreKit/Sources/Utils/Resources/{web/public/static/fonts => }/Inter/Inter-Black-900.ttf (100%) rename apple/OmnivoreKit/Sources/Utils/Resources/{web/public/static/fonts => }/Inter/Inter-Bold-700.ttf (100%) rename apple/OmnivoreKit/Sources/Utils/Resources/{web/public/static/fonts => }/Inter/Inter-ExtraBold-800.ttf (100%) rename apple/OmnivoreKit/Sources/Utils/Resources/{web/public/static/fonts => }/Inter/Inter-ExtraLight-200.ttf (100%) rename apple/OmnivoreKit/Sources/Utils/Resources/{web/public/static/fonts => }/Inter/Inter-Light-300.ttf (100%) rename apple/OmnivoreKit/Sources/Utils/Resources/{web/public/static/fonts => }/Inter/Inter-Medium-500.ttf (100%) rename apple/OmnivoreKit/Sources/Utils/Resources/{web/public/static/fonts => }/Inter/Inter-Regular-400.ttf (100%) rename apple/OmnivoreKit/Sources/Utils/Resources/{web/public/static/fonts => }/Inter/Inter-SemiBold-600.ttf (100%) rename apple/OmnivoreKit/Sources/Utils/Resources/{web/public/static/fonts => }/Inter/Inter-Thin-100.ttf (100%) rename apple/OmnivoreKit/Sources/Utils/Resources/{web/public/static/fonts => }/SFMono/SFMonoRegular.otf (100%) create mode 100644 apple/OmnivoreKit/Sources/Utils/Resources/fonts.css diff --git a/apple/OmnivoreKit/Sources/App/Views/WebReader/WebReaderContent.swift b/apple/OmnivoreKit/Sources/App/Views/WebReader/WebReaderContent.swift index ef51fc49c..b77c0a535 100644 --- a/apple/OmnivoreKit/Sources/App/Views/WebReader/WebReaderContent.swift +++ b/apple/OmnivoreKit/Sources/App/Views/WebReader/WebReaderContent.swift @@ -48,6 +48,9 @@ struct WebReaderContent { +
diff --git a/apple/OmnivoreKit/Sources/Utils/Resources/web/public/static/fonts/Inter/Inter-Black-900.ttf b/apple/OmnivoreKit/Sources/Utils/Resources/Inter/Inter-Black-900.ttf similarity index 100% rename from apple/OmnivoreKit/Sources/Utils/Resources/web/public/static/fonts/Inter/Inter-Black-900.ttf rename to apple/OmnivoreKit/Sources/Utils/Resources/Inter/Inter-Black-900.ttf diff --git a/apple/OmnivoreKit/Sources/Utils/Resources/web/public/static/fonts/Inter/Inter-Bold-700.ttf b/apple/OmnivoreKit/Sources/Utils/Resources/Inter/Inter-Bold-700.ttf similarity index 100% rename from apple/OmnivoreKit/Sources/Utils/Resources/web/public/static/fonts/Inter/Inter-Bold-700.ttf rename to apple/OmnivoreKit/Sources/Utils/Resources/Inter/Inter-Bold-700.ttf diff --git a/apple/OmnivoreKit/Sources/Utils/Resources/web/public/static/fonts/Inter/Inter-ExtraBold-800.ttf b/apple/OmnivoreKit/Sources/Utils/Resources/Inter/Inter-ExtraBold-800.ttf similarity index 100% rename from apple/OmnivoreKit/Sources/Utils/Resources/web/public/static/fonts/Inter/Inter-ExtraBold-800.ttf rename to apple/OmnivoreKit/Sources/Utils/Resources/Inter/Inter-ExtraBold-800.ttf diff --git a/apple/OmnivoreKit/Sources/Utils/Resources/web/public/static/fonts/Inter/Inter-ExtraLight-200.ttf b/apple/OmnivoreKit/Sources/Utils/Resources/Inter/Inter-ExtraLight-200.ttf similarity index 100% rename from apple/OmnivoreKit/Sources/Utils/Resources/web/public/static/fonts/Inter/Inter-ExtraLight-200.ttf rename to apple/OmnivoreKit/Sources/Utils/Resources/Inter/Inter-ExtraLight-200.ttf diff --git a/apple/OmnivoreKit/Sources/Utils/Resources/web/public/static/fonts/Inter/Inter-Light-300.ttf b/apple/OmnivoreKit/Sources/Utils/Resources/Inter/Inter-Light-300.ttf similarity index 100% rename from apple/OmnivoreKit/Sources/Utils/Resources/web/public/static/fonts/Inter/Inter-Light-300.ttf rename to apple/OmnivoreKit/Sources/Utils/Resources/Inter/Inter-Light-300.ttf diff --git a/apple/OmnivoreKit/Sources/Utils/Resources/web/public/static/fonts/Inter/Inter-Medium-500.ttf b/apple/OmnivoreKit/Sources/Utils/Resources/Inter/Inter-Medium-500.ttf similarity index 100% rename from apple/OmnivoreKit/Sources/Utils/Resources/web/public/static/fonts/Inter/Inter-Medium-500.ttf rename to apple/OmnivoreKit/Sources/Utils/Resources/Inter/Inter-Medium-500.ttf diff --git a/apple/OmnivoreKit/Sources/Utils/Resources/web/public/static/fonts/Inter/Inter-Regular-400.ttf b/apple/OmnivoreKit/Sources/Utils/Resources/Inter/Inter-Regular-400.ttf similarity index 100% rename from apple/OmnivoreKit/Sources/Utils/Resources/web/public/static/fonts/Inter/Inter-Regular-400.ttf rename to apple/OmnivoreKit/Sources/Utils/Resources/Inter/Inter-Regular-400.ttf diff --git a/apple/OmnivoreKit/Sources/Utils/Resources/web/public/static/fonts/Inter/Inter-SemiBold-600.ttf b/apple/OmnivoreKit/Sources/Utils/Resources/Inter/Inter-SemiBold-600.ttf similarity index 100% rename from apple/OmnivoreKit/Sources/Utils/Resources/web/public/static/fonts/Inter/Inter-SemiBold-600.ttf rename to apple/OmnivoreKit/Sources/Utils/Resources/Inter/Inter-SemiBold-600.ttf diff --git a/apple/OmnivoreKit/Sources/Utils/Resources/web/public/static/fonts/Inter/Inter-Thin-100.ttf b/apple/OmnivoreKit/Sources/Utils/Resources/Inter/Inter-Thin-100.ttf similarity index 100% rename from apple/OmnivoreKit/Sources/Utils/Resources/web/public/static/fonts/Inter/Inter-Thin-100.ttf rename to apple/OmnivoreKit/Sources/Utils/Resources/Inter/Inter-Thin-100.ttf diff --git a/apple/OmnivoreKit/Sources/Utils/Resources/web/public/static/fonts/SFMono/SFMonoRegular.otf b/apple/OmnivoreKit/Sources/Utils/Resources/SFMono/SFMonoRegular.otf similarity index 100% rename from apple/OmnivoreKit/Sources/Utils/Resources/web/public/static/fonts/SFMono/SFMonoRegular.otf rename to apple/OmnivoreKit/Sources/Utils/Resources/SFMono/SFMonoRegular.otf diff --git a/apple/OmnivoreKit/Sources/Utils/Resources/fonts.css b/apple/OmnivoreKit/Sources/Utils/Resources/fonts.css new file mode 100644 index 000000000..b295e8f80 --- /dev/null +++ b/apple/OmnivoreKit/Sources/Utils/Resources/fonts.css @@ -0,0 +1,62 @@ +@font-face { + font-family: 'Inter'; + font-weight: 200; + font-style: normal; + src: url('Inter-ExtraLight-200.ttf'); +} + +@font-face { + font-family: 'Inter'; + font-weight: 300; + font-style: normal; + src: url('Inter-Light-300.ttf'); +} + +@font-face { + font-family: 'Inter'; + font-weight: 400; + font-style: normal; + src: url('Inter-Regular-400.ttf'); +} + +@font-face { + font-family: 'Inter'; + font-weight: 500; + font-style: normal; + src: url('Inter-Medium-500.ttf'); +} + +@font-face { + font-family: 'SF Mono'; + font-weight: 400; + font-style: normal; + src: url('SFMonoRegular.otf'); +} + +@font-face { + font-family: 'Inter'; + font-weight: 600; + font-style: normal; + src: url('Inter-SemiBold-600.ttf'); +} + +@font-face { + font-family: 'Inter'; + font-weight: 700; + font-style: normal; + src: url('Inter-Bold-700.ttf'); +} + +@font-face { + font-family: 'Inter'; + font-weight: 800; + font-style: normal; + src: url('Inter-ExtraBold-800.ttf'); +} + +@font-face { + font-family: 'Inter'; + font-weight: 900; + font-style: normal; + src: url('Inter-Black-900.ttf'); +}