@@ -396,13 +396,6 @@ void FT2Font::clear()
396
396
}
397
397
}
398
398
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
-
406
399
void FT2Font::set_size (double ptsize, double dpi)
407
400
{
408
401
FT_Error error = FT_Set_Char_Size (
@@ -507,10 +500,8 @@ void FT2Font::set_text(
507
500
FT_UInt final_glyph_index;
508
501
FT_Error charcode_error, glyph_error;
509
502
FT2Font *ft_object_with_glyph = this ;
510
- printf (" \n Before loading char! \n " );
511
503
load_char_with_fallback (ft_object_with_glyph, final_glyph_index, glyphs, codepoints[n],
512
504
flags, charcode_error, glyph_error);
513
- printf (" Final ft2font: %lu\n " , ft_object_with_glyph->get_face ()->num_glyphs );
514
505
if (charcode_error || glyph_error) {
515
506
ft_glyph_warn ((FT_ULong)codepoints[n]);
516
507
return ;
@@ -561,7 +552,6 @@ void FT2Font::set_text(
561
552
562
553
previous = glyph_index;
563
554
564
- printf (" Set_Text complete! \n " );
565
555
// DONE with load_char_with_fallback
566
556
// glyphs.push_back(thisGlyph);
567
557
}
@@ -595,34 +585,25 @@ void FT2Font::load_char_with_fallback(FT2Font* &ft_object_with_glyph,
595
585
FT_Error &charcode_error,
596
586
FT_Error &glyph_error)
597
587
{
598
- printf (" loading char!\n " );
599
588
FT_UInt glyph_index = FT_Get_Char_Index (face, charcode);
600
589
601
590
if (glyph_index) {
602
- printf (" glyph found!\n " );
603
591
charcode_error = FT_Load_Glyph (face, glyph_index, flags);
604
- // throw_ft_error("Could not load charcode", error);
605
592
FT_Glyph thisGlyph;
606
593
glyph_error = FT_Get_Glyph (face->glyph , &thisGlyph);
607
- // throw_ft_error("Could not get glyph", error);
608
594
final_glyph_index = glyph_index;
609
595
parent_glyphs.push_back (thisGlyph);
610
596
}
611
597
612
598
else {
613
- printf (" glyph not found! Fallback size: %lu\n " , fallbacks.size ());
614
599
for (uint i = 0 ; i < fallbacks.size (); ++i) {
615
600
uint current_size = parent_glyphs.size ();
616
- printf (" Fallback %u: %u\n " , i, current_size);
617
601
fallbacks[i]->load_char_with_fallback (ft_object_with_glyph, final_glyph_index,
618
602
parent_glyphs, charcode, flags, charcode_error,
619
603
glyph_error);
620
- printf (" Got back from fallback load char!\n " );
621
604
// jump out if glyph size increased
622
605
if (parent_glyphs.size () == current_size + 1 ) {
623
- printf (" size increased!\n " );
624
606
ft_object_with_glyph = fallbacks[i];
625
- printf (" Ft object assigned!\n " );
626
607
return ;
627
608
}
628
609
}
0 commit comments