Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Cleanup

  • Loading branch information...
commit fa54e2ba92b084be1a66c5dfa03e60240eaa8b3a 1 parent e594f52
Julian Viereck authored
1  lib/context2d.js
@@ -99,7 +99,6 @@ var parseFont = exports.parseFont = function(str){
99 99 return cache[str] = font;
100 100 };
101 101
102   -
103 102 /**
104 103 * Create a pattern from `Image` or `Canvas`.
105 104 *
6 src/CanvasRenderingContext2d.cc
@@ -1625,7 +1625,6 @@ Context2d::PrepareTrueTypeFace(const Arguments &args) {
1625 1625 return ThrowException(Exception::TypeError(String::New("TrueTypeFontFace expected")));
1626 1626
1627 1627 Context2d *context = ObjectWrap::Unwrap<Context2d>(args.This());
1628   - cairo_t *ctx = context->context();
1629 1628
1630 1629 cairo_font_face_t *cr_face;
1631 1630 TrueTypeFontFace *face = ObjectWrap::Unwrap<TrueTypeFontFace>(obj);
@@ -1635,9 +1634,6 @@ Context2d::PrepareTrueTypeFace(const Arguments &args) {
1635 1634 vector<cairo_font_face_t*> *font_faces = context->font_faces();
1636 1635 font_faces->insert(font_faces->end(), cr_face);
1637 1636
1638   - cairo_set_font_face(ctx, cr_face);
1639   - printf("=== PrepareTrueTypeFace %p %p %d\n", context, font_faces, int(font_faces->size()));
1640   -
1641 1637 return scope.Close(Number::New(font_faces->size() - 1));
1642 1638 }
1643 1639
@@ -1712,7 +1708,7 @@ Context2d::SetFont(const Arguments &args) {
1712 1708 w = CAIRO_FONT_WEIGHT_BOLD;
1713 1709 }
1714 1710
1715   - cairo_select_font_face(ctx, *family, s, w);
  1711 + cairo_select_font_face(ctx, *family, s, w);
1716 1712
1717 1713 return Undefined();
1718 1714 }
1  src/CanvasRenderingContext2d.h
@@ -16,7 +16,6 @@
16 16 #include <cairo-ft.h>
17 17 #include FT_FREETYPE_H
18 18
19   -#include <string>
20 19 #include <vector>
21 20 using namespace std;
22 21
6 src/TrueTypeFont.cc
@@ -45,20 +45,20 @@ TrueTypeFontFace::New(const Arguments &args) {
45 45 }
46 46
47 47 String::AsciiValue filePath(args[0]);
48   - int faceIdx = int(args[1]->NumberValue());
  48 + int faceIdx = int(args[1]->NumberValue());
49 49
50 50 FT_Face ft_face; /* handle to face object */
51 51 FT_Error ft_error;
52 52
53 53 if (_initLibrary) {
54 54 _initLibrary = false;
55   - ft_error = FT_Init_FreeType( &library );
  55 + ft_error = FT_Init_FreeType(&library);
56 56 if (ft_error) {
57 57 return ThrowException(Exception::Error(String::New("Could not load library")));
58 58 }
59 59 }
60 60
61   - ft_error = FT_New_Face( library, *filePath, faceIdx, &ft_face );
  61 + ft_error = FT_New_Face(library, *filePath, faceIdx, &ft_face);
62 62 if (ft_error) {
63 63 return ThrowException(Exception::Error(String::New("Could not load font file")));
64 64 }
1  src/init.cc
@@ -29,3 +29,4 @@ init (Handle<Object> target) {
29 29 }
30 30
31 31 NODE_MODULE(canvas,init);
  32 +

0 comments on commit fa54e2b

Please sign in to comment.
Something went wrong with that request. Please try again.