Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 4073ede

Browse files
committed
Cleanup wrapper
1 parent 3ffda56 commit 4073ede

File tree

1 file changed

+0
-18
lines changed

1 file changed

+0
-18
lines changed

src/ft2font_wrapper.cpp

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -363,7 +363,6 @@ const char *PyFT2Font_init__doc__ =
363363

364364
static int PyFT2Font_init(PyFT2Font *self, PyObject *args, PyObject *kwds)
365365
{
366-
// printf("PyFT2Font init!\n");
367366
PyObject *filename = NULL, *open = NULL, *data = NULL, *fallback_list = NULL;
368367
FT_Open_Args open_args;
369368
long hinting_factor = 8;
@@ -400,7 +399,6 @@ static int PyFT2Font_init(PyFT2Font *self, PyObject *args, PyObject *kwds)
400399

401400
Py_INCREF(fallback_list);
402401
}
403-
// printf("Fallback SIZE: %lu \n", self->fallbacks.size());
404402

405403
if (PyBytes_Check(filename) || PyUnicode_Check(filename)) {
406404
if (!(open = PyDict_GetItemString(PyEval_GetBuiltins(), "open")) // Borrowed reference.
@@ -464,7 +462,6 @@ static PyObject *PyFT2Font_set_size(PyFT2Font *self, PyObject *args, PyObject *k
464462
{
465463
double ptsize;
466464
double dpi;
467-
// printf("PyFT, set_size called!\n");
468465

469466
if (!PyArg_ParseTuple(args, "dd:set_size", &ptsize, &dpi)) {
470467
return NULL;
@@ -781,7 +778,6 @@ static PyObject *PyFT2Font_load_char(PyFT2Font *self, PyObject *args, PyObject *
781778

782779
FT2Font *ft_object = NULL;
783780
CALL_CPP("load_char", (self->x->load_char(charcode, flags, ft_object, (bool)fallback)));
784-
// printf("Char %ld loaded to: %lu\n", charcode, ft_object->get_face()->num_glyphs);
785781

786782
return PyGlyph_new(self->x, ft_object);
787783
}
@@ -818,14 +814,8 @@ static PyObject *PyFT2Font_load_glyph(PyFT2Font *self, PyObject *args, PyObject
818814
return NULL;
819815
}
820816

821-
// if (!PyArg_ParseTupleAndKeywords(
822-
// args, kwds, "I|i$p:load_glyph", (char **)names, &glyph_index, &flags, &fallback)) {
823-
// return NULL;
824-
// }
825-
826817
FT2Font *ft_object = NULL;
827818
CALL_CPP("load_glyph", (self->x->load_glyph(glyph_index, flags, ft_object, (bool)fallback)));
828-
// printf("FT2Font for load_glyph: %lu\n", ft_object->get_face()->num_glyphs);
829819

830820
return PyGlyph_new(self->x, ft_object);
831821
}
@@ -1024,20 +1014,12 @@ static PyObject *PyFT2Font_get_char_index(PyFT2Font *self, PyObject *args, PyObj
10241014
FT_UInt index;
10251015
FT_ULong ccode;
10261016
int fallback = 1;
1027-
// printf("Inside get_char_index!\n");
10281017

10291018
if (!PyArg_ParseTuple(args, "k:get_char_index", &ccode)) {
10301019
return NULL;
10311020
}
10321021

1033-
// const char *names[] = { "ccode", "fallback", NULL };
1034-
// if (!PyArg_ParseTupleAndKeywords(
1035-
// args, kwds, "k|$p:get_char_index", (char **)names, &ccode, &fallback)) {
1036-
// return NULL;
1037-
// }
1038-
10391022
CALL_CPP("get_char_index", index = self->x->get_char_index(ccode, (bool)fallback));
1040-
// printf("FT2Font for %ld get_char_index: %lu\n", ccode, ft_object->get_face()->num_glyphs);
10411023

10421024
return PyLong_FromLong(index);
10431025
}

0 commit comments

Comments
 (0)