Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork8.1k
MNT: print fontname in missing glyph warning#26989
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
tacaswell commentedOct 3, 2023
How does this interact with the fallback list? Presumable we would want to show all of the fonts that were considered? |
story645 commentedOct 4, 2023 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
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 in21ce592
|
story645 commentedOct 4, 2023
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. |
22e8b01 toe16b88dComparestory645 commentedOct 4, 2023 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
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. |
tacaswell commentedOct 4, 2023
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? |
story645 commentedOct 4, 2023 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
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 in6ba7d5f
|
story645 commentedOct 12, 2023
So I was wrong in that it'll miss the first glyph when there's an override. |
story645 commentedOct 12, 2023
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 |
c66bfd9 tof9274f3Comparedf5d2ae toc719d89CompareUh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
b3dd35d to1ff3b42CompareUh oh!
There was an error while loading.Please reload this page.
0a39542 to296977bCompareUh oh!
There was an error while loading.Please reload this page.
tacaswell left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
I think this can be done without adding any new state to the objects.
story645 commentedOct 19, 2023
changed to parameter into function |
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
story645 commentedOct 27, 2023 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
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. |
22c8c97 to6470890Comparelists all fallback fonts if glyph missing in all fontsremoved ft_get_char_index_or_warnadded a test for otf fonts on pdf + some windows fonts to testsCo-authored-by: Elliott Sales de Andrade <quantum.analyst@gmail.com>Co-authored-by: Thomas A Caswell <tcaswell@gmail.com>
tacaswell commentedOct 27, 2023
It was not a request, I only asked (in a private channel) why many instead of one! |
tacaswell commentedOct 27, 2023
Thank you@story645 ! |
Uh oh!
There was an error while loading.Please reload this page.
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 thespun out into#27076..plotdirectivePR checklist