Skip to content

armgit / Filee

Public Imported from GitHub
0

Free, open-source file converter. Convert 263 formats offline by drag & drop — images, PDF, Word, Excel, PowerPoint, HWP/HWPX, video, audio, e-books and archives. No upload, no Office needed.

Hindi text uses a bundled Noto Sans Devanagari

KnifeLemon1b2869c66371
diff --git a/THIRD-PARTY-NOTICES.md b/THIRD-PARTY-NOTICES.md
index 6ca4408c..a6b78c5b 100644
--- a/THIRD-PARTY-NOTICES.md
+++ b/THIRD-PARTY-NOTICES.md
@@ -103,7 +103,7 @@ programs inside it are Inno Setup's.
| Component | License | Project |
|---|---|---|
-| Noto Sans, Noto Sans KR, Noto Sans SC | SIL Open Font License 1.1 | https://github.com/notofonts |
+| Noto Sans, Noto Sans KR, Noto Sans SC, Noto Sans Devanagari | SIL Open Font License 1.1 | https://github.com/notofonts |
| Test fonts in `tests/Filee.Engines.Tests/Fonts` (subsets of Noto Sans and Noto Sans KR; not shipped) | SIL Open Font License 1.1 | see `OFL.txt` in that folder |
| Material Design Icons (Pictogrammers) | Apache-2.0 | https://pictogrammers.com |
| Simple Icons 16.35.0 (GitHub Sponsors, Patreon, Ko-fi and PayPal logos in the Sponsor window) | CC0-1.0 | https://simpleicons.org |
diff --git a/build/fetch-fonts.ps1 b/build/fetch-fonts.ps1
index 66dc7e95..e063063b 100644
--- a/build/fetch-fonts.ps1
+++ b/build/fetch-fonts.ps1
@@ -18,18 +18,23 @@ param(
)
$ErrorActionPreference = 'Stop'
-$latin = 'https://raw.githubusercontent.com/notofonts/notofonts.github.io/28b15b4b43b7bed62b5cf6e6b0b5ff5846270535/fonts/NotoSans/hinted/ttf'
+$noto = 'https://raw.githubusercontent.com/notofonts/notofonts.github.io/28b15b4b43b7bed62b5cf6e6b0b5ff5846270535/fonts'
+$latin = "$noto/NotoSans/hinted/ttf"
+$devanagari = "$noto/NotoSansDevanagari/hinted/ttf"
$cjk = 'https://raw.githubusercontent.com/notofonts/noto-cjk/Sans2.004/Sans/SubsetOTF'
# File name => (URL, SHA-256). Update both together when bumping a version.
$fonts = [ordered]@{
- 'NotoSans-Regular.ttf' = @("$latin/NotoSans-Regular.ttf", '478C558EA716033CD60C03438F628DFA75694DCF6B5F6D505A2F05FD2B4F3823')
- 'NotoSans-Medium.ttf' = @("$latin/NotoSans-Medium.ttf", '635D93D1131D791F2576DE90B3BB0F7CDF61929906E8420A61B5F7F8E76420BB')
- 'NotoSans-Bold.ttf' = @("$latin/NotoSans-Bold.ttf", '1DF075A380FC7CB898ACF64C1F7B3B4DD780DE3CAA860178BF929DE35817A913')
- 'NotoSansKR-Regular.otf' = @("$cjk/KR/NotoSansKR-Regular.otf", '69975A0AC8472717870AEFEAB0A4D52739308D90856B9955313B2AD5E0148D68')
- 'NotoSansKR-Bold.otf' = @("$cjk/KR/NotoSansKR-Bold.otf", '5A6CEB287ED2FC6CFC6213144EBEA68CBD94B20FC9EB873D8486493BF02D9BDA')
- 'NotoSansSC-Regular.otf' = @("$cjk/SC/NotoSansSC-Regular.otf", 'FAA6C9DF652116DDE789D351359F3D7E5D2285A2B2A1F04A2D7244DF706D5EA9')
- 'NotoSansSC-Bold.otf' = @("$cjk/SC/NotoSansSC-Bold.otf", 'C6CB5A93ABAA9EDC8EE7463B7EBB7F42D618D40E6ED2F7A5371C97B0B64767C0')
+ 'NotoSans-Regular.ttf' = @("$latin/NotoSans-Regular.ttf", '478C558EA716033CD60C03438F628DFA75694DCF6B5F6D505A2F05FD2B4F3823')
+ 'NotoSans-Medium.ttf' = @("$latin/NotoSans-Medium.ttf", '635D93D1131D791F2576DE90B3BB0F7CDF61929906E8420A61B5F7F8E76420BB')
+ 'NotoSans-Bold.ttf' = @("$latin/NotoSans-Bold.ttf", '1DF075A380FC7CB898ACF64C1F7B3B4DD780DE3CAA860178BF929DE35817A913')
+ 'NotoSansDevanagari-Regular.ttf' = @("$devanagari/NotoSansDevanagari-Regular.ttf", '306B53ECFB182A504DD8A7446093C316387D2FD8DC350D0792ED1753FE0996CD')
+ 'NotoSansDevanagari-Medium.ttf' = @("$devanagari/NotoSansDevanagari-Medium.ttf", '4F46CF50B7992E61C7CEE7C4A8284450CCEED8B540B8ADBC8DF637C982C65757')
+ 'NotoSansDevanagari-Bold.ttf' = @("$devanagari/NotoSansDevanagari-Bold.ttf", '3AD8362A06271814869838DCC3D161B13C9FB97681B627AF1F7F283EA9387D56')
+ 'NotoSansKR-Regular.otf' = @("$cjk/KR/NotoSansKR-Regular.otf", '69975A0AC8472717870AEFEAB0A4D52739308D90856B9955313B2AD5E0148D68')
+ 'NotoSansKR-Bold.otf' = @("$cjk/KR/NotoSansKR-Bold.otf", '5A6CEB287ED2FC6CFC6213144EBEA68CBD94B20FC9EB873D8486493BF02D9BDA')
+ 'NotoSansSC-Regular.otf' = @("$cjk/SC/NotoSansSC-Regular.otf", 'FAA6C9DF652116DDE789D351359F3D7E5D2285A2B2A1F04A2D7244DF706D5EA9')
+ 'NotoSansSC-Bold.otf' = @("$cjk/SC/NotoSansSC-Bold.otf", 'C6CB5A93ABAA9EDC8EE7463B7EBB7F42D618D40E6ED2F7A5371C97B0B64767C0')
}
New-Item -ItemType Directory -Force -Path $Destination | Out-Null
diff --git a/src/Filee.App/Program.cs b/src/Filee.App/Program.cs
index bcd7fa63..385811bf 100644
--- a/src/Filee.App/Program.cs
+++ b/src/Filee.App/Program.cs
@@ -273,7 +273,8 @@ internal static class Program
.LogToTrace();
}
-/// <summary>Embedded Noto fonts: <c>fonts:Filee#Noto Sans</c>, <c>#Noto Sans KR</c>, <c>#Noto Sans SC</c>.</summary>
+/// <summary>Embedded Noto fonts: <c>fonts:Filee#Noto Sans</c>, <c>#Noto Sans KR</c>, <c>#Noto Sans SC</c>,
+/// <c>#Noto Sans Devanagari</c>.</summary>
internal sealed class FileeFontCollection() : Avalonia.Media.Fonts.EmbeddedFontCollection(
new Uri("fonts:Filee", UriKind.Absolute),
new Uri("avares://Filee/Assets/Fonts", UriKind.Absolute));
diff --git a/src/Filee.App/Services/ThemeService.cs b/src/Filee.App/Services/ThemeService.cs
index e87ca333..47f0ef41 100644
--- a/src/Filee.App/Services/ThemeService.cs
+++ b/src/Filee.App/Services/ThemeService.cs
@@ -20,7 +20,9 @@ public sealed class ThemeService(IPlatformServices platform)
private const string Latin = "fonts:Filee#Noto Sans";
private const string Korean = "fonts:Filee#Noto Sans KR";
private const string Chinese = "fonts:Filee#Noto Sans SC";
- private const string SystemFallbacks = "Segoe UI, Malgun Gothic, Microsoft YaHei, PingFang SC, Apple SD Gothic Neo, sans-serif";
+ private const string Devanagari = "fonts:Filee#Noto Sans Devanagari";
+ private const string SystemFallbacks =
+ "Segoe UI, Nirmala UI, Malgun Gothic, Microsoft YaHei, PingFang SC, Apple SD Gothic Neo, Kohinoor Devanagari, sans-serif";
public void Apply(ThemeSettings theme, string language)
{
@@ -62,7 +64,7 @@ public sealed class ThemeService(IPlatformServices platform)
var cjk = language.StartsWith("zh", StringComparison.OrdinalIgnoreCase)
? $"{Chinese}, {Korean}"
: $"{Korean}, {Chinese}";
- res["AppFontFamily"] = FontFamily.Parse($"{Latin}, {cjk}, {SystemFallbacks}");
+ res["AppFontFamily"] = FontFamily.Parse($"{Latin}, {Devanagari}, {cjk}, {SystemFallbacks}");
Motion.Configure(theme.ReduceMotion, () => platform.PrefersReducedMotion);
}