Sha256: 55cb3ca75eab8940db083dd9286a8614f1c577f08594ef30c8d3f760262ecf87

Contents?: true

Size: 773 Bytes

Versions: 61

Compression:

Stored size: 773 Bytes

Contents

describe('FontRuler', function () {
  var Font = webfont.Font,
      FontRuler = webfont.FontRuler,
      DomHelper = webfont.DomHelper,
      Size = webfont.Size,
      domHelper = null,
      font = null;

  beforeEach(function () {
    font = new Font('sans-serif');
    domHelper = new DomHelper(window);
  });

  it('should prevent a long test string from word wrapping', function () {
    var fontRulerA = new FontRuler(domHelper, 'abc'),
        fontRulerB = new FontRuler(domHelper, 'abc HelloWorld,thisshouldwrap!!!!');

    fontRulerA.insert();
    fontRulerB.insert();

    fontRulerA.setFont(font);
    fontRulerB.setFont(font);

    var widthA = fontRulerA.getWidth(),
        widthB = fontRulerB.getWidth();

    expect(widthA).not.toEqual(widthB);
  });
});

Version data entries

61 entries across 61 versions & 1 rubygems

Version Path
webfontloader-1.6.28 spec/core/fontruler_spec.js
webfontloader-1.6.27 spec/core/fontruler_spec.js
webfontloader-1.6.26 spec/core/fontruler_spec.js
webfontloader-1.6.25 spec/core/fontruler_spec.js
webfontloader-1.6.24 spec/core/fontruler_spec.js
webfontloader-1.6.23 spec/core/fontruler_spec.js
webfontloader-1.6.22 spec/core/fontruler_spec.js
webfontloader-1.6.21 spec/core/fontruler_spec.js
webfontloader-1.6.20 spec/core/fontruler_spec.js
webfontloader-1.6.19 spec/core/fontruler_spec.js
webfontloader-1.6.18 spec/core/fontruler_spec.js
webfontloader-1.6.16 spec/core/fontruler_spec.js
webfontloader-1.6.15 spec/core/fontruler_spec.js
webfontloader-1.6.14 spec/core/fontruler_spec.js
webfontloader-1.6.13 spec/core/fontruler_spec.js
webfontloader-1.6.12 spec/core/fontruler_spec.js
webfontloader-1.6.11 spec/core/fontruler_spec.js
webfontloader-1.6.10 spec/core/fontruler_spec.js
webfontloader-1.6.9 spec/core/fontruler_spec.js
webfontloader-1.6.8 spec/core/fontruler_spec.js