Delay fc-list warning by 5s.#7596
Conversation
|
title says 'min', code looks like it is 's' |
| """List the font filenames known to `fc-list` having the given extension. | ||
| """ | ||
| fontext = get_fontext_synonyms(fontext) | ||
| return [fname for fname in _call_fc_list() |
There was a problem hiding this comment.
From a set represented as a {key: 1, key: 1, ...} dict to a list, yes. I can even document this as a API break :-)
There was a problem hiding this comment.
👍 , please document this. The duck typing of the likely usage is the same.
tacaswell
left a comment
There was a problem hiding this comment.
Looks like _call_fc_list always returns an empty list
| fname = six.text_type(fname, sys.getfilesystemencoding()) | ||
| except UnicodeDecodeError: | ||
| continue | ||
| return fnames |
There was a problem hiding this comment.
This looks like it will always come out empty.
|
fixed min->s |
c637d88 to
fec1a93
Compare
| ``afm.get_fontconfig_fonts`` returns a list of paths and does not check for existence | ||
| ````````````````````````````````````````````````````````````````````````````````````` | ||
|
|
||
| ``afm.get_fontconfig_fonts`` used to return a set of paths encoded as a `{key: 1, ...}` dict, and checked for the existence of the paths. It now returns a list and dropped the existence check, as the same check is performed by the caller (``afm.findSystemFonts``) as well. |
There was a problem hiding this comment.
Pretty sure the backticks are the wrong way here, in that single ticks are references and double are code formatting (or at least the dict one needs to be doubled if the other references are not wanted.)
We do not need to check filename validity in `_call_fc_list` as `findSystemFonts` already does it.
fec1a93 to
823fd95
Compare
|
Backported to v2.x as 93d09be. |
Alternative for #7532.
This implementation also avoids calling
fc-listtwice.We do not need to check filename validity in
_call_fc_listasfindSystemFontsalready does it.