Add Type 3 Fonts Functionality and Support for Color Fonts 🎨#1305
Merged
andersonhc merged 8 commits intopy-pdf:masterfrom Aug 28, 2025
Merged
Add Type 3 Fonts Functionality and Support for Color Fonts 🎨#1305andersonhc merged 8 commits intopy-pdf:masterfrom
andersonhc merged 8 commits intopy-pdf:masterfrom
Conversation
7 tasks
858140e to
da535dc
Compare
Member
|
I'm no expert on fonts, but feel free to ping me if you want a review on this PR at some point 🙂 And thank you for working on this feature! 👍 |
Collaborator
Author
Only missing COLRv1 support and some housekeeping... we should have a reviewable version soon. |
4 tasks
Closed
|
I don't know if this is the right place to report this, but I found a regression in the font_color branch linked to offset_rendering(): The following code fails with an AttributeError: 'FPDF' object has no attribute '_current_draw_context' import fpdf
pdf = fpdf.FPDF()
pdf.add_page()
pdf.add_font(fname='DejaVuSans.ttf')
pdf.add_font(fname='NotoColorEmoji.ttf')
pdf.set_font('DejaVuSans', size=14)
pdf.set_fallback_fonts(['NotoColorEmoji'])
pdf.multi_cell(text='abcdefghijklmnoqrtuvwxyz é 0123456789 🔴🟢🔵💀☠️', w=0)
with pdf.offset_rendering() as dummy:
dummy.multi_cell(100, None, "test")
pdf.output('issue_1446.pdf') |
ec52878 to
0e45388
Compare
This was referenced Aug 13, 2025
850ecb3 to
e1475aa
Compare
93bebb5 to
cc1d59c
Compare
Member
|
Good job @andersonhc 👍 |
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
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.
Initial Draft: Type 3 Fonts and Color Fonts Support
Fixes #224 #1446
This PR introduces the initial implementation for Type 3 fonts and Color Fonts in PDFs. 🚀
Features:
Checklist:
A unit test is covering the code added / modified by this PR
This PR is ready to be merged
In case of a new feature, docstrings have been added, with also some documentation in the
docs/folderA mention of the change is present in
CHANGELOG.mdBy submitting this pull request, I confirm that my contribution is made under the terms of the GNU LGPL 3.0 license.