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

Skip to content

re-base of font fallback for pdf and eps output + SVG support #23559

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 10 commits into from
Aug 11, 2022

Conversation

tacaswell
Copy link
Member

@tacaswell tacaswell commented Aug 5, 2022

PR Summary

This is a rebase of #20804 and ##20832, given that there was not a lot of discussion on either PR, I am making a new PR rather than force-pushing to @aitikgupta 's branches.

My process here was to discard all changes to the c++ code and keep all changes to the Python code from #20804 and then implement the c++ layer needed to make the Python run (with some small changes to the Python + fixing up rebase errors.).
The current status of this:

  • the Agg tests still pass 🎉
  • almost all the non-fallback tests pass 🎉 (I am seeing an svg bold font failure locally, not sure if it is related)
  • the pdf test only shows the Chinese characters 😞 This was a "re use of names" bug 🎉
  • c++ needs more error checking 😞 This could still be better, but the one obvious place that needed it has it
  • recursive fallback is not implemented yet 😞 (but I think this is low-priority)
  • minimal test of get_fontmap 🎉
  • the c++ style is terrible 😞 acceptable now.

@tacaswell tacaswell added this to the v3.6.0 milestone Aug 5, 2022
@tacaswell
Copy link
Member Author

I have debugged this to something going wrong in writing the fonts and only one font being embedded in the PDF, but not why yet.

@tacaswell tacaswell requested a review from aitikgupta August 5, 2022 03:07
@tacaswell tacaswell changed the title re-base of font fallback for pdf output re-base of font fallback for pdf and eps output Aug 7, 2022
@tacaswell
Copy link
Member Author

I have now squashed all of @aitikgupta 's work (+ adapting to the new c++ API) into two commits + a c++ commit + 2 extra commits.

I think this is ready to review. The c++ needs the most attention. There is likely also some un-needed work in the PDF backend.

@tacaswell tacaswell marked this pull request as ready for review August 7, 2022 21:07
@tacaswell
Copy link
Member Author

Also looks like I accidentally used too-new of c++.

@tacaswell tacaswell changed the title re-base of font fallback for pdf and eps output re-base of font fallback for pdf and eps output + SVG support Aug 9, 2022
"family_name, file_name",
[
("WenQuanYi Zen Hei", "wqy-zenhei.ttc"),
("Noto Sans CJK JP", "NotoSansCJK-Regular.ttc"),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure I fully get this (probably not), but for OSX the font seems to be NotoSansCJKsc-Regular.otf. Not that it may be required to add that...

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess we need to extend this to be a set of possible names?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants