Skip to content

Commit

Permalink
Avoid "inline SVG in ..." in assetFileName in fontInfo for SVG islands
Browse files Browse the repository at this point in the history
Just attribute it to the HTML, but keep tracing as a separate page
  • Loading branch information
papandreou committed Sep 5, 2021
1 parent 71434f3 commit 8fa6bfe
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/subsetFonts.js
Original file line number Diff line number Diff line change
Expand Up @@ -776,7 +776,7 @@ async function subsetFonts(
return {
fontInfo: htmlOrSvgAssetTextsWithProps.map(
({ fontUsages, htmlOrSvgAsset }) => ({
htmlOrSvgAsset: htmlOrSvgAsset.urlOrDescription,
assetFileName: htmlOrSvgAsset.nonInlineAncestor.urlOrDescription,
fontUsages: fontUsages,
})
),
Expand Down Expand Up @@ -1467,7 +1467,7 @@ These glyphs are used on your site, but they don't exist in the font you applied
return {
fontInfo: htmlOrSvgAssetTextsWithProps.map(
({ fontUsages, htmlOrSvgAsset }) => ({
assetFileName: htmlOrSvgAsset.urlOrDescription,
assetFileName: htmlOrSvgAsset.nonInlineAncestor.urlOrDescription,
fontUsages: fontUsages.map((fontUsage) => _.omit(fontUsage, 'subsets')),
})
),
Expand Down

0 comments on commit 8fa6bfe

Please sign in to comment.