Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions src/UglyToad.PdfPig.Fonts/SystemFonts/BrowserSystemFontLister.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
namespace UglyToad.PdfPig.Fonts.SystemFonts
{
#if NET
using System.Collections.Generic;

internal sealed class BrowserSystemFontLister : ISystemFontLister
{
// Very early version, intended to help developing support for browser

public IEnumerable<SystemFontRecord> GetAllFonts()
{
yield break;
}
}
#endif
}
6 changes: 5 additions & 1 deletion src/UglyToad.PdfPig.Fonts/SystemFonts/SystemFontFinder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,11 @@ static SystemFontFinder()
#if NET
else if (OperatingSystem.IsAndroid())
{
lister = new AndroidSystemFontLister();
lister = new AndroidSystemFontLister();
}
else if (OperatingSystem.IsBrowser())
{
lister = new BrowserSystemFontLister();
}
#endif
else
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ internal sealed class WindowsSystemFontLister : ISystemFontLister
{
public IEnumerable<SystemFontRecord> GetAllFonts()
{
// TODO: Could use System.Drawing InstalledFontCollection to do this?

var winDir = Environment.GetFolderPath(Environment.SpecialFolder.Windows);

var fonts = Path.Combine(winDir, "Fonts");
Expand Down