Skip to content

Releases: adapt-it/cordova-fonts

Maintenance release

12 Oct 17:55
@eb1 eb1
Compare
Choose a tag to compare

This release replaces the hard-coded default font string with a query to the Android system_fonts.xml file. No other changes from the 0.6.0 release.

getDefaultFont

01 Oct 15:20
@eb1 eb1
Compare
Choose a tag to compare

This release adds a new method, getDefaultFont:

GetDefaultFont

Parameters:

  • successCallback: Callback that returns the string name of the default font on the device.
  • errorCallback: Callback that executes if an error occurs during the call.

Android quirks

Android currently returns a hard-coded string for the default font, "Roboto Regular". I haven't yet found a way to get the name of the default font using the Android API (see Issue #2 and the corresponding query to Stack Overflow. The Android code will be updated if I can get a solution to this issue.

Firefox OS quirks

Firefox OS does not provide an API to access the fonts on the device. The Fonts plugin currently returns a hard-coded string for the default font "Fira Sans Regular". See https://www.mozilla.org/en-US/styleguide/products/firefox-os/typeface/ for more information.

Example

if (navigator.Fonts) {
    console.log("Fonts object in navigator");
    navigator.Fonts.getDefaultFont(
        function (defaultFont) {
            if (defaultFont) {
                console.log("Default Font: " + defaultFont);
            }
        },
        function (error) {
            console.log("DefaultFont error: " + error);
        }
    );
} else {
    console.log("Plugin error: Fonts plugin not found (is it installed?)");
}

Minor updates

21 Sep 20:54
@eb1 eb1
Compare
Choose a tag to compare

This release adds some travis-ci testing and fixes a couple other minor bugs. No other changes.

Release on npm

24 Apr 20:15
@eb1 eb1
Compare
Choose a tag to compare

This release is the first published to npm. Linky: https://www.npmjs.com/package/cordova-plugin-fonts

Firefox OS (unverified)

05 Mar 21:47
@eb1 eb1
Compare
Choose a tag to compare

This release includes support for iOS and Android / Amazon FireOS, as well as firefoxos (unverified).

Firefox OS does not provide an API to access the fonts on the device. The Fonts plugin currently returns a list corresponding to the fonts.mk file found in the mozilla-b2g project (https://github.com/mozilla-b2g/moztt/blob/master/fonts.mk), but it is a hard-coded list and not guaranteed to be correct on any particular version or distro of Firefox OS.

Initial release

16 Jan 17:04
@eb1 eb1
Compare
Choose a tag to compare

Supports iOS, Android and Amazon Fire devices.