-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Remove "experimental" fontconfig font_manager backend. #10933
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
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
03bf3e6
to
bcba233
Compare
jklymak
approved these changes
May 2, 2018
rebased |
bcba233
to
9c3c386
Compare
Fedora used to enable this when unbundling fonts, but the guidelines were relaxed a bit and it was not possible to even do so with 1.4.2+. So while the build instructions still exist, they've been disabled since then. |
ce1ec7a
to
54161f1
Compare
54161f1
to
a815ea0
Compare
a815ea0
to
a955cbb
Compare
timhoffm
approved these changes
Oct 13, 2018
The "experimental" fontconfig backend for font_manager was never publicly accessible: even if one does `matplotlib.font_manager.USE_FONTCONFIG = True`, that didn't change the already existing `findfont`. The only way to access it was to edit the source, or use `reload()`, neither of which really count as public API... Note that our "use" of "fontconfig-like" patterns actually has subtly different semantics from actual fontconfig patterns, so it's not as if that backend was correctly working anyways. We don't need to set `fontManager.default_size` when loading it as we already check that fontManager has the correct `__version__` (and thus must have a correct `default_size`; moreover the only use of `default_size` is in `sizeval1 = self.default_size * font_scalings[size1]` so it's not as if a value of `None` (if it had somehow been missing) was going to be helpful anyways... `get_cachedir()` always returns a real directory (creating a temporary one if necessary), so we can drop the code paths handling `get_cachedir() == None`. Note that we still rely on fontconfig to *list* fonts; the backend only added an (non-publicly-accessible, per above) option to *match* fonts using fontconfig.
a955cbb
to
7c93309
Compare
Thanks for the ping |
6 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The "experimental" fontconfig backend for font_manager was never
publicly accessible: even if one does
matplotlib.font_manager.USE_FONTCONFIG = True
, that didn't change thealready existing
findfont
. The only way to access it was to edit thesource, or use
reload()
, neither of which really count as publicAPI...
Note that our "use" of "fontconfig-like" patterns actually has subtly
different semantics from actual fontconfig patterns, so it's not as if
that backend was correctly working anyways. (per #10249)
We don't need to set
fontManager.default_size
when loading it aswe already check that fontManager has the correct
__version__
(and thus must have a correct
default_size
; moreover the onlyuse of
default_size
is insizeval1 = self.default_size * font_scalings[size1]
so it's not as if a value ofNone
(if it hadsomehow been missing) was going to be helpful anyways...
get_cachedir()
always returns a real directory (creating a temporaryone if necessary), so we can drop the code paths handling
get_cachedir() == None
.Note that we still rely on fontconfig to list fonts; the backend only
added an (non-publicly-accessible, per above) option to match fonts
using fontconfig.
PR Summary
PR Checklist