Skip to content

Instantly share code, notes, and snippets.

@vakrilov
Last active August 29, 2015 14:23
Show Gist options
  • Save vakrilov/7062c0b9101b2eedc046 to your computer and use it in GitHub Desktop.
Save vakrilov/7062c0b9101b2eedc046 to your computer and use it in GitHub Desktop.
NativeScript: Print iOS fonts
import utils = require("utils/utils");
var systemFontFamilies = utils.ios.collections.nsArrayToJSArray(UIFont.familyNames());
for (var i = 0; i < systemFontFamilies.length; i++) {
console.log("Family: " + systemFontFamilies[i]);
var fonts = utils.ios.collections.nsArrayToJSArray(UIFont.fontNamesForFamilyName(systemFontFamilies[i]));
for (var j = 0; j < fonts.length; j++) {
console.log(" Font: " + fonts[j]);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment