mirror of
https://github.com/UglyToad/PdfPig.git
synced 2025-04-05 20:55:01 +08:00
Add early version of BrowserSystemFontLister
This commit is contained in:
parent
a258090e1c
commit
f40545b0a5
@ -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
|
||||
}
|
@ -92,7 +92,11 @@ namespace UglyToad.PdfPig.Fonts.SystemFonts
|
||||
#if NET
|
||||
else if (OperatingSystem.IsAndroid())
|
||||
{
|
||||
lister = new AndroidSystemFontLister();
|
||||
lister = new AndroidSystemFontLister();
|
||||
}
|
||||
else if (OperatingSystem.IsBrowser())
|
||||
{
|
||||
lister = new BrowserSystemFontLister();
|
||||
}
|
||||
#endif
|
||||
else
|
||||
|
@ -8,8 +8,6 @@
|
||||
{
|
||||
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");
|
||||
|
Loading…
Reference in New Issue
Block a user