From 444530979a09769fb9026cc1db2529e9d6206949 Mon Sep 17 00:00:00 2001 From: eb1 Date: Tue, 27 Jan 2015 11:00:34 -0600 Subject: [PATCH] wp support --- plugin.xml | 19 ++++++++++++++++++- src/wp/Fonts.cs | 32 ++++++++++++++++++++++++++++++++ 2 files changed, 50 insertions(+), 1 deletion(-) create mode 100644 src/wp/Fonts.cs diff --git a/plugin.xml b/plugin.xml index 42f309f..254b0a0 100644 --- a/plugin.xml +++ b/plugin.xml @@ -49,5 +49,22 @@ - + + + + + + + + + + + + + + + + + + diff --git a/src/wp/Fonts.cs b/src/wp/Fonts.cs new file mode 100644 index 0000000..2b4b751 --- /dev/null +++ b/src/wp/Fonts.cs @@ -0,0 +1,32 @@ +using System; +using System.Runtime.Serialization; + +namespace WPCordovaClassLib.Cordova.Commands +{ + /// + /// Provides information about system locale, culture settings, number formats, ect. + /// + public class Fonts : BaseCommand + { + /// + /// Gets the string identifier for the client's current language. + /// + /// + public void getFontList(string options) + { + try + { + FontFamily[] fontFamilies; + + InstalledFontCollection installedFontCollection = new InstalledFontCollection(); + fontFamilies = installedFontCollection.Families; + PluginResult result = new PluginResult(PluginResult.Status.OK, this.WrapIntoJSON(fontFamilies)); + this.DispatchCommandResult(result); + } + catch (Exception) + { + this.DispatchCommandResult(new PluginResult(PluginResult.Status.ERROR, new GlobalizationError())); + } + } + } +} \ No newline at end of file