Compare commits
2 Commits
88e060a92b
...
3b52649ad2
Author | SHA1 | Date | |
---|---|---|---|
3b52649ad2 | |||
f8a4c73367 |
@ -1,5 +1,5 @@
|
||||
using System;
|
||||
using Quik.FreeType;
|
||||
using ReFuel.FreeType;
|
||||
|
||||
namespace Quik.Media.Defaults
|
||||
{
|
||||
|
@ -4,7 +4,7 @@ using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text.Json.Serialization;
|
||||
using System.Text.Json;
|
||||
using Quik.FreeType;
|
||||
using ReFuel.FreeType;
|
||||
using Quik.Media.Font;
|
||||
using Quik.PAL;
|
||||
using Quik.Media.Defaults.Linux;
|
||||
@ -41,6 +41,8 @@ namespace Quik.Media.Defaults.Fallback
|
||||
VerifyDatabase(database);
|
||||
FlushDatabase(database);
|
||||
|
||||
database.ForEach(x => AddFont(x.Face, new FileInfo(x.FilePath)));
|
||||
|
||||
(FontFace, FileInfo) serif = FontDataBaseProvider.ResolveSystemFont(EnvironmentVariables.SerifFont, LinuxFonts.DefaultSerifFamilies, this);
|
||||
SystemFonts[SystemFontFamily.Serif] = serif.Item1;
|
||||
(FontFace, FileInfo) sans = FontDataBaseProvider.ResolveSystemFont(EnvironmentVariables.SansFont, LinuxFonts.DefaultSansFamilies, this);
|
||||
@ -51,14 +53,6 @@ namespace Quik.Media.Defaults.Fallback
|
||||
SystemFonts[SystemFontFamily.Cursive] = cursive.Item1;
|
||||
(FontFace, FileInfo) fantasy = FontDataBaseProvider.ResolveSystemFont(EnvironmentVariables.FantasyFont, LinuxFonts.DefaultFantasyFamilies, this);
|
||||
SystemFonts[SystemFontFamily.Fantasy] = fantasy.Item1;
|
||||
|
||||
AddFont(serif.Item1, serif.Item2);
|
||||
AddFont(sans.Item1, sans.Item2);
|
||||
AddFont(mono.Item1, mono.Item2);
|
||||
AddFont(cursive.Item1, cursive.Item2);
|
||||
AddFont(fantasy.Item1, fantasy.Item2);
|
||||
|
||||
database.ForEach(x => AddFont(x.Face, new FileInfo(x.FilePath)));
|
||||
}
|
||||
|
||||
public FileInfo FontFileInfo(FontFace face)
|
||||
@ -241,7 +235,7 @@ namespace Quik.Media.Defaults.Fallback
|
||||
{
|
||||
FileInfo info = new FileInfo(DbPath);
|
||||
Directory.CreateDirectory(Path.GetDirectoryName(DbPath));
|
||||
using Stream str = info.OpenWrite();
|
||||
using Stream str = info.Open(FileMode.Create);
|
||||
JsonSerializer.Serialize(str, db);
|
||||
}
|
||||
|
||||
|
@ -3,7 +3,7 @@ using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using Quik.FreeType;
|
||||
using ReFuel.FreeType;
|
||||
using Quik.Media.Defaults.Fallback;
|
||||
using Quik.Media.Defaults.Linux;
|
||||
using Quik.Media.Font;
|
||||
|
@ -5,7 +5,7 @@ using System.Linq;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
using Quik.FreeType;
|
||||
using ReFuel.FreeType;
|
||||
using Quik.Media.Font;
|
||||
using Quik.PAL;
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
using System;
|
||||
using System.Buffers;
|
||||
using System.IO;
|
||||
using Quik.FreeType;
|
||||
using ReFuel.FreeType;
|
||||
using Quik.Media.Color;
|
||||
using Quik.Media.Font;
|
||||
|
||||
|
@ -8,7 +8,7 @@
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Quik.FreeType" Version="1.1.0" />
|
||||
<PackageReference Include="ReFuel.FreeType" Version="0.1.0-rc.3" />
|
||||
<PackageReference Include="ReFuel.StbImage" Version="2.0.0-rc.3" />
|
||||
</ItemGroup>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user