Skip to content

Commit

Permalink
Update to 0.5.0
Browse files Browse the repository at this point in the history
  • Loading branch information
eb1 committed Jun 6, 2016
1 parent a87257a commit 731356c
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 9 deletions.
3 changes: 1 addition & 2 deletions doc/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,8 @@ Config.xml for PhoneGap Build:

<gap:plugin name="cordova-plugin-fonts" source="npm" />

Note: these commands will install the plugin from npm, which is new to this release (0.4.0). You can find this plugin up on npm [here](https://www.npmjs.com/package/cordova-plugin-fonts), or by searching for `ecosystem:cordova` in the npm registry like [this](https://www.npmjs.com/search?q=ecosystem%3Acordova).
These commands will install the plugin from npm. You can find this plugin up on npm [here](https://www.npmjs.com/package/cordova-plugin-fonts), or by searching for `ecosystem:cordova` in the npm registry like [this](https://www.npmjs.com/search?q=ecosystem%3Acordova).

The plugin should also be available on the cordova plugins registry until October 15, 2015, but please switch to the new location / syntax to avoid weird build breaks. :-)

## Supported Platforms

Expand Down
11 changes: 10 additions & 1 deletion plugin.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version='1.0' encoding='utf-8'?>
<plugin id="cordova-plugin-fonts"
version="0.4.0"
version="0.5.0"
xmlns="http://apache.org/cordova/ns/plugins/1.0"
xmlns:rim="http://www.blackberry.com/ns/widgets"
xmlns:android="http://schemas.android.com/apk/res/android">
Expand Down Expand Up @@ -58,4 +58,13 @@
</config-file>
<source-file src="src/wp/Fonts.cs" />
</platform>
<!-- windows (UWP) -->
<platform name="windows">
<config-file target="config.xml" parent="/*">
<feature name="Fonts">
<param name="wp-package" value="Fonts"/>
</feature>
</config-file>
<source-file src="src/wp/Fonts.cs" />
</platform>
</plugin>
9 changes: 3 additions & 6 deletions src/wp/Fonts.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,19 @@
namespace WPCordovaClassLib.Cordova.Commands
{
/// <summary>
/// Provides information about system locale, culture settings, number formats, ect.
/// Base Fonts object
/// </summary>
public class Fonts : BaseCommand
{
/// <summary>
/// Gets the string identifier for the client's current language.
/// Returns a string array containing the (an-us) names of the fonts installed on the system.
/// </summary>
/// <param name="options"></param>
public void getFontList(string options)
{
try
{
FontFamily[] fontFamilies;

InstalledFontCollection installedFontCollection = new InstalledFontCollection();
fontFamilies = installedFontCollection.Families;
string[] fontFamilies = Microsoft.Graphics.Text.CanvasTextFormat.GetSystemFontFamilies();
PluginResult result = new PluginResult(PluginResult.Status.OK, this.WrapIntoJSON(fontFamilies));
this.DispatchCommandResult(result);
}
Expand Down

0 comments on commit 731356c

Please sign in to comment.