| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
|
How does this interact with the fallback list? Presumable we would want to show all of the fonts that were considered? |
Sorry, something went wrong.
Currently fallback suppresses the missing font and if fallback doesn't work only prints the first font eta: I think b/c it's marked as a flag once and load_char_with_fallaback is kinda recursive. Lines 514 to 518 in 21ce592 |
Sorry, something went wrong.
Which also means I can't think of a clean way to only print the warnings if the fallback fails w/o maintaining a separate stack of warnings & I think that rabbit hole is out of scope for this PR. |
Sorry, something went wrong.
|
Added a :filter-warning: to the plot directive so docs can build cleanly, but I'm really unsure that raising the warnings is all that helpful to someone using fallback-presumably they're using it b/c they expect that not all the fonts will work. |
Sorry, something went wrong.
|
When we exhaust the list of fallback fonts, do we have anyway to get back to the top of the list and walk it again collecting all of their names? |
Sorry, something went wrong.
Kinda maybe? if we exhaust the list, it means i==fallbacks.size() and if that works that's definitely a cleaner solution than the changes I've been making of passing around a cache object...but also currently pybind doesn't want to work for me so I can't build anything. Lines 672 to 680 in 6ba7d5f |
Sorry, something went wrong.
|
So I was wrong in that it'll miss the first glyph when there's an override. |
Sorry, something went wrong.
|
Got this to work by adding an array to F2tFont to store the names of the fonts. Reason is because if you can't find anything, you need to print font + fallback_list |
Sorry, something went wrong.
There was a problem hiding this comment.
I think this can be done without adding any new state to the objects.
Sorry, something went wrong.
|
changed to parameter into function |
Sorry, something went wrong.
|
one warning w/ all the fonts instead of n warnings w/ one font per @tacaswell's request - and I'm 99% sure that the set can be passed from c++ to python directly but since this is for a string I figure there's no harm in doing the strcat on the C++ side since passing the set over would I think involve copying the set to the python set object. I figure this can get cleaned up as part of the pybind port if it's important enough. |
Sorry, something went wrong.
lists all fallback fonts if glyph missing in all fonts removed ft_get_char_index_or_warn added a test for otf fonts on pdf + some windows fonts to tests Co-authored-by: Elliott Sales de Andrade <quantum.analyst@gmail.com> Co-authored-by: Thomas A Caswell <tcaswell@gmail.com>
It was not a request, I only asked (in a private channel) why many instead of one! |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
PR summary
Modified the "missing glyph" warning to also print out the name of the font the glyph is missing from. This is mostly to help me debug why #26854 is failing on CI but working locally but there have been times where I've gotten this error and would have found it helpful to have the added context.
second commit adds a :filter-warning: option to the ..plot directive spun out into #27076
PR checklist