GeezerVison is showing github.com — Remove forced fallback from FT2Font::load_char · matplotlib/matplotlib@39c8238
File treeExpand file treeCollapse file tree Open diff view settings Expand file treeCollapse file tree Open diff view settings Collapse file Copy file name to clipboardExpand all lines: src/ft2font.cpp +4-5Lines changed: 4 additions & 5 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -552,7 +552,7 @@ void FT2Font::load_char(long charcode, FT_Int32 flags, FT2Font *&ft_object, bool | 552 | 552 | bool was_found = load_char_with_fallback(ft_object_with_glyph, final_glyph_index, | 553 | 553 | glyphs, char_to_font, | 554 | 554 | charcode, flags, charcode_error, glyph_error, | 555 | | - glyph_seen_fonts, true); | | 555 | + glyph_seen_fonts); | 556 | 556 | if (!was_found) { | 557 | 557 | ft_glyph_warn(charcode, glyph_seen_fonts); | 558 | 558 | if (charcode_error) { | @@ -613,15 +613,14 @@ bool FT2Font::load_char_with_fallback(FT2Font *&ft_object_with_glyph, | 613 | 613 | FT_Int32 flags, | 614 | 614 | FT_Error &charcode_error, | 615 | 615 | FT_Error &glyph_error, | 616 | | - std::set<FT_String*> &glyph_seen_fonts, | 617 | | - bool override = false) | | 616 | + std::set<FT_String*> &glyph_seen_fonts) | 618 | 617 | { | 619 | 618 | FT_UInt glyph_index = FT_Get_Char_Index(face, charcode); | 620 | 619 | if (!warn_if_used) { | 621 | 620 | glyph_seen_fonts.insert(face->family_name); | 622 | 621 | } | 623 | 622 |
| 624 | | - if (glyph_index || override) { | | 623 | + if (glyph_index) { | 625 | 624 | charcode_error = FT_Load_Glyph(face, glyph_index, flags); | 626 | 625 | if (charcode_error) { | 627 | 626 | return false; | @@ -647,7 +646,7 @@ bool FT2Font::load_char_with_fallback(FT2Font *&ft_object_with_glyph, | 647 | 646 | bool was_found = fallback->load_char_with_fallback( | 648 | 647 | ft_object_with_glyph, final_glyph_index, parent_glyphs, | 649 | 648 | parent_char_to_font, charcode, flags, | 650 | | - charcode_error, glyph_error, glyph_seen_fonts, override); | | 649 | + charcode_error, glyph_error, glyph_seen_fonts); | 651 | 650 | if (was_found) { | 652 | 651 | return true; | 653 | 652 | } | |
Collapse file Copy file name to clipboardExpand all lines: src/ft2font.h +1-2Lines changed: 1 addition & 2 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -131,8 +131,7 @@ class FT2Font | 131 | 131 | FT_Int32 flags, | 132 | 132 | FT_Error &charcode_error, | 133 | 133 | FT_Error &glyph_error, | 134 | | - std::set<FT_String*> &glyph_seen_fonts, | 135 | | - bool override); | | 134 | + std::set<FT_String*> &glyph_seen_fonts); | 136 | 135 | void load_glyph(FT_UInt glyph_index, FT_Int32 flags); | 137 | 136 | std::tuple<long, long> get_width_height(); | 138 | 137 | std::tuple<long, long> get_bitmap_offset(); | |
|