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

Skip to content

Warn on freetype missing glyphs. #9175

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

anntzer
Copy link
Contributor

@anntzer anntzer commented Sep 9, 2017

There is an additional call site to FT_Get_Char_Index in
PyFT2Font_get_char_index but that value is directly returned to Python
so it would be easier to check for the value there and handle it
accordingly (plus, in practice, the same warning will be triggered at
the other two call sites at some point anyways). But I can replace that
by a warning too.

Fixes part 3 of #8765, by triggering the warning

Required glyph missing from current font.

in the relevant case.

PR Summary

PR Checklist

  • [NA] Has Pytest style unit tests
  • [NA] Code is PEP 8 compliant
  • New features are documented, with examples if plot related
  • [NA] Documentation is sphinx and numpydoc compliant
  • Added an entry to doc/users/next_whats_new/ if major new feature (follow instructions in README.rst there)
  • [NA] Documented in doc/api/api_changes.rst if API changed in a backward-incompatible way

@tacaswell tacaswell added this to the 2.1.1 (next bug fix release) milestone Sep 19, 2017
@tacaswell tacaswell modified the milestones: v2.1.1, v2.2 Oct 23, 2017
@anntzer anntzer modified the milestones: needs sorting, v3.0 Feb 15, 2018
@anntzer anntzer force-pushed the warn-on-freetype-missing-glyphs branch from c783604 to b19fa70 Compare April 3, 2018 05:14
There is an additional call site to FT_Get_Char_Index in
PyFT2Font_get_char_index but that value is directly returned to Python
so it would be easier to check for the value there and handle it
accordingly (plus, in practice, the same warning will be triggered at
the other two call sites at some point anyways).  But I can replace that
by a warning too.
@anntzer anntzer force-pushed the warn-on-freetype-missing-glyphs branch from b19fa70 to 209b759 Compare April 3, 2018 07:58
@anntzer anntzer added the Release critical For bugs that make the library unusable (segfaults, incorrect plots, etc) and major regressions. label Jul 7, 2018
@anntzer
Copy link
Contributor Author

anntzer commented Jul 7, 2018

Marking as release critical as I think it's a clear (if minor) and simple improvement.

@tacaswell tacaswell merged commit c8a48b8 into matplotlib:master Jul 8, 2018
@anntzer anntzer deleted the warn-on-freetype-missing-glyphs branch July 8, 2018 21:59
tacaswell added a commit to tacaswell/matplotlib that referenced this pull request Jul 10, 2018
…ype-missing-glyphs"

This reverts commit c8a48b8, reversing
changes made to 40cfdae.
@anntzer anntzer self-assigned this Jul 10, 2018
@anntzer
Copy link
Contributor Author

anntzer commented Jul 10, 2018

xref revert in #11615

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Release critical For bugs that make the library unusable (segfaults, incorrect plots, etc) and major regressions. topic: text
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants