Conversation
| return font.CreateSubset(chars); | ||
| return font.CreateSubset(chars, addSubsetTag); | ||
| } | ||
| catch (Exception ex) |
Contributor
There was a problem hiding this comment.
ex is never used varning av github codescan
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.
Add PDF subset tags to embedded subset fonts
Subsetted fonts were embedded in PDF files without the required six-letter prefix (
ABCDEF+FontName) in/BaseFontand/FontName.Changes
NameTable.ApplySubsetTag(new): prefixes the full name (nameID 4) and PostScript name (nameID 6) in all platform records. Family/subfamily records (nameID 1, 2, 16, 17) are untouched, as they are used for font identity. Idempotent.SubsetTag.Create(new): deterministic tag (six uppercase letters ++) derived from font identity and code points.OpenTypeFont.CreateSubset: new internal overload withaddSubsetTag. The tag is applied to the new subset beforePostProcessSubset, so lengths, checksums and cached table bytes reflect the final name table. Public signature unchanged.SingleFontSubsetter.Subset: new overload withaddSubsetTag.DocumentFontSubsetBuilder.Build: subsets are now tagged.EmbedWholefonts and the original cached fonts are never modified.No changes to
EPPlus.Export.Pdf: Type0, CIDFont and FontDescriptor all readFullName, so the three names are identical.Verification
EmbedWhole, and last-resort fallback.pdffontson a sample export shows all four fonts asemb=yes sub=yeswith distinct tags.