Set bold and italic properties to translated font#20326
Set bold and italic properties to translated font#20326edoardocavazza wants to merge 2 commits intomozilla:masterfrom
Conversation
timvandermeij
left a comment
There was a problem hiding this comment.
Could you explain the use case for this change a bit more? Is it just for consistency with system fonts, or are these values going to be used somewhere in a future patch?
| this.fontMatrix = properties.fontMatrix; | ||
| this.bbox = properties.bbox; | ||
| this.defaultEncoding = properties.defaultEncoding; | ||
| if (typeof properties.fontWeight === "number") { |
There was a problem hiding this comment.
Please add a test to make sure that this behavior can't regress in the future.
There was a problem hiding this comment.
I have rebased the branch and added a regression test, if interested
|
Hi @timvandermeij, here’s a bit of context for this PR and the others we’ve been submitting recently. At this stage, we’re not yet suggesting any major changes to the pdf.js code — only those that we believe are general improvements for the project. So for now, this PR only includes consistency-related changes, as you’ve already noticed. |
f034321 to
9c9b37a
Compare
It seems that
boldanditalicproperties are set only for system fonts. With this PR, we are going to use values from font descriptor to add the properties to all translated fonts.