Skip to content

dbankier/TiDynamicFont

Repository files navigation

TiDynamicFont

This iOS modules allows for the dynamic loading of custom fonts without modify the Info.plist file.

See the following link for the original source and motivation. (Credits to @jeffbonnes for forwarding me the link.)

Example Usage

  var TiDynamicFont = require('yy.tidynamicfont');
  var file = Ti.Filesystem.getFile(Ti.Filesystem.resourcesDirectory, "comic_zine_ot.otf");
  TiDynamicFont.registerFont(file);

  // open a single window
  var win = Ti.UI.createWindow({
    backgroundColor:'white'
  });
  var label = Ti.UI.createLabel({
    text: "Hello World",
    font:{fontSize:54,fontFamily:"Comic Zine OT"}
  });
  win.add(label);
  win.open();

About

Titanium iOS modules for dynamically loading custom fonts

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published