Skip to content

Replace a 6.18 site's outdated Garuda and Sun-Ext fonts on the upgrade to 6.19 - #2011

Merged
jakejackson1 merged 1 commit into
developmentfrom
fix/replace-installer-garuda
Nov 10, 2026
Merged

jakejackson1 merged 1 commit into
developmentfrom
fix/replace-installer-garuda

Conversation

@gravitypdf-bot

@gravitypdf-bot gravitypdf-bot commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Sites upgrading from 6.18 hold the Core Font installer's mpdf-core-fonts v1.0.0 files: a Garuda whose "k" has broken TrueType hinting (mpdf/mpdf#1440), and Sun-ExtA and Sun-ExtB files that browsers reject as web fonts (GravityPDF/mpdf#881). #1998's cleanup keeps a font the site needs, and the downloader skips a file that's already present, so those copies would never be replaced. This moves the core fonts to v1.1.2, and the 6.19 cleanup now also removes an unmodified v1.0.0 copy of those fonts that the site needs and queues a background sync to download the current file.

  • The core font manifest moves to mpdf-core-fonts v1.1.2, which changes only Sun-ExtA (22.7 MB) and Sun-ExtB (17.5 MB)
  • Sun-ExtA's preview => false opt-out and its "Browsers can't display this font file" message are removed, as the repaired file loads
  • The mPDF fork moves to 725098a for Repair the Sun-Ext fonts so browsers can load them as web fonts (v6) mpdf#883, which records the repaired fonts' sizes in its ranges files, and brings the fork's other fixes since 0c6322c
  • myclabs/deep-copy is now required directly, as that mPDF no longer uses it, so GFPDF_Vendor\DeepCopy stays available. A scoper patcher adds a deprecation notice to its constructor, and it will be removed in 7.0
  • Model_Font_Downloader::OUTDATED lists the four Garuda files and the two Sun-Ext files; prune() never keeps them, so their v1.0.0 copies go under the same size, hash and downloads-off checks as any other file
  • When a needed one is removed, prune() calls schedule_sync(); the render-time finder also fetches it on demand
  • A modified copy, a current copy, and one whose download is turned off all stay
  • The other dehinted fonts a site keeps are left alone (their only difference is hinting)
  • v1.0.0 and v1.1.1 Garuda.ttf test fixtures (57 KB and 39 KB)

Try it

  1. On a 6.18 site, set the default font to Garuda and install the core fonts with the old installer (or copy v1.0.0 Garuda.ttf into wp-content/uploads/PDF_EXTENDED_TEMPLATES/fonts/)
  2. Upgrade to this branch
  3. Garuda.ttf is removed and a gfpdf_core_font_sync cron event is queued
  4. Run cron (wp cron event run gfpdf_core_font_sync): Garuda.ttf comes back at 39,092 bytes (the v1.1.1 file, unchanged in v1.1.2)
  5. In Font Manager, open Sun-ExtA and click to load its preview: the sample renders

Test plan

  • Test_Model_Font_Downloader: a needed v1.0.0 Garuda or Sun-Ext file is deleted and a sync queued, and a kept v1.0.0 DejaVu Serif Condensed stays; an unneeded one is deleted without a sync; a modified (same size) or current Garuda stays; a Garuda whose download is turned off stays
  • Test_Model_Font_Downloader: the replacement lands under the plain name, not a hashed one, once the v1.0.0 file is pruned
  • Test_Controller_Upgrade_Routines: the 6.18 → 6.19 upgrade, run through the queued cleanup, removes a v1.0.0 Garuda that is the default font
  • Test_Vendor_Prefixing: constructing GFPDF_Vendor\DeepCopy\DeepCopy raises the deprecation notice
  • Full PHPUnit suite on the bumped mPDF, before myclabs/deep-copy was restored (the prefixing, rendering and Helper_PDF classes were re-run after): single site 2,654 tests, multisite 2,616. The only failures are environment-only: test_an_unwritable_folder_fails_without_a_request x2 and test_an_unreadable_file_has_no_hash (the container runs as root), and test_the_kill_switch_constant_turns_downloads_off (the parallel-harness shim warning).
  • Font Manager Jest suites
  • PHPCS and PHPStan clean on the changed PHP
  • A CJK and Plane 2 PDF renders from the v1.1.2 Sun-ExtA and Sun-ExtB on the bumped mPDF, with both fonts embedded and the text extractable, with useOTL off and on
  • Sun-ExtA's preview loads in a browser
  • CI is green
More info
  • Rebased onto development now that List custom, core and bundled fonts together in the Font Manager #2015, Keep font state in one place for every site, and keep every site's fonts in the 6.19 cleanup #2004 and Save a core font under a hashed name when another font's file holds its name #2016 have merged. prune( $keep, $since ) is unchanged apart from OUTDATED: a file written after $since is still kept, and the v1.0.0 file is only ever the one at the plain name. A v1.0.0 copy is a known build to Save a core font under a hashed name when another font's file holds its name #2016's conflict rule, so before it is pruned download() treats it as the font's own, even when verifying. Once it is removed the current file is saved under the plain name, and no hashed copy is made (a test covers both steps with Garuda). A modified copy of the same size is still not touched by prune(); a verifying sync then saves the current file beside it under its hashed name, as Save a core font under a hashed name when another font's file holds its name #2016 does for any other font.
  • Which files changed between the manifests: all four Garuda faces differ between v1.0.0 and v1.1.1 (47 files differ in total). Only Garuda.ttf has the glyph fix; the other three were dehinted along with it. The four are replaced together so the family stays consistent. v1.1.2 differs from v1.1.1 only in the two Sun-Ext files, whose v1.0.0 and v1.1.1 copies are byte-identical.
  • What replacing Sun-Ext costs: a site that needs Sun-ExtA re-downloads up to 40 MB once, and PDF output doesn't change. The gain is the Font Manager preview. Until the sync finishes, is_on_disk() leaves Sun-ExtA and Sun-ExtB out of the substitution fonts unless a PDF using the font fetches it first.
  • Why the sync is queued here even though every version change already queues one: Keep font state in one place for every site, and keep every site's fonts in the 6.19 cleanup #2004 moves this cleanup into cron batches, which can run after that first sync has finished. The second call does nothing when an event is already due.
  • The mPDF bump: 0c6322c → 725098a is 21 commits. 881 Add Code Sniff Support #883 is the one this PR needs: its ranges files record the repaired Sun-Ext sizes, so shippedRanges() keeps using them, and its TTFontFile fix stops a TypeError reading Sun-ExtA with useOTL on. The others are the fork's table of contents and index fixes, look-ahead side effects, custom asset fetchers and the annotation file allow list, invalid UTF-8 handling, and a U+FEFF drawing fix. One of them removes myclabs/deep-copy from mPDF. Nothing in the plugin or mPDF uses it now, but add-ons or custom templates could use the scoped class, so composer.json requires it directly (^1.7, mPDF's old constraint) and it stays scoped until 7.0. _deprecated_class() fires only when something constructs it, and deep_copy() goes through that constructor too.
  • Character ranges sizes (reported, not fixed here): the fork's data/character-ranges/*.ranges.php record the v1.1.1 size of each regular face. FontSubstitution::shippedRanges() ignores a ranges file whose size doesn't match the font on disk and logs a warning (Character ranges file … is ignored). It then falls back to the ranges cached from reading the font, so output is still correct, just slower and with log noise. Fourteen kept v1.0.0 regular faces besides Garuda hit this: AboriginalSansREGULAR, DejaVuSans, DejaVuSansCondensed (the 6.18 default, so most upgraded sites), DejaVuSansMono, DejaVuSerif, DejaVuSerifCondensed, FreeMono, FreeSans, FreeSerif, KhmerOS, Lohit-Kannada, Pothana2000, UnBatang_0613 and XB Riyaz. If that matters, the same OUTDATED list could take those regular faces too.
  • Fixture blobs: v1.0.0 b9fcdfd9 (57,324 bytes) and v1.1.1 fc4379b5 (39,092 bytes), both matching their manifests.

@github-actions

github-actions Bot commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor

Coverage report for commit: 3aa0b16
File: ./tmp/jest-coverage/clover.xml

Cover ┌─────────────────────────┐ Freq.
   0% │ ░░░░░░░░░░░░░░░░░░░░░░░ │  0.0%
  10% │ ░░░░░░░░░░░░░░░░░░░░░░░ │  0.0%
  20% │ ░░░░░░░░░░░░░░░░░░░░░░░ │  0.0%
  30% │ ░░░░░░░░░░░░░░░░░░░░░░░ │  0.0%
  40% │ ░░░░░░░░░░░░░░░░░░░░░░░ │  0.0%
  50% │ ░░░░░░░░░░░░░░░░░░░░░░░ │  0.0%
  60% │ ░░░░░░░░░░░░░░░░░░░░░░░ │  0.0%
  70% │ █░░░░░░░░░░░░░░░░░░░░░░ │  3.1%
  80% │ ██░░░░░░░░░░░░░░░░░░░░░ │  4.7%
  90% │ ██████░░░░░░░░░░░░░░░░░ │ 18.8%
 100% │ ███████████████████████ │ 73.4%
      └─────────────────────────┘
 *Legend:* █ = Current Distribution 
Summary - Lines: 93.99% | Methods: 90.96% | Branches: 85.58%
FilesLinesMethodsBranches
src/assets/js/react/actions
   fontManager.js97.92%91.67%100.00%
   templates.js100.00%100.00%100.00%
src/assets/js/react/components/Alert
   Alert.js100.00%100.00%100.00%
src/assets/js/react/components
   CustomHashRouter.js100.00%100.00%100.00%
   Empty.js100.00%100.00%100.00%
   ShowMessage.js80.65%80.00%72.22%
   Spinner.js100.00%100.00%100.00%
src/assets/js/react/components/FontManager
   AddFont.js100.00%100.00%100.00%
   AddUpdateFontFooter.js100.00%100.00%91.67%
   AdvancedButton.js100.00%100.00%100.00%
   DeleteConfirm.js90.91%75.00%100.00%
   FontDeleteButton.js100.00%80.00%100.00%
   FontDetail.js100.00%100.00%100.00%
   FontInstallButton.js100.00%66.67%100.00%
   FontList.js100.00%50.00%65.22%
   FontListAlertMessage.js100.00%100.00%100.00%
   FontListItems.js96.00%83.33%88.24%
   FontListSkeleton.js100.00%100.00%100.00%
   FontManager.js73.68%50.00%50.00%
   FontManagerBody.js89.12%90.32%84.96%
   FontManagerHeader.js100.00%100.00%25.00%
   FontPreview.js100.00%100.00%100.00%
   FontStatus.js100.00%66.67%100.00%
   FontUsage.js100.00%66.67%100.00%
   FontVariant.js94.12%80.00%90.24%
   FontVariantLabel.js100.00%100.00%100.00%
   Icon.js100.00%100.00%100.00%
   InitialAddUpdateState.js100.00%100.00%100.00%
   SearchBox.js90.00%66.67%69.23%
   TemplateTooltip.js100.00%100.00%100.00%
   UpdateFont.js75.00%50.00%64.29%
src/assets/js/react/components/Modal
   CloseDialog.js93.33%66.67%70.59%
src/assets/js/react/components/Template
   TemplateActivateButton.js100.00%100.00%100.00%
   TemplateButton.js85.71%66.67%100.00%
   TemplateContainer.js71.43%66.67%25.00%
   TemplateDeleteButton.js100.00%100.00%70.00%
   TemplateDocsLink.js100.00%100.00%100.00%
   TemplateFooterActions.js100.00%100.00%100.00%
   TemplateHeaderNavigation.js82.35%85.71%70.00%
   TemplateHeaderTitle.js100.00%100.00%100.00%
   TemplateList.js100.00%100.00%100.00%
   TemplateListItem.js100.00%100.00%92.86%
   TemplateListItemComponents.js100.00%100.00%100.00%
   TemplateManagerClosed.js100.00%100.00%100.00%
   TemplateScreenshot.js100.00%100.00%100.00%
   TemplateScreenshots.js100.00%100.00%50.00%
   TemplateSearch.js93.75%88.89%50.00%
   TemplateSingle.js100.00%100.00%100.00%
   TemplateSingleComponents.js100.00%100.00%75.00%
   TemplateUploader.js100.00%100.00%95.00%
   TemplateUploaderContext.js100.00%100.00%100.00%
   TemplateUploaderTile.js100.00%100.00%100.00%
src/assets/js/react/reducers
   fontManagerReducer.js91.46%100.00%81.08%
   index.js100.00%100.00%100.00%
   templateReducer.js100.00%100.00%100.00%
src/assets/js/react/sagas
   fontManager.js90.16%92.86%88.57%
   index.js100.00%100.00%100.00%
   templates.js91.30%100.00%100.00%
src/assets/js/react/selectors
   getTemplates.js91.11%100.00%83.33%
src/assets/js/react/utilities/FontManager
   associatedFontManagerSelectBox.js94.44%100.00%77.78%
   fontManagerReducer.js100.00%100.00%94.12%
   toggleUpdateFont.js100.00%100.00%100.00%
src/assets/js/react/utilities/Template
   hasPendingUpload.js100.00%100.00%100.00%
src/assets/js/react/utilities
   withRouterHooks.js100.00%100.00%100.00%

🤖 Jest coverage report

@github-actions

github-actions Bot commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor

Coverage report for commit: 3aa0b16
File: tmp/coverage/report-xml/merged.xml

Cover ┌─────────────────────────┐ Freq.
   0% │ ██████░░░░░░░░░░░░░░░░░ │  7.1%
  10% │ ░░░░░░░░░░░░░░░░░░░░░░░ │  0.0%
  20% │ █░░░░░░░░░░░░░░░░░░░░░░ │  0.4%
  30% │ █░░░░░░░░░░░░░░░░░░░░░░ │  0.9%
  40% │ █░░░░░░░░░░░░░░░░░░░░░░ │  0.4%
  50% │ ███████░░░░░░░░░░░░░░░░ │  9.3%
  60% │ █░░░░░░░░░░░░░░░░░░░░░░ │  1.3%
  70% │ ██░░░░░░░░░░░░░░░░░░░░░ │  2.7%
  80% │ ████████████░░░░░░░░░░░ │ 16.4%
  90% │ ███████████████████████ │ 31.6%
 100% │ ██████████████████████░ │ 29.8%
      └─────────────────────────┘
 *Legend:* █ = Current Distribution 
Summary - Lines: 90.19% | Methods: 95.91%
FilesLinesMethodsBranches
/var/www/html/wp-content/plugins/gravity-pdf
   api.php98.14%100.00%100.00%
   gravity-pdf-updater.php53.97%100.00%100.00%
   pdf.php59.82%81.25%100.00%
/var/www/html/wp-content/plugins/gravity-pdf/src/Controller
   Controller_Actions.php100.00%100.00%100.00%
   Controller_Activation.php95.83%100.00%100.00%
   Controller_Custom_Fonts.php95.52%100.00%100.00%
   Controller_Debug.php100.00%100.00%100.00%
   Controller_Export_Entries.php96.77%100.00%100.00%
   Controller_Font_Downloader.php100.00%100.00%100.00%
   Controller_Font_Sources.php100.00%100.00%100.00%
   Controller_Form_Settings.php87.37%90.00%100.00%
   Controller_Install.php100.00%100.00%100.00%
   Controller_Mergetags.php100.00%100.00%100.00%
   Controller_PDF.php81.46%100.00%100.00%
   Controller_Pdf_Cache.php100.00%100.00%100.00%
   Controller_Pdf_Queue.php85.27%87.50%100.00%
   Controller_Save_Core_Fonts.php91.67%100.00%100.00%
   Controller_Settings.php86.90%100.00%100.00%
   Controller_Shortcodes.php100.00%100.00%100.00%
   Controller_System_Report.php100.00%100.00%100.00%
   Controller_Templates.php100.00%100.00%100.00%
   Controller_Uninstaller.php83.33%77.78%100.00%
   Controller_Upgrade_Routines.php95.19%100.00%100.00%
   Controller_Webhooks.php100.00%100.00%100.00%
   Controller_Zapier.php100.00%100.00%100.00%
/var/www/html/wp-content/plugins/gravity-pdf/src/Exceptions
   GravityPdfDatabaseUpdateException.php50.00%100.00%100.00%
   GravityPdfDomainException.php50.00%100.00%100.00%
   GravityPdfException.php50.00%100.00%100.00%
   GravityPdfFontNotFoundException.php50.00%100.00%100.00%
   GravityPdfIdException.php50.00%100.00%100.00%
   GravityPdfModelNotUpdatedException.php50.00%100.00%100.00%
   GravityPdfNotATemplateException.php50.00%100.00%100.00%
   GravityPdfRuntimeException.php50.00%100.00%100.00%
   GravityPdfShortcodeEntryIdException.php50.00%100.00%100.00%
   GravityPdfShortcodePdfConditionalLogicFailedException.php50.00%100.00%100.00%
   GravityPdfShortcodePdfConfigNotFoundException.php50.00%100.00%100.00%
   GravityPdfShortcodePdfInactiveException.php50.00%100.00%100.00%
/var/www/html/wp-content/plugins/gravity-pdf/src/Helper/Fields
   Field_Address.php92.86%100.00%100.00%
   Field_Chainedselect.php66.67%75.00%100.00%
   Field_Checkbox.php94.44%100.00%100.00%
   Field_Consent.php95.00%100.00%100.00%
   Field_Coupon.php--100.00%
   Field_Creditcard.php83.33%100.00%100.00%
   Field_Date.php83.33%100.00%100.00%
   Field_Default.php83.33%100.00%100.00%
   Field_Discount.php44.00%75.00%100.00%
   Field_Email.php83.33%100.00%100.00%
   Field_Fg_Ls_Consent.php92.86%100.00%100.00%
   Field_Fg_Ls_Signature.php73.08%66.67%100.00%
   Field_Fileupload.php95.83%100.00%100.00%
   Field_Form.php90.91%100.00%100.00%
   Field_Hidden.php81.82%100.00%100.00%
   Field_Html.php89.47%100.00%100.00%
   Field_Image_Choice.php86.67%100.00%100.00%
   Field_Likert.php97.22%100.00%100.00%
   Field_List.php92.41%100.00%100.00%
   Field_Multi_Choice.php50.00%100.00%100.00%
   Field_Multiselect.php92.59%100.00%100.00%
   Field_Name.php84.62%100.00%100.00%
   Field_Number.php83.33%100.00%100.00%
   Field_Option.php96.15%100.00%100.00%
   Field_Page.php83.33%100.00%100.00%
   Field_Phone.php94.55%100.00%100.00%
   Field_Poll.php93.75%100.00%100.00%
   Field_Post_Category.php85.00%100.00%100.00%
   Field_Post_Content.php82.35%100.00%100.00%
   Field_Post_Custom_Field.php50.00%100.00%100.00%
   Field_Post_Excerpt.php81.82%100.00%100.00%
   Field_Post_Image.php94.00%100.00%100.00%
   Field_Post_Tags.php90.91%100.00%100.00%
   Field_Post_Title.php81.82%100.00%100.00%
   Field_Product.php92.31%100.00%100.00%
   Field_Products.php84.32%100.00%100.00%
   Field_Quantity.php84.62%100.00%100.00%
   Field_Quiz.php89.74%100.00%100.00%
   Field_Radio.php94.74%100.00%100.00%
   Field_Rank.php95.24%100.00%100.00%
   Field_Rating.php95.24%100.00%100.00%
   Field_Repeater.php97.39%100.00%100.00%
   Field_Section.php90.74%100.00%100.00%
   Field_Select.php94.12%100.00%100.00%
   Field_Shipping.php92.86%100.00%100.00%
   Field_Signature.php71.11%100.00%100.00%
   Field_Slim.php82.35%100.00%100.00%
   Field_Slim_Post.php91.30%100.00%100.00%
   Field_Subtotal.php65.38%75.00%100.00%
   Field_Survey.php95.00%100.00%100.00%
   Field_Tax.php32.00%50.00%100.00%
   Field_Text.php81.82%100.00%100.00%
   Field_Textarea.php91.18%100.00%100.00%
   Field_Time.php81.82%100.00%100.00%
   Field_Tos.php92.86%100.00%100.00%
   Field_Total.php88.00%100.00%100.00%
   Field_Website.php85.71%100.00%100.00%
/var/www/html/wp-content/plugins/gravity-pdf/src/Helper/Fonts
   FlushCache.php92.31%100.00%100.00%
   LocalFile.php88.89%100.00%100.00%
   LocalFilesystem.php66.67%100.00%100.00%
   SupportsOtl.php87.50%100.00%100.00%
   TtfFontValidation.php84.62%100.00%100.00%
/var/www/html/wp-content/plugins/gravity-pdf/src/Helper
   Helper_Abstract_Addon.php94.09%100.00%100.00%
   Helper_Abstract_Config_Settings.php75.00%100.00%100.00%
   Helper_Abstract_Controller.php-100.00%100.00%
   Helper_Abstract_Field_Products.php89.47%66.67%100.00%
   Helper_Abstract_Fields.php96.10%95.83%100.00%
   Helper_Abstract_Fields_Input_Type.php84.00%100.00%100.00%
   Helper_Abstract_Form.php--100.00%
   Helper_Abstract_Model.php100.00%100.00%100.00%
   Helper_Abstract_Options.php77.33%81.36%100.00%
   Helper_Abstract_Pdf_Shortcode.php94.67%95.65%100.00%
   Helper_Abstract_View.php96.77%100.00%100.00%
   Helper_Async_Notifications.php64.29%100.00%100.00%
   Helper_Data.php98.43%100.00%100.00%
   Helper_Field_Container.php92.31%100.00%100.00%
   Helper_Field_Container_Gf25.php92.00%100.00%100.00%
   Helper_Field_Container_Void.php16.67%-100.00%
   Helper_Form.php80.65%64.29%100.00%
   Helper_Interface_Actions.php-100.00%100.00%
   Helper_Interface_Config.php50.00%100.00%100.00%
   Helper_Interface_Config_Settings.php50.00%100.00%100.00%
   Helper_Interface_Deprecated_Features.php50.00%100.00%100.00%
   Helper_Interface_Extension_Settings.php-100.00%100.00%
   Helper_Interface_Extension_Uninstaller.php-100.00%100.00%
   Helper_Interface_Field_Pdf_Config.php50.00%100.00%100.00%
   Helper_Interface_Filters.php-100.00%100.00%
   Helper_Interface_Setup_TearDown.php50.00%100.00%100.00%
   Helper_Interface_Url_Signer.php-100.00%100.00%
   Helper_Logger.php-100.00%100.00%
   Helper_Misc.php89.17%100.00%100.00%
   Helper_Mpdf.php50.00%100.00%100.00%
   Helper_Notices.php92.98%100.00%100.00%
   Helper_Options_Fields.php98.10%100.00%100.00%
   Helper_PDF.php88.61%97.56%100.00%
   Helper_PDF_List_Table.php84.50%92.31%100.00%
   Helper_Pdf_Queue.php84.31%100.00%100.00%
   Helper_QueryPath.php80.00%100.00%100.00%
   Helper_Render_Health.php85.71%100.00%100.00%
   Helper_Sha256_Url_Signer.php90.91%100.00%100.00%
   Helper_Singleton.php100.00%100.00%100.00%
   Helper_Templates.php97.29%100.00%100.00%
   Helper_Trait_Logger.php25.00%-100.00%
   Helper_Trait_Removed_Methods.php100.00%100.00%100.00%
   Helper_Url_Signer.php84.82%100.00%100.00%
/var/www/html/wp-content/plugins/gravity-pdf/src/Helper/Licensing
Table truncated to fit comment

🤖 PHPUnit coverage report

@gravitypdf-bot
gravitypdf-bot force-pushed the fix/replace-installer-garuda branch from 854eed7 to 95666e7 Compare November 6, 2026 00:34
@gravitypdf-bot
gravitypdf-bot changed the base branch from feature/core-font-upgrade-prune to feature/font-file-conflict-rename November 6, 2026 00:35
@jakejackson1
jakejackson1 force-pushed the feature/font-file-conflict-rename branch from f7acf3e to 74c3b06 Compare November 6, 2026 03:07
@gravitypdf-bot
gravitypdf-bot force-pushed the feature/font-file-conflict-rename branch 3 times, most recently from 62cbe50 to 38e02af Compare November 9, 2026 06:09
Base automatically changed from feature/font-file-conflict-rename to development November 9, 2026 06:12
@gravitypdf-bot
gravitypdf-bot force-pushed the fix/replace-installer-garuda branch from 95666e7 to a8d1824 Compare November 10, 2026 01:10
@gravitypdf-bot gravitypdf-bot changed the title Replace a 6.18 site's outdated Garuda on the upgrade to 6.19 Replace a 6.18 site's outdated Garuda and Sun-Ext fonts on the upgrade to 6.19 Nov 10, 2026
@gravitypdf-bot
gravitypdf-bot force-pushed the fix/replace-installer-garuda branch from a8d1824 to 432d688 Compare November 10, 2026 01:16
…e to 6.19

mpdf-core-fonts v1.0.0, which the Core Font installer downloaded, holds mPDF's pre-8.1.0 Garuda.ttf, whose "k" carries
broken TrueType hinting (mpdf/mpdf#1440), and Sun-ExtA and Sun-ExtB files browsers reject as web fonts
(GravityPDF/mpdf#881). prune() keeps a font the site needs, and the downloader skips a file that's present, so those
copies would stay for good.

The manifest moves to v1.1.2, which repairs Sun-ExtA and Sun-ExtB, and the Sun-ExtA preview opt-out goes with the fault
it worked around. prune() now treats Model_Font_Downloader::OUTDATED (the four Garuda files and the two Sun-Ext files)
as never kept: an unmodified v1.0.0 copy is deleted whether or not the site needs it, under the same size, hash and
downloads-off checks as any other file. When a needed one goes, it queues a sync so the current file comes back in the
background (the render-time finder fetches it too). The version change already queues a sync, but #2004 moves this
cleanup into cron batches that can run after it. A modified copy, a current one, and one whose download is turned off
stay.

The other 43 dehinted fonts differ only in hinting and are left alone when kept, though the fork's character ranges
files record v1.1.1 sizes, so mPDF ignores the ranges file (and logs a warning) for a kept v1.0.0 regular face.

Bumps the mPDF fork to 725098a for GravityPDF/mpdf#883, whose ranges files record the repaired sizes and whose
TTFontFile reads Sun-ExtA with OTL on. The fork no longer uses myclabs/deep-copy, so the plugin requires it directly to
keep GFPDF_Vendor\DeepCopy available to add-ons and custom templates, and a scoper patcher deprecates its constructor
ahead of its removal in 7.0.

Adds the v1.0.0 (blob b9fcdfd) and v1.1.1 (blob fc4379b) Garuda.ttf as test fixtures, and moves the reset of the
installer manifest stand-in into CopiesFontFixtures::use_shipped_installer_manifest().

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@gravitypdf-bot
gravitypdf-bot force-pushed the fix/replace-installer-garuda branch from 432d688 to 3aa0b16 Compare November 10, 2026 01:23
@jakejackson1
jakejackson1 merged commit 4880c07 into development Nov 10, 2026
@jakejackson1
jakejackson1 deleted the fix/replace-installer-garuda branch November 10, 2026 01:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants