Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit e868fbc

Browse filesBrowse files
committed
Remove prints
1 parent c6c3a45 commit e868fbc
Copy full SHA for e868fbc

File tree

5 files changed

+0
-48
lines changed
Filter options

5 files changed

+0
-48
lines changed

‎lib/matplotlib/backends/backend_agg.py

Copy file name to clipboardExpand all lines: lib/matplotlib/backends/backend_agg.py
-1Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,6 @@ def draw_text(self, gc, x, y, s, prop, angle, ismath=False, mtext=None):
186186
# We pass '0' for angle here, since it will be rotated (in raster
187187
# space) in the following call to draw_text_image).
188188
font.set_text(s, 0, flags=flags)
189-
190189
font.draw_glyphs_to_bitmap(
191190
antialiased=mpl.rcParams['text.antialiased'])
192191
d = font.get_descent() / 64.0

‎lib/matplotlib/font_manager.py

Copy file name to clipboardExpand all lines: lib/matplotlib/font_manager.py
-4Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1395,7 +1395,6 @@ def find_fontsprop(self, prop, fontext='ttf', directory=None,
13951395

13961396
return fpaths
13971397

1398-
13991398
@lru_cache()
14001399
def _findfontsprop_cached(
14011400
self, family, prop, fontext, directory,
@@ -1420,7 +1419,6 @@ def _findfontsprop_cached(
14201419
'findfont: Font family \'%s\' not found.', family
14211420
)
14221421

1423-
14241422
@lru_cache()
14251423
def _findfont_cached(self, prop, fontext, directory, fallback_to_default,
14261424
rebuild_if_missing, rc_params):
@@ -1523,13 +1521,11 @@ def _get_font(fpaths, hinting_factor, *, _kerning_factor, thread_id):
15231521
)
15241522
ftobjects.append(ftobject)
15251523

1526-
print("\nIn Python:", ftobjects, "\n")
15271524
ft2font_object = ft2font.FT2Font(
15281525
fpaths[0], hinting_factor,
15291526
_fallback_list=ftobjects,
15301527
_kerning_factor=_kerning_factor
15311528
)
1532-
print("\nBack to Python!\n")
15331529
return ft2font_object
15341530

15351531

‎src/ft2font.cpp

Copy file name to clipboardExpand all lines: src/ft2font.cpp
-39Lines changed: 0 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -396,13 +396,6 @@ void FT2Font::clear()
396396
}
397397
}
398398

399-
void FT2Font::check() {
400-
printf("Fallback num: -1; Numface: %lu\n", get_face()->num_glyphs);
401-
for (uint i = 0; i < fallbacks.size(); i++) {
402-
printf("Fallback num: %u; Numface: %lu\n", i, fallbacks[i]->get_face()->num_glyphs);
403-
}
404-
}
405-
406399
void FT2Font::set_size(double ptsize, double dpi)
407400
{
408401
FT_Error error = FT_Set_Char_Size(
@@ -481,7 +474,6 @@ void FT2Font::set_text(
481474
size_t N, uint32_t *codepoints, double angle, FT_Int32 flags, std::vector<double> &xys)
482475
{
483476
FT_Matrix matrix; /* transformation matrix */
484-
check();
485477

486478
angle = angle / 360.0 * 2 * M_PI;
487479

@@ -507,10 +499,8 @@ void FT2Font::set_text(
507499
FT_UInt final_glyph_index;
508500
FT_Error charcode_error, glyph_error;
509501
FT2Font *ft_object_with_glyph = this;
510-
printf("\nBefore loading char! \n");
511502
load_char_with_fallback(ft_object_with_glyph, final_glyph_index, glyphs, codepoints[n],
512503
flags, charcode_error, glyph_error);
513-
printf("Final ft2font: %lu\n", ft_object_with_glyph->get_face()->num_glyphs);
514504
if (charcode_error || glyph_error) {
515505
ft_glyph_warn((FT_ULong)codepoints[n]);
516506
return;
@@ -525,25 +515,9 @@ void FT2Font::set_text(
525515
pen.x += delta.x / (hinting_factor << kerning_factor);
526516
}
527517

528-
// DONE with load_char_with_fallback
529-
// if (FT_Error error = FT_Load_Glyph(face, glyph_index, flags)) {
530-
// throw_ft_error("Could not load glyph", error);
531-
// }
532-
533-
// ignore errors, jump to next glyph
534-
535518
// extract glyph image and store it in our table
536-
537-
// DONE with load_char_with_fallback
538-
// FT_Glyph thisGlyph;
539-
// if (FT_Error error = FT_Get_Glyph(face->glyph, &thisGlyph)) {
540-
// throw_ft_error("Could not get glyph", error);
541-
// }
542-
// ignore errors, jump to next glyph
543-
544519
FT_Glyph &thisGlyph = glyphs[glyphs.size() - 1];
545520

546-
// Compare with thisGlyph?
547521
last_advance = ft_object_with_glyph->get_face()->glyph->advance.x;
548522
FT_Glyph_Transform(thisGlyph, 0, &pen);
549523
FT_Glyph_Transform(thisGlyph, &matrix, 0);
@@ -560,10 +534,6 @@ void FT2Font::set_text(
560534
pen.x += last_advance;
561535

562536
previous = glyph_index;
563-
564-
printf("Set_Text complete! \n");
565-
// DONE with load_char_with_fallback
566-
// glyphs.push_back(thisGlyph);
567537
}
568538

569539
FT_Vector_Transform(&pen, &matrix);
@@ -595,34 +565,25 @@ void FT2Font::load_char_with_fallback(FT2Font* &ft_object_with_glyph,
595565
FT_Error &charcode_error,
596566
FT_Error &glyph_error)
597567
{
598-
printf("loading char!\n");
599568
FT_UInt glyph_index = FT_Get_Char_Index(face, charcode);
600569

601570
if (glyph_index) {
602-
printf("glyph found!\n");
603571
charcode_error = FT_Load_Glyph(face, glyph_index, flags);
604-
// throw_ft_error("Could not load charcode", error);
605572
FT_Glyph thisGlyph;
606573
glyph_error = FT_Get_Glyph(face->glyph, &thisGlyph);
607-
// throw_ft_error("Could not get glyph", error);
608574
final_glyph_index = glyph_index;
609575
parent_glyphs.push_back(thisGlyph);
610576
}
611577

612578
else {
613-
printf("glyph not found! Fallback size: %lu\n", fallbacks.size());
614579
for (uint i = 0; i < fallbacks.size(); ++i) {
615580
uint current_size = parent_glyphs.size();
616-
printf("Fallback %u: %u\n", i, current_size);
617581
fallbacks[i]->load_char_with_fallback(ft_object_with_glyph, final_glyph_index,
618582
parent_glyphs, charcode, flags, charcode_error,
619583
glyph_error);
620-
printf("Got back from fallback load char!\n");
621584
// jump out if glyph size increased
622585
if (parent_glyphs.size() == current_size + 1) {
623-
printf("size increased!\n");
624586
ft_object_with_glyph = fallbacks[i];
625-
printf("Ft object assigned!\n");
626587
return;
627588
}
628589
}

‎src/ft2font.h

Copy file name to clipboardExpand all lines: src/ft2font.h
-1Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,6 @@ class FT2Font
7575
void set_size(double ptsize, double dpi);
7676
void set_charmap(int i);
7777
void set_fallbacks(std::vector<FT2Font *> &fallback_list);
78-
void check();
7978
void select_charmap(unsigned long i);
8079
void set_text(
8180
size_t N, uint32_t *codepoints, double angle, FT_Int32 flags, std::vector<double> &xys);

‎src/ft2font_wrapper.cpp

Copy file name to clipboardExpand all lines: src/ft2font_wrapper.cpp
-3Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -362,7 +362,6 @@ const char *PyFT2Font_init__doc__ =
362362

363363
static int PyFT2Font_init(PyFT2Font *self, PyObject *args, PyObject *kwds)
364364
{
365-
printf("PyFT2Font init!\n");
366365
PyObject *filename = NULL, *open = NULL, *data = NULL, *fallback_list = NULL;
367366
FT_Open_Args open_args;
368367
long hinting_factor = 8;
@@ -399,7 +398,6 @@ static int PyFT2Font_init(PyFT2Font *self, PyObject *args, PyObject *kwds)
399398

400399
Py_INCREF(fallback_list);
401400
}
402-
printf("Fallback SIZE: %lu \n", self->fallbacks.size());
403401

404402
if (PyBytes_Check(filename) || PyUnicode_Check(filename)) {
405403
if (!(open = PyDict_GetItemString(PyEval_GetBuiltins(), "open")) // Borrowed reference.
@@ -463,7 +461,6 @@ static PyObject *PyFT2Font_set_size(PyFT2Font *self, PyObject *args, PyObject *k
463461
{
464462
double ptsize;
465463
double dpi;
466-
printf("PyFT, set_size called!\n");
467464

468465
if (!PyArg_ParseTuple(args, "dd:set_size", &ptsize, &dpi)) {
469466
return NULL;

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.