You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The current implementation of the addFont method in the PDFDocument class for DefaultFont allows registering the same font multiple times. This behavior needs to be improved so that the method can detect if the added font is already registered and return the existing font instead of registering it again. Additionally, when registering fonts, a random UUID is assigned to each font. For system fonts, it would be better to use special names instead of UUIDs (e.g., Acrobat registers Helvetica as Helv).
Steps to reproduce:
Create a PDFDocument instance.
Call the addFont method multiple times for the same DefaultFont with different names.
Observe that the font is registered multiple times.
Expected behavior:
The addFont method should detect if the added font is already registered and return the existing font instead of registering it again.
Actual behavior:
The addFont method registers the same font multiple times.
The text was updated successfully, but these errors were encountered:
The current implementation of the
addFont
method in thePDFDocument
class forDefaultFont
allows registering the same font multiple times. This behavior needs to be improved so that the method can detect if the added font is already registered and return the existing font instead of registering it again. Additionally, when registering fonts, a random UUID is assigned to each font. For system fonts, it would be better to use special names instead of UUIDs (e.g., Acrobat registers Helvetica asHelv
).Steps to reproduce:
PDFDocument
instance.addFont
method multiple times for the sameDefaultFont
with different names.Expected behavior:
The
addFont
method should detect if the added font is already registered and return the existing font instead of registering it again.Actual behavior:
The
addFont
method registers the same font multiple times.The text was updated successfully, but these errors were encountered: